@milaboratories/graph-maker 1.1.139 → 1.1.141

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 (152) hide show
  1. package/dist/GraphMaker/components/Chart.vue.d.ts.map +1 -1
  2. package/dist/GraphMaker/components/Chart.vue.js +1 -0
  3. package/dist/GraphMaker/components/Chart.vue.js.map +1 -1
  4. package/dist/GraphMaker/dataBindAes.d.ts +5 -5
  5. package/dist/GraphMaker/dataBindAes.d.ts.map +1 -1
  6. package/dist/GraphMaker/dataBindAes.js +52 -49
  7. package/dist/GraphMaker/dataBindAes.js.map +1 -1
  8. package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js +14 -14
  9. package/dist/GraphMaker/forms/LayersForm/AesSelector.vue.js.map +1 -1
  10. package/dist/GraphMaker/index.vue.d.ts.map +1 -1
  11. package/dist/GraphMaker/index.vue.js +115 -113
  12. package/dist/GraphMaker/index.vue.js.map +1 -1
  13. package/dist/GraphMaker/store.js +9 -9
  14. package/dist/GraphMaker/types.d.ts +1 -1
  15. package/dist/GraphMaker/types.d.ts.map +1 -1
  16. package/dist/GraphMaker/utils/createChartSettingsForRender/composeBubbleSettings.d.ts +3 -3
  17. package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts +4 -8
  18. package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.d.ts.map +1 -1
  19. package/dist/GraphMaker/utils/createChartSettingsForRender/composeChartSettings.js.map +1 -1
  20. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDendroSettings.d.ts +2 -2
  21. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts +5 -5
  22. package/dist/GraphMaker/utils/createChartSettingsForRender/composeDiscreteSettings.d.ts.map +1 -1
  23. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHeatmapSettings.d.ts +7 -7
  24. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts +9 -9
  25. package/dist/GraphMaker/utils/createChartSettingsForRender/composeHistogramSettings.d.ts.map +1 -1
  26. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts +20 -16
  27. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.d.ts.map +1 -1
  28. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js +65 -69
  29. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotSettings.js.map +1 -1
  30. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts +20 -16
  31. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.d.ts.map +1 -1
  32. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js +20 -19
  33. package/dist/GraphMaker/utils/createChartSettingsForRender/composeScatterplotUmapSettings.js.map +1 -1
  34. package/dist/GraphMaker/utils/loadDefaultSources.js +4 -3
  35. package/dist/GraphMaker/utils/loadDefaultSources.js.map +1 -1
  36. package/dist/GraphMaker/utils/loadUniqueValuesToSave.d.ts.map +1 -1
  37. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js +57 -54
  38. package/dist/GraphMaker/utils/loadUniqueValuesToSave.js.map +1 -1
  39. package/dist/_virtual/_commonjsHelpers.js +3 -5
  40. package/dist/_virtual/_commonjsHelpers.js.map +1 -1
  41. package/dist/lib.js +1 -1
  42. package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js +5 -5
  43. package/dist/node_modules/@milaboratories/miplots4/dist/AbstractChart.js.map +1 -1
  44. package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js +8 -5
  45. package/dist/node_modules/@milaboratories/miplots4/dist/MiPlots.js.map +1 -1
  46. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js +22 -22
  47. package/dist/node_modules/@milaboratories/miplots4/dist/bubble/index.js.map +1 -1
  48. package/dist/node_modules/@milaboratories/miplots4/dist/common/Error.js +4 -22
  49. package/dist/node_modules/@milaboratories/miplots4/dist/common/Error.js.map +1 -1
  50. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js +53 -53
  51. package/dist/node_modules/@milaboratories/miplots4/dist/dendro/index.js.map +1 -1
  52. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/ChartRenderer.js +6 -6
  53. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js +45 -45
  54. package/dist/node_modules/@milaboratories/miplots4/dist/discrete/index.js.map +1 -1
  55. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js +71 -70
  56. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Annotations/Annotation.js.map +1 -1
  57. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js +117 -112
  58. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/Chart.js.map +1 -1
  59. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/components/ChartsGroup.js +14 -14
  60. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js +6 -6
  61. package/dist/node_modules/@milaboratories/miplots4/dist/heatmap/index.js.map +1 -1
  62. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js +36 -36
  63. package/dist/node_modules/@milaboratories/miplots4/dist/histogram/index.js.map +1 -1
  64. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js +24 -24
  65. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/ScatterplotSettingsImpl.js.map +1 -1
  66. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js +23 -26
  67. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/dots.js.map +1 -1
  68. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js +13 -10
  69. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/getLayersData.js.map +1 -1
  70. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js +67 -73
  71. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/index.js.map +1 -1
  72. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js +44 -39
  73. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/createLegendInfo.js.map +1 -1
  74. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js +18 -0
  75. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot/utils/sortDotsByGrouping.js.map +1 -0
  76. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js +14 -14
  77. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/SettingsImpl.js.map +1 -1
  78. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js +68 -64
  79. package/dist/node_modules/@milaboratories/miplots4/dist/scatterplot-umap/index.js.map +1 -1
  80. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js +23 -17
  81. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot-umap.js.map +1 -1
  82. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js +23 -17
  83. package/dist/node_modules/@milaboratories/miplots4/dist/types/scatterplot.js.map +1 -1
  84. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arraysAreDifferent.js +7 -0
  85. package/dist/node_modules/@milaboratories/miplots4/dist/utils/arraysAreDifferent.js.map +1 -0
  86. package/dist/node_modules/@milaboratories/pf-plots/dist/_virtual/_commonjsHelpers.js +9 -0
  87. package/dist/node_modules/@milaboratories/pf-plots/dist/_virtual/_commonjsHelpers.js.map +1 -0
  88. package/dist/node_modules/@milaboratories/pf-plots/dist/_virtual/canonicalize.js +8 -0
  89. package/dist/node_modules/@milaboratories/pf-plots/dist/_virtual/canonicalize.js.map +1 -0
  90. package/dist/node_modules/@milaboratories/pf-plots/dist/_virtual/lodash.js +8 -0
  91. package/dist/{_virtual → node_modules/@milaboratories/pf-plots/dist/_virtual}/lodash.js.map +1 -1
  92. package/dist/{_virtual/lodash.js → node_modules/@milaboratories/pf-plots/dist/_virtual/lodash2.js} +1 -1
  93. package/dist/node_modules/@milaboratories/pf-plots/dist/_virtual/lodash2.js.map +1 -0
  94. package/dist/node_modules/@milaboratories/pf-plots/dist/_virtual/stringify.js +3 -0
  95. package/dist/{_virtual → node_modules/@milaboratories/pf-plots/dist/_virtual}/stringify.js.map +1 -1
  96. package/dist/{_virtual/stringify.js → node_modules/@milaboratories/pf-plots/dist/_virtual/stringify2.js} +1 -1
  97. package/dist/node_modules/@milaboratories/pf-plots/dist/_virtual/stringify2.js.map +1 -0
  98. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js +15 -0
  99. package/dist/node_modules/@milaboratories/pf-plots/dist/constants.js.map +1 -0
  100. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js +198 -0
  101. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ComponentController.js.map +1 -0
  102. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js +342 -0
  103. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/ControllerBase.js.map +1 -0
  104. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js +278 -0
  105. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/bubble.js.map +1 -0
  106. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.js +453 -0
  107. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/dendro.js.map +1 -0
  108. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.js +203 -0
  109. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/discrete.js.map +1 -0
  110. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js +432 -0
  111. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/heatmap.js.map +1 -0
  112. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.js +170 -0
  113. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/histogram.js.map +1 -0
  114. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js +315 -0
  115. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot-umap.js.map +1 -0
  116. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js +323 -0
  117. package/dist/node_modules/@milaboratories/pf-plots/dist/controllers/controllersByChartType/scatterplot.js.map +1 -0
  118. package/dist/node_modules/@milaboratories/pf-plots/dist/demoStore.js +11 -0
  119. package/dist/node_modules/@milaboratories/pf-plots/dist/demoStore.js.map +1 -0
  120. package/dist/node_modules/@milaboratories/pf-plots/dist/index.js +36 -3420
  121. package/dist/node_modules/@milaboratories/pf-plots/dist/index.js.map +1 -1
  122. package/dist/node_modules/@milaboratories/{pl-error-like → pf-plots/dist/node_modules/@milaboratories/pl-error-like}/dist/index.js +1 -1
  123. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-error-like/dist/index.js.map +1 -0
  124. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/index.js +979 -0
  125. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@milaboratories/pl-model-common/dist/index.js.map +1 -0
  126. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/index.js +1599 -0
  127. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/@platforma-sdk/model/dist/index.js.map +1 -0
  128. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/canonicalize/lib/canonicalize.js +19 -0
  129. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/canonicalize/lib/canonicalize.js.map +1 -0
  130. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/json-stringify-safe/stringify.js +26 -0
  131. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/json-stringify-safe/stringify.js.map +1 -0
  132. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/lodash/lodash.js +3678 -0
  133. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/lodash/lodash.js.map +1 -0
  134. package/dist/node_modules/{zod → @milaboratories/pf-plots/dist/node_modules/zod}/lib/index.js +1141 -1141
  135. package/dist/node_modules/@milaboratories/pf-plots/dist/node_modules/zod/lib/index.js.map +1 -0
  136. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js +247 -0
  137. package/dist/node_modules/@milaboratories/pf-plots/dist/pframe/ColumnsProvider.js.map +1 -0
  138. package/dist/node_modules/@milaboratories/pf-plots/dist/spec.js +62 -0
  139. package/dist/node_modules/@milaboratories/pf-plots/dist/spec.js.map +1 -0
  140. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js +286 -0
  141. package/dist/node_modules/@milaboratories/pf-plots/dist/utils.js.map +1 -0
  142. package/package.json +3 -3
  143. package/dist/node_modules/@milaboratories/pl-error-like/dist/index.js.map +0 -1
  144. package/dist/node_modules/@milaboratories/pl-model-common/dist/index.js +0 -584
  145. package/dist/node_modules/@milaboratories/pl-model-common/dist/index.js.map +0 -1
  146. package/dist/node_modules/@platforma-sdk/model/dist/index.js +0 -1559
  147. package/dist/node_modules/@platforma-sdk/model/dist/index.js.map +0 -1
  148. package/dist/node_modules/json-stringify-safe/stringify.js +0 -20
  149. package/dist/node_modules/json-stringify-safe/stringify.js.map +0 -1
  150. package/dist/node_modules/lodash/lodash.js +0 -3678
  151. package/dist/node_modules/lodash/lodash.js.map +0 -1
  152. package/dist/node_modules/zod/lib/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scatterplot-umap.js","sources":["../../../../../../../node_modules/@milaboratories/pf-plots/src/controllers/controllersByChartType/scatterplot-umap.ts"],"sourcesContent":["import canonicalize from 'canonicalize';\nimport lodash from 'lodash';\nimport type {\n ComponentStateFilter,\n ComponentStateSimple,\n DataByColumns,\n InputStateParent,\n} from '../../common';\nimport {FORMAT} from '../../constants';\nimport {PValue} from '../../store';\nimport {ControllerBase, PlotDataAndSettings} from '../ControllerBase';\nimport {ComponentController} from '../ComponentController';\nimport {AxisId, ColumnId} from '../../spec';\nimport {columnOrAxisIdFromString, isColumnId} from '../../spec';\nimport type {DataStore} from '../../store';\nimport {\n checkSourceBySpecForFilters,\n createHighlightColumn,\n createLinkerMap,\n getAxesSpecsFromSources,\n getColumnOrAxisLabel, getColumnOrAxisSpec,\n getColumnOrAxisValueLabelsId,\n getFiltersFromStates,\n getLinkerColumnsForSource,\n} from '../../utils';\n\nexport interface ScatterplotUmapUIState extends InputStateParent<'scatterplot-umap'> {\n type: 'scatterplot-umap';\n components: {\n x: ComponentStateSimple;\n y: ComponentStateSimple;\n filters: ComponentStateFilter;\n highlight: ComponentStateFilter;\n tabBy: ComponentStateFilter;\n facetBy: ComponentStateSimple;\n grouping: ComponentStateSimple;\n label: ComponentStateSimple;\n tooltipContent: ComponentStateSimple;\n size: ComponentStateSimple;\n };\n}\n\nexport const InitialScatterplotUmapState: ScatterplotUmapUIState = {\n type: 'scatterplot-umap',\n components: {\n x: {type: 'simple', selectorStates: []},\n y: {type: 'simple', selectorStates: []},\n filters: {type: 'filter', selectorStates: []},\n highlight: {type: 'filter', selectorStates: []},\n tabBy: {type: 'filter', selectorStates: []},\n facetBy: {type: 'simple', selectorStates: []},\n grouping: {type: 'simple', selectorStates: []},\n label: {type: 'simple', selectorStates: []},\n tooltipContent: {type: 'simple', selectorStates: []},\n size: {type: 'simple', selectorStates: []},\n },\n dividedAxes: {},\n};\n\nexport class ScatterplotUmapStateController extends ControllerBase<ScatterplotUmapUIState> {\n dataInputs = ['x', 'y'];\n\n constructor() {\n super(\n {\n x: new ComponentController<ScatterplotUmapUIState, 'x'>({\n componentName: 'x',\n allowedTypes: ['Int', 'Long', 'Double' , 'Float'],\n parentComponents: ['y'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n y: new ComponentController<ScatterplotUmapUIState, 'y'>({\n componentName: 'y',\n allowedTypes: ['Int', 'Long', 'Double', 'Float'],\n parentComponents: ['x'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n facetBy: new ComponentController<ScatterplotUmapUIState, 'facetBy'>({\n componentName: 'facetBy',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n }),\n grouping: new ComponentController<ScatterplotUmapUIState, 'grouping'>({\n componentName: 'grouping',\n allowedTypes: ['String', 'Int', 'Long', 'Float', 'Double'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n tooltipContent: new ComponentController<ScatterplotUmapUIState, 'tooltipContent'>({\n componentName: 'tooltipContent',\n allowedTypes: ['String', 'Int', 'Long', 'Float', 'Double'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n columnsAllowed: true,\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n label: new ComponentController<ScatterplotUmapUIState, 'label'>({\n componentName: 'label',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: false,\n },\n }),\n size: new ComponentController<ScatterplotUmapUIState, 'size'>({\n componentName: 'size',\n allowedTypes: ['Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n },\n {\n filters: new ComponentController<ScatterplotUmapUIState, 'filters'>({\n componentName: 'filters',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n checkSourceBySpec: checkSourceBySpecForFilters\n }),\n tabBy: new ComponentController<ScatterplotUmapUIState, 'tabBy'>({\n componentName: 'tabBy',\n allowedTypes: ['String', 'Int'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n },\n }),\n highlight: new ComponentController<ScatterplotUmapUIState, 'highlight'>({\n componentName: 'highlight',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: true,\n },\n checkSourceBySpec: checkSourceBySpecForFilters\n }),\n }\n );\n }\n\n async getMustBeConsumedAxes(store: DataStore, state: ScatterplotUmapUIState):Promise<Set<string>> {\n if (!state.components.x.selectorStates.length || !state.components.y.selectorStates.length) {\n return new Set<string>();\n }\n const sourceIdX = state.components.x.selectorStates[0].selectedSource;\n const sourceIdY = state.components.y.selectorStates[0].selectedSource;\n const specX = await store.pFrameProvider.getColumnSpecById(columnOrAxisIdFromString(sourceIdX));\n const specY = await store.pFrameProvider.getColumnSpecById(columnOrAxisIdFromString(sourceIdY));\n if (!specX || !specY) {\n return new Set<string>();\n }\n const axesX = specX.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const axesY = specY.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const hangingX = axesX.filter(axisKey => !axesY.some(id => id === axisKey));\n const hangingY = axesY.filter(axisKey => !axesX.some(id => id === axisKey));\n\n return new Set<string>([...hangingX, ...hangingY])\n }\n\n async createDataByColumns(store: DataStore, state: ScatterplotUmapUIState): Promise<PlotDataAndSettings['data']> {\n const xColumnIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yColumnIdString = state.components.y.selectorStates[0]?.selectedSource;\n if (!xColumnIdString || !yColumnIdString) {\n throw Error('X or Y column is not valid');\n }\n const xId = columnOrAxisIdFromString(xColumnIdString);\n const yId = columnOrAxisIdFromString(yColumnIdString);\n if (!xId || !yId) {\n throw Error('X or Y column is not valid');\n }\n const dataByColumns: DataByColumns = {\n type: 'columns',\n id: canonicalize(state.components) ?? '',\n values: {},\n };\n\n const linkerMap = await createLinkerMap(store);\n\n const filterSelectedStates = [\n ...state.components.filters.selectorStates,\n ...state.components.tabBy.selectorStates\n ]\n // filters for column/axes data requests\n const filters = getFiltersFromStates(filterSelectedStates);\n const filterColumns = filterSelectedStates.map(s => columnOrAxisIdFromString(s.selectedSource)).filter(isColumnId);\n\n const parentSources = [xId, yId].filter(isColumnId).map(item => item.toCanonicalString());\n if (parentSources.length === 0) {\n throw Error('One of X and Y should be a column');\n }\n const parentAxesList = await getAxesSpecsFromSources(store, parentSources);\n\n const primarySources = [xId, yId, ...filterColumns];\n const secondarySources: (ColumnId | AxisId)[] = [];\n const primarySourcesFixedAxes:{idx: number, value: PValue}[][] = [[], []];\n const secondarySourcesFixedAxes:{idx: number, value: PValue}[][] = [];\n const linkerColumns:ColumnId[] = [];\n\n for (const {selectedSource, fixedAxes} of filterSelectedStates) {\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n parentAxesList,\n selectedSource,\n fixedAxes\n ));\n primarySourcesFixedAxes.push(\n (fixedAxes ?? []).map(({axisIdx, axisValue}) => ({idx: axisIdx, value: axisValue as PValue}))\n );\n }\n\n const inputs = [\n state.components.grouping,\n state.components.facetBy,\n state.components.tooltipContent,\n state.components.label,\n state.components.highlight,\n state.components.size,\n ];\n for (const input of inputs) {\n for (const {selectedSource, fixedAxes} of input.selectorStates) {\n secondarySources.push(columnOrAxisIdFromString(selectedSource)!);\n secondarySourcesFixedAxes.push(\n (fixedAxes ?? []).map(({axisIdx, axisValue}) => ({idx: axisIdx, value: axisValue as PValue}))\n );\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n parentAxesList,\n selectedSource,\n fixedAxes\n ));\n const labelsColumnId = await getColumnOrAxisValueLabelsId(store, selectedSource, parentSources);\n if (labelsColumnId) {\n secondarySources.push(labelsColumnId);\n }\n }\n }\n\n const data = await store.pFrameProvider.getTableOuterJoin(\n [xId, yId, ...linkerColumns, ...filterColumns],\n secondarySources,\n filters,\n false,\n primarySourcesFixedAxes,\n secondarySourcesFixedAxes\n );\n\n [...primarySources, ...secondarySources].forEach(item => {\n const key = item.toCanonicalString();\n dataByColumns.values[key] = isColumnId(item) ? data.columnsData[key] : data.axesData[key];\n });\n\n if (state.components.highlight.selectorStates.length) {\n dataByColumns.values['highlight'] = createHighlightColumn(state.components.highlight.selectorStates, data) as PValue[];\n }\n\n return {\n byColumns: dataByColumns,\n axesData: data.axesData\n };\n }\n\n async createChartSettings(store: DataStore, state: ScatterplotUmapUIState): Promise<Record<string, unknown>> {\n const xIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yIdString = state.components.y.selectorStates[0]?.selectedSource;\n const xIdWithQ = xIdString ? columnOrAxisIdFromString(xIdString) : null;\n const yIdWithQ = yIdString ? columnOrAxisIdFromString(yIdString) : null;\n if (!xIdString || !yIdString || !xIdWithQ || !yIdWithQ || (!isColumnId(xIdWithQ) && !isColumnId(yIdWithQ))) {\n throw Error('Empty or invalid required data');\n }\n\n const parentSources = [xIdWithQ, yIdWithQ].filter(isColumnId).map(item => item.toCanonicalString());\n const x = {\n type: 'column',\n value: xIdString,\n label: await getColumnOrAxisLabel(store, xIdString, parentSources),\n };\n const y = {\n type: 'column',\n value: yIdString,\n label: await getColumnOrAxisLabel(store, yIdString, parentSources),\n };\n const keyColumn = {\n type: 'column',\n value: 'key',\n };\n const facetBy = await Promise.all(\n state.components.facetBy.selectorStates.map(async selectorState => ({\n type: 'column',\n value:\n (await getColumnOrAxisValueLabelsId(store, selectorState.selectedSource, parentSources))?.toCanonicalString() ??\n selectorState.selectedSource,\n }))\n );\n const allGroupingIds = lodash.uniq([\n ...state.components.grouping.selectorStates.map(s => s.selectedSource),\n ...state.components.size.selectorStates.map(s => s.selectedSource),\n ]);\n const grouping = await Promise.all(\n allGroupingIds.map(async idString => {\n return {\n columnName: {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, idString, parentSources)) || idString,\n value: idString,\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, idString, parentSources))?.toCanonicalString() ??\n idString,\n }\n }\n })\n );\n\n const tooltipContent = await Promise.all(\n state.components.tooltipContent.selectorStates.map(async selectorState => {\n const source = selectorState.selectedSource;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n return {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, source, parentSources)) || source,\n value: source,\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, source, parentSources))?.toCanonicalString() ??\n source,\n format: spec?.annotations?.[FORMAT]\n };\n })\n );\n\n let label;\n if (state.components.label.selectorStates.length) {\n const source = state.components.label.selectorStates[0].selectedSource;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n label = {\n type: 'column',\n value: source,\n label: await getColumnOrAxisLabel(store, source, parentSources),\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, source, parentSources))?.toCanonicalString() ??\n source,\n format: spec?.annotations?.[FORMAT]\n };\n }\n\n let highlight;\n if (state.components.highlight.selectorStates.length) {\n highlight = {\n type: 'column',\n value: 'highlight'\n }\n }\n return {\n type: 'scatterplot-umap',\n x,\n y,\n keyColumn,\n facetBy,\n grouping,\n label,\n highlight,\n tooltips: {\n show: true,\n content: tooltipContent\n }\n };\n }\n}\n"],"names":["InitialScatterplotUmapState","ScatterplotUmapStateController","ControllerBase","ComponentController","checkSourceBySpecForFilters","__publicField","store","state","sourceIdX","sourceIdY","specX","columnOrAxisIdFromString","specY","axesX","s","AxisId","axesY","hangingX","axisKey","id","hangingY","xColumnIdString","_a","yColumnIdString","_b","xId","yId","dataByColumns","canonicalize","linkerMap","createLinkerMap","filterSelectedStates","filters","getFiltersFromStates","filterColumns","isColumnId","parentSources","item","parentAxesList","getAxesSpecsFromSources","primarySources","secondarySources","primarySourcesFixedAxes","secondarySourcesFixedAxes","linkerColumns","selectedSource","fixedAxes","getLinkerColumnsForSource","axisIdx","axisValue","inputs","input","labelsColumnId","getColumnOrAxisValueLabelsId","data","key","createHighlightColumn","xIdString","yIdString","xIdWithQ","yIdWithQ","x","getColumnOrAxisLabel","y","keyColumn","facetBy","selectorState","allGroupingIds","lodash","grouping","idString","tooltipContent","source","spec","getColumnOrAxisSpec","FORMAT","label","_c","_d","highlight"],"mappings":";;;;;;;;AA0CO,MAAMA,KAAsD;AAAA,EAC/D,MAAM;AAAA,EACN,YAAY;AAAA,IACR,GAAG,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACpC,GAAG,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACpC,SAAS,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC1C,WAAW,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC5C,OAAO,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACxC,SAAS,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC1C,UAAU,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC3C,OAAO,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACxC,gBAAgB,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACjD,MAAM,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAE;AAAA,EAAA;AAAA,EAE7C,aAAa,CA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AAAA,EAEjB;AAER;","x_google_ignoreList":[0]}
@@ -0,0 +1,323 @@
1
+ import j from "../../_virtual/canonicalize.js";
2
+ import M from "../../_virtual/lodash.js";
3
+ import { FORMAT as T } from "../../constants.js";
4
+ import { ControllerBase as V } from "../ControllerBase.js";
5
+ import { ComponentController as p } from "../ComponentController.js";
6
+ import { columnOrAxisIdFromString as u, AxisId as N, isColumnId as b } from "../../spec.js";
7
+ import { checkSourceBySpecForFilters as k, createLinkerMap as X, getFiltersFromStates as Y, getAxesSpecsFromSources as H, getLinkerColumnsForSource as z, getColumnOrAxisValueLabelsId as D, createHighlightColumn as J, getColumnOrAxisLabel as I, getColumnOrAxisSpec as E } from "../../utils.js";
8
+ var Q = Object.defineProperty, R = (h, t, e) => t in h ? Q(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e, U = (h, t, e) => R(h, t + "", e);
9
+ const oe = {
10
+ type: "scatterplot",
11
+ components: {
12
+ x: { type: "simple", selectorStates: [] },
13
+ y: { type: "simple", selectorStates: [] },
14
+ filters: { type: "filter", selectorStates: [] },
15
+ highlight: { type: "filter", selectorStates: [] },
16
+ tabBy: { type: "filter", selectorStates: [] },
17
+ facetBy: { type: "simple", selectorStates: [] },
18
+ grouping: { type: "simple", selectorStates: [] },
19
+ shape: { type: "simple", selectorStates: [] },
20
+ size: { type: "simple", selectorStates: [] },
21
+ label: { type: "simple", selectorStates: [] },
22
+ tooltipContent: { type: "simple", selectorStates: [] }
23
+ },
24
+ dividedAxes: {}
25
+ };
26
+ class ne extends V {
27
+ constructor() {
28
+ super(
29
+ {
30
+ x: new p({
31
+ componentName: "x",
32
+ allowedTypes: ["Int", "Long", "Double", "Float"],
33
+ parentComponents: ["y"],
34
+ strictlyDependsOnParents: !1,
35
+ settings: {
36
+ isDataComponent: !0,
37
+ required: !0,
38
+ axesAllowed: !0,
39
+ columnsAllowed: !0
40
+ }
41
+ }),
42
+ y: new p({
43
+ componentName: "y",
44
+ allowedTypes: ["Int", "Long", "Double", "Float"],
45
+ parentComponents: ["x"],
46
+ strictlyDependsOnParents: !1,
47
+ settings: {
48
+ isDataComponent: !0,
49
+ required: !0,
50
+ axesAllowed: !0,
51
+ columnsAllowed: !0
52
+ }
53
+ }),
54
+ facetBy: new p({
55
+ componentName: "facetBy",
56
+ allowedTypes: ["String", "Int", "Long"],
57
+ strictlyDependsOnParents: !0,
58
+ parentComponents: ["x", "y"],
59
+ dependsOn: ["x", "y"],
60
+ settings: {
61
+ axesAllowed: !0,
62
+ dimensionConsumer: !0,
63
+ multipleSelectors: !0
64
+ }
65
+ }),
66
+ grouping: new p({
67
+ componentName: "grouping",
68
+ allowedTypes: ["String", "Int", "Long", "Double", "Float"],
69
+ strictlyDependsOnParents: !0,
70
+ parentComponents: ["x", "y"],
71
+ dependsOn: ["x", "y"],
72
+ settings: {
73
+ axesAllowed: !0,
74
+ multipleSelectors: !0
75
+ }
76
+ }),
77
+ shape: new p({
78
+ componentName: "shape",
79
+ allowedTypes: ["String", "Int", "Long"],
80
+ strictlyDependsOnParents: !0,
81
+ parentComponents: ["x", "y"],
82
+ dependsOn: ["x", "y"],
83
+ settings: {
84
+ axesAllowed: !0
85
+ }
86
+ }),
87
+ size: new p({
88
+ componentName: "size",
89
+ allowedTypes: ["Int", "Long", "Double", "Float"],
90
+ strictlyDependsOnParents: !0,
91
+ parentComponents: ["x", "y"],
92
+ dependsOn: ["x", "y"],
93
+ settings: {
94
+ axesAllowed: !0
95
+ }
96
+ }),
97
+ tooltipContent: new p({
98
+ componentName: "tooltipContent",
99
+ allowedTypes: ["String", "Int", "Long", "Float", "Double"],
100
+ strictlyDependsOnParents: !0,
101
+ parentComponents: ["x", "y"],
102
+ dependsOn: ["x", "y"],
103
+ settings: {
104
+ columnsAllowed: !0,
105
+ axesAllowed: !0,
106
+ multipleSelectors: !0
107
+ }
108
+ }),
109
+ label: new p({
110
+ componentName: "label",
111
+ allowedTypes: ["String", "Int", "Long"],
112
+ strictlyDependsOnParents: !0,
113
+ parentComponents: ["x", "y"],
114
+ dependsOn: ["x", "y"],
115
+ settings: {
116
+ axesAllowed: !0,
117
+ columnsAllowed: !0,
118
+ multipleSelectors: !1
119
+ }
120
+ })
121
+ },
122
+ {
123
+ filters: new p({
124
+ componentName: "filters",
125
+ allowedTypes: ["String", "Int", "Long", "Double", "Float"],
126
+ strictlyDependsOnParents: !0,
127
+ parentComponents: ["x", "y"],
128
+ dependsOn: ["x", "y"],
129
+ settings: {
130
+ axesAllowed: !0,
131
+ columnsAllowed: !0,
132
+ dimensionConsumer: !0,
133
+ multipleSelectors: !0
134
+ },
135
+ checkSourceBySpec: k
136
+ }),
137
+ tabBy: new p({
138
+ componentName: "tabBy",
139
+ allowedTypes: ["String", "Int"],
140
+ strictlyDependsOnParents: !0,
141
+ parentComponents: ["x", "y"],
142
+ dependsOn: ["x", "y"],
143
+ settings: {
144
+ axesAllowed: !0,
145
+ dimensionConsumer: !0
146
+ }
147
+ }),
148
+ highlight: new p({
149
+ componentName: "highlight",
150
+ allowedTypes: ["String", "Int", "Long", "Double", "Float"],
151
+ strictlyDependsOnParents: !0,
152
+ parentComponents: ["x", "y"],
153
+ dependsOn: ["x", "y"],
154
+ settings: {
155
+ axesAllowed: !0,
156
+ columnsAllowed: !0,
157
+ multipleSelectors: !0
158
+ },
159
+ checkSourceBySpec: k
160
+ })
161
+ }
162
+ ), U(this, "dataInputs", ["x", "y"]);
163
+ }
164
+ async getMustBeConsumedAxes(t, e) {
165
+ if (!e.components.x.selectorStates.length || !e.components.y.selectorStates.length)
166
+ return /* @__PURE__ */ new Set();
167
+ const S = e.components.x.selectorStates[0].selectedSource, g = e.components.y.selectorStates[0].selectedSource, m = await t.pFrameProvider.getColumnSpecById(u(S)), d = await t.pFrameProvider.getColumnSpecById(u(g));
168
+ if (!m || !d)
169
+ return /* @__PURE__ */ new Set();
170
+ const r = m.axesSpec.map((n) => N.fromAxisSpec(n).toCanonicalString()), i = d.axesSpec.map((n) => N.fromAxisSpec(n).toCanonicalString()), c = r.filter((n) => !i.some((w) => w === n)), y = i.filter((n) => !r.some((w) => w === n));
171
+ return /* @__PURE__ */ new Set([...c, ...y]);
172
+ }
173
+ async createDataByColumns(t, e) {
174
+ var S, g;
175
+ const m = (S = e.components.x.selectorStates[0]) == null ? void 0 : S.selectedSource, d = (g = e.components.y.selectorStates[0]) == null ? void 0 : g.selectedSource;
176
+ if (!m || !d)
177
+ throw Error("X or Y column is not valid");
178
+ const r = u(m), i = u(d), c = {
179
+ type: "columns",
180
+ id: j(e.components) ?? "",
181
+ values: {}
182
+ }, y = await X(t), n = [
183
+ ...e.components.filters.selectorStates,
184
+ ...e.components.tabBy.selectorStates
185
+ ], w = Y(n), P = n.map((s) => u(s.selectedSource)).filter(b), A = [r, i].filter(b).map((s) => s.toCanonicalString());
186
+ if (A.length === 0)
187
+ throw Error("One of X and Y should be a column");
188
+ const L = await H(t, A), F = [r, i, ...P], f = [], B = [[], []], O = [], v = [];
189
+ for (const { selectedSource: s, fixedAxes: a } of n)
190
+ v.push(...await z(
191
+ t,
192
+ y,
193
+ L,
194
+ s,
195
+ a
196
+ )), B.push(
197
+ (a ?? []).map(({ axisIdx: C, axisValue: x }) => ({ idx: C, value: x }))
198
+ );
199
+ const o = [
200
+ e.components.grouping,
201
+ e.components.size,
202
+ e.components.shape,
203
+ e.components.tooltipContent,
204
+ e.components.facetBy,
205
+ e.components.label,
206
+ e.components.highlight
207
+ ];
208
+ for (const s of o)
209
+ for (const { selectedSource: a, fixedAxes: C } of s.selectorStates) {
210
+ f.push(u(a)), O.push(
211
+ (C ?? []).map(({ axisIdx: $, axisValue: q }) => ({ idx: $, value: q }))
212
+ ), v.push(...await z(
213
+ t,
214
+ y,
215
+ L,
216
+ a,
217
+ C
218
+ ));
219
+ const x = await D(t, a, A);
220
+ x && f.push(x);
221
+ }
222
+ const l = await t.pFrameProvider.getTableOuterJoin(
223
+ [r, i, ...v, ...P],
224
+ f,
225
+ w,
226
+ !1,
227
+ B,
228
+ O
229
+ );
230
+ return [...F, ...f].forEach((s) => {
231
+ const a = s.toCanonicalString();
232
+ c.values[a] = b(s) ? l.columnsData[a] : l.axesData[a];
233
+ }), c.values.key = new Array(c.values[Object.keys(c.values)[0]].length).fill(0).map((s, a) => a), e.components.highlight.selectorStates.length && (c.values.highlight = J(e.components.highlight.selectorStates, l)), { byColumns: c };
234
+ }
235
+ async createChartSettings(t, e) {
236
+ var S, g, m, d;
237
+ const r = (S = e.components.x.selectorStates[0]) == null ? void 0 : S.selectedSource, i = (g = e.components.y.selectorStates[0]) == null ? void 0 : g.selectedSource, c = r ? u(r) : null, y = i ? u(i) : null;
238
+ if (!r || !i || !c || !y || !b(c) && !b(y))
239
+ throw Error("Empty or invalid required data");
240
+ const n = [c, y].filter(b).map((o) => o.toCanonicalString()), w = {
241
+ type: "column",
242
+ value: r,
243
+ label: await I(t, r, n)
244
+ }, P = {
245
+ type: "column",
246
+ value: i,
247
+ label: await I(t, i, n)
248
+ }, A = {
249
+ type: "column",
250
+ value: "key"
251
+ }, L = await Promise.all(
252
+ e.components.facetBy.selectorStates.map(async (o) => {
253
+ var l;
254
+ return {
255
+ type: "column",
256
+ value: ((l = await D(t, o.selectedSource, n)) == null ? void 0 : l.toCanonicalString()) ?? o.selectedSource
257
+ };
258
+ })
259
+ ), F = M.uniq([
260
+ ...e.components.grouping.selectorStates.map((o) => o.selectedSource),
261
+ ...e.components.size.selectorStates.map((o) => o.selectedSource),
262
+ ...e.components.shape.selectorStates.map((o) => o.selectedSource)
263
+ ]), f = await Promise.all(
264
+ F.map(async (o) => {
265
+ var l;
266
+ return {
267
+ columnName: {
268
+ type: "column",
269
+ label: await I(t, o, n) || o,
270
+ value: o,
271
+ valueLabels: ((l = await D(t, o, n)) == null ? void 0 : l.toCanonicalString()) ?? o
272
+ }
273
+ };
274
+ })
275
+ ), B = await Promise.all(
276
+ e.components.tooltipContent.selectorStates.map(async (o) => {
277
+ var l;
278
+ const s = o.selectedSource, a = u(s), C = await D(t, s, n) ?? a, x = await E(t, s, n);
279
+ return {
280
+ type: "column",
281
+ label: await I(t, s, n) || s,
282
+ value: s,
283
+ valueLabels: C.toCanonicalString(),
284
+ format: (l = x == null ? void 0 : x.annotations) == null ? void 0 : l[T]
285
+ };
286
+ })
287
+ );
288
+ let O;
289
+ if (e.components.label.selectorStates.length) {
290
+ const o = e.components.label.selectorStates[0].selectedSource, l = await E(t, o, n);
291
+ O = {
292
+ type: "column",
293
+ value: o,
294
+ label: await I(t, o, n),
295
+ valueLabels: ((m = await D(t, o, n)) == null ? void 0 : m.toCanonicalString()) ?? o,
296
+ format: (d = l == null ? void 0 : l.annotations) == null ? void 0 : d[T]
297
+ };
298
+ }
299
+ let v;
300
+ return e.components.highlight.selectorStates.length && (v = {
301
+ type: "column",
302
+ value: "highlight"
303
+ }), {
304
+ type: "scatterplot",
305
+ x: w,
306
+ y: P,
307
+ keyColumn: A,
308
+ facetBy: L,
309
+ grouping: f,
310
+ label: O,
311
+ highlight: v,
312
+ tooltips: {
313
+ show: !0,
314
+ content: B
315
+ }
316
+ };
317
+ }
318
+ }
319
+ export {
320
+ oe as InitialScatterplotState,
321
+ ne as ScatterplotStateController
322
+ };
323
+ //# sourceMappingURL=scatterplot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scatterplot.js","sources":["../../../../../../../node_modules/@milaboratories/pf-plots/src/controllers/controllersByChartType/scatterplot.ts"],"sourcesContent":["import canonicalize from 'canonicalize';\nimport lodash from 'lodash';\nimport type {\n ComponentStateFilter,\n ComponentStateSimple,\n DataByColumns,\n InputStateParent,\n} from '../../common';\nimport {FORMAT} from '../../constants';\nimport {PValue} from '../../store';\nimport {ControllerBase, PlotDataAndSettings} from '../ControllerBase';\nimport {ComponentController} from '../ComponentController';\nimport {AxisId, ColumnId} from '../../spec';\nimport {columnOrAxisIdFromString, isColumnId} from '../../spec';\nimport type {DataStore} from '../../store';\nimport {\n checkSourceBySpecForFilters,\n createHighlightColumn,\n createLinkerMap,\n getAxesSpecsFromSources,\n getColumnOrAxisLabel, getColumnOrAxisSpec,\n getColumnOrAxisValueLabelsId,\n getFiltersFromStates,\n getLinkerColumnsForSource,\n} from '../../utils';\n\nexport interface ScatterplotUIState extends InputStateParent<'scatterplot'> {\n type: 'scatterplot';\n components: {\n x: ComponentStateSimple;\n y: ComponentStateSimple;\n filters: ComponentStateFilter;\n highlight: ComponentStateFilter;\n tabBy: ComponentStateFilter;\n facetBy: ComponentStateSimple;\n grouping: ComponentStateSimple;\n shape: ComponentStateSimple;\n size: ComponentStateSimple;\n label: ComponentStateSimple;\n tooltipContent: ComponentStateSimple;\n };\n}\n\nexport const InitialScatterplotState: ScatterplotUIState = {\n type: 'scatterplot',\n components: {\n x: {type: 'simple', selectorStates: []},\n y: {type: 'simple', selectorStates: []},\n filters: {type: 'filter', selectorStates: []},\n highlight: {type: 'filter', selectorStates: []},\n tabBy: {type: 'filter', selectorStates: []},\n facetBy: {type: 'simple', selectorStates: []},\n grouping: {type: 'simple', selectorStates: []},\n shape: {type: 'simple', selectorStates: []},\n size: {type: 'simple', selectorStates: []},\n label: {type: 'simple', selectorStates: []},\n tooltipContent: {type: 'simple', selectorStates: []}\n },\n dividedAxes: {},\n};\n\nexport class ScatterplotStateController extends ControllerBase<ScatterplotUIState> {\n dataInputs = ['x', 'y'];\n\n constructor() {\n super(\n {\n x: new ComponentController<ScatterplotUIState, 'x'>({\n componentName: 'x',\n allowedTypes: ['Int', 'Long', 'Double' , 'Float'],\n parentComponents: ['y'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n y: new ComponentController<ScatterplotUIState, 'y'>({\n componentName: 'y',\n allowedTypes: ['Int', 'Long', 'Double', 'Float'],\n parentComponents: ['x'],\n strictlyDependsOnParents: false,\n settings: {\n isDataComponent: true,\n required: true,\n axesAllowed: true,\n columnsAllowed: true,\n },\n }),\n facetBy: new ComponentController<ScatterplotUIState, 'facetBy'>({\n componentName: 'facetBy',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n }),\n grouping: new ComponentController<ScatterplotUIState, 'grouping'>({\n componentName: 'grouping',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n shape: new ComponentController<ScatterplotUIState, 'shape'>({\n componentName: 'shape',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n size: new ComponentController<ScatterplotUIState, 'size'>({\n componentName: 'size',\n allowedTypes: ['Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n },\n }),\n tooltipContent: new ComponentController<ScatterplotUIState, 'tooltipContent'>({\n componentName: 'tooltipContent',\n allowedTypes: ['String', 'Int', 'Long', 'Float', 'Double'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n columnsAllowed: true,\n axesAllowed: true,\n multipleSelectors: true,\n },\n }),\n label: new ComponentController<ScatterplotUIState, 'label'>({\n componentName: 'label',\n allowedTypes: ['String', 'Int', 'Long'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: false,\n },\n }),\n },\n {\n filters: new ComponentController<ScatterplotUIState, 'filters'>({\n componentName: 'filters',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n dimensionConsumer: true,\n multipleSelectors: true,\n },\n checkSourceBySpec: checkSourceBySpecForFilters\n }),\n tabBy: new ComponentController<ScatterplotUIState, 'tabBy'>({\n componentName: 'tabBy',\n allowedTypes: ['String', 'Int'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n dimensionConsumer: true,\n },\n }),\n highlight: new ComponentController<ScatterplotUIState, 'highlight'>({\n componentName: 'highlight',\n allowedTypes: ['String', 'Int', 'Long', 'Double', 'Float'],\n strictlyDependsOnParents: true,\n parentComponents: ['x', 'y'],\n dependsOn: ['x', 'y'],\n settings: {\n axesAllowed: true,\n columnsAllowed: true,\n multipleSelectors: true,\n },\n checkSourceBySpec: checkSourceBySpecForFilters\n }),\n }\n );\n }\n\n async getMustBeConsumedAxes(store: DataStore, state: ScatterplotUIState):Promise<Set<string>> {\n if (!state.components.x.selectorStates.length || !state.components.y.selectorStates.length) {\n return new Set<string>();\n }\n const sourceIdX = state.components.x.selectorStates[0].selectedSource;\n const sourceIdY = state.components.y.selectorStates[0].selectedSource;\n const specX = await store.pFrameProvider.getColumnSpecById(columnOrAxisIdFromString(sourceIdX));\n const specY = await store.pFrameProvider.getColumnSpecById(columnOrAxisIdFromString(sourceIdY));\n if (!specX || !specY) {\n return new Set<string>();\n }\n const axesX = specX.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const axesY = specY.axesSpec.map((s) => AxisId.fromAxisSpec(s).toCanonicalString());\n const hangingX = axesX.filter(axisKey => !axesY.some(id => id === axisKey));\n const hangingY = axesY.filter(axisKey => !axesX.some(id => id === axisKey));\n\n return new Set<string>([...hangingX, ...hangingY])\n }\n\n async createDataByColumns(store: DataStore, state: ScatterplotUIState): Promise<PlotDataAndSettings['data']> {\n const xColumnIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yColumnIdString = state.components.y.selectorStates[0]?.selectedSource;\n if (!xColumnIdString || !yColumnIdString) {\n throw Error('X or Y column is not valid');\n }\n const xId = columnOrAxisIdFromString(xColumnIdString);\n const yId = columnOrAxisIdFromString(yColumnIdString);\n const dataByColumns: DataByColumns = {\n type: 'columns',\n id: canonicalize(state.components) ?? '',\n values: {},\n };\n\n const linkerMap = await createLinkerMap(store);\n\n const filterSelectedStates = [\n ...state.components.filters.selectorStates,\n ...state.components.tabBy.selectorStates\n ]\n // filters for column/axes data requests\n const filters = getFiltersFromStates(filterSelectedStates);\n const filterColumns = filterSelectedStates.map(s => columnOrAxisIdFromString(s.selectedSource)).filter(isColumnId);\n\n const parentSources = [xId, yId].filter(isColumnId).map(item => item.toCanonicalString());\n\n if (parentSources.length === 0) {\n throw Error('One of X and Y should be a column');\n }\n const parentAxesList = await getAxesSpecsFromSources(store, parentSources);\n\n const primarySources = [xId, yId, ...filterColumns];\n const secondarySources: (ColumnId | AxisId)[] = [];\n const primarySourcesFixedAxes:{idx: number, value: PValue}[][] = [[], []];\n const secondarySourcesFixedAxes:{idx: number, value: PValue}[][] = [];\n const linkerColumns:ColumnId[] = [];\n\n for (const {selectedSource, fixedAxes} of filterSelectedStates) {\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n parentAxesList,\n selectedSource,\n fixedAxes\n ));\n primarySourcesFixedAxes.push(\n (fixedAxes ?? []).map(({axisIdx, axisValue}) => ({idx: axisIdx, value: axisValue as PValue}))\n );\n }\n\n const inputs = [\n state.components.grouping,\n state.components.size,\n state.components.shape,\n state.components.tooltipContent,\n state.components.facetBy,\n state.components.label,\n state.components.highlight,\n ];\n for (const input of inputs) {\n for (const {selectedSource, fixedAxes} of input.selectorStates) {\n secondarySources.push(columnOrAxisIdFromString(selectedSource)!);\n secondarySourcesFixedAxes.push(\n (fixedAxes ?? []).map(({axisIdx, axisValue}) => ({idx: axisIdx, value: axisValue as PValue}))\n );\n linkerColumns.push(...await getLinkerColumnsForSource(\n store,\n linkerMap,\n parentAxesList,\n selectedSource,\n fixedAxes\n ));\n const labelsColumnId = await getColumnOrAxisValueLabelsId(store, selectedSource, parentSources);\n if (labelsColumnId) {\n secondarySources.push(labelsColumnId);\n }\n }\n }\n\n const data = await store.pFrameProvider.getTableOuterJoin(\n [xId, yId, ...linkerColumns, ...filterColumns],\n secondarySources,\n filters,\n false,\n primarySourcesFixedAxes,\n secondarySourcesFixedAxes\n );\n\n [...primarySources, ...secondarySources].forEach(item => {\n const key = item.toCanonicalString();\n dataByColumns.values[key] = isColumnId(item) ? data.columnsData[key] : data.axesData[key];\n });\n\n dataByColumns.values['key'] = new Array(dataByColumns.values[Object.keys(dataByColumns.values)[0]].length).fill(0).map((_v, idx) => idx);\n\n if (state.components.highlight.selectorStates.length) {\n dataByColumns.values['highlight'] = createHighlightColumn(state.components.highlight.selectorStates, data) as PValue[];\n }\n\n return {byColumns: dataByColumns};\n }\n\n async createChartSettings(store: DataStore, state: ScatterplotUIState): Promise<Record<string, unknown>> {\n const xIdString = state.components.x.selectorStates[0]?.selectedSource;\n const yIdString = state.components.y.selectorStates[0]?.selectedSource;\n const xIdWithQ = xIdString ? columnOrAxisIdFromString(xIdString) : null;\n const yIdWithQ = yIdString ? columnOrAxisIdFromString(yIdString) : null;\n if (!xIdString || !yIdString || !xIdWithQ || !yIdWithQ || (!isColumnId(xIdWithQ) && !isColumnId(yIdWithQ))) {\n throw Error('Empty or invalid required data');\n }\n\n const parentSources = [xIdWithQ, yIdWithQ].filter(isColumnId).map(item => item.toCanonicalString());\n const x = {\n type: 'column',\n value: xIdString,\n label: await getColumnOrAxisLabel(store, xIdString, parentSources),\n };\n const y = {\n type: 'column',\n value: yIdString,\n label: await getColumnOrAxisLabel(store, yIdString, parentSources),\n };\n const keyColumn = {\n type: 'column',\n value: 'key',\n };\n const facetBy = await Promise.all(\n state.components.facetBy.selectorStates.map(async selectorState => ({\n type: 'column',\n value:\n (await getColumnOrAxisValueLabelsId(store, selectorState.selectedSource, parentSources))?.toCanonicalString() ??\n selectorState.selectedSource,\n }))\n );\n const allGroupingIds = lodash.uniq([\n ...state.components.grouping.selectorStates.map(s => s.selectedSource),\n ...state.components.size.selectorStates.map(s => s.selectedSource),\n ...state.components.shape.selectorStates.map(s => s.selectedSource),\n ]);\n const grouping = await Promise.all(\n allGroupingIds.map(async idString => {\n return {\n columnName: {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, idString, parentSources)) || idString,\n value: idString,\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, idString, parentSources))?.toCanonicalString() ??\n idString,\n }\n };\n })\n );\n\n const tooltipContent = await Promise.all(\n state.components.tooltipContent.selectorStates.map(async selectorState => {\n const source = selectorState.selectedSource;\n const id = columnOrAxisIdFromString(source);\n const labelColumn = (await getColumnOrAxisValueLabelsId(store, source, parentSources)) ?? id;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n return {\n type: 'column',\n label: (await getColumnOrAxisLabel(store, source, parentSources)) || source,\n value: source,\n valueLabels: labelColumn.toCanonicalString(),\n format: spec?.annotations?.[FORMAT]\n };\n })\n );\n\n let label;\n if (state.components.label.selectorStates.length) {\n const source = state.components.label.selectorStates[0].selectedSource;\n const spec = await getColumnOrAxisSpec(store, source, parentSources);\n label = {\n type: 'column',\n value: source,\n label: await getColumnOrAxisLabel(store, source, parentSources),\n valueLabels:\n (await getColumnOrAxisValueLabelsId(store, source, parentSources))?.toCanonicalString() ??\n source,\n format: spec?.annotations?.[FORMAT]\n };\n }\n let highlight;\n if (state.components.highlight.selectorStates.length) {\n highlight = {\n type: 'column',\n value: 'highlight'\n }\n }\n return {\n type: 'scatterplot',\n x,\n y,\n keyColumn,\n facetBy,\n grouping,\n label,\n highlight,\n tooltips: {\n show: true,\n content: tooltipContent\n }\n };\n }\n}\n"],"names":["InitialScatterplotState","ScatterplotStateController","ControllerBase","ComponentController","checkSourceBySpecForFilters","__publicField","store","state","sourceIdX","sourceIdY","specX","columnOrAxisIdFromString","specY","axesX","s","AxisId","axesY","hangingX","axisKey","id","hangingY","xColumnIdString","_a","yColumnIdString","_b","xId","yId","dataByColumns","canonicalize","linkerMap","createLinkerMap","filterSelectedStates","filters","getFiltersFromStates","filterColumns","isColumnId","parentSources","item","parentAxesList","getAxesSpecsFromSources","primarySources","secondarySources","primarySourcesFixedAxes","secondarySourcesFixedAxes","linkerColumns","selectedSource","fixedAxes","getLinkerColumnsForSource","axisIdx","axisValue","inputs","input","labelsColumnId","getColumnOrAxisValueLabelsId","data","key","_v","idx","createHighlightColumn","xIdString","yIdString","xIdWithQ","yIdWithQ","x","getColumnOrAxisLabel","y","keyColumn","facetBy","selectorState","allGroupingIds","lodash","grouping","idString","tooltipContent","source","labelColumn","spec","getColumnOrAxisSpec","FORMAT","label","_c","_d","highlight"],"mappings":";;;;;;;;AA2CO,MAAMA,KAA8C;AAAA,EACvD,MAAM;AAAA,EACN,YAAY;AAAA,IACR,GAAG,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACpC,GAAG,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACpC,SAAS,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC1C,WAAW,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC5C,OAAO,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACxC,SAAS,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC1C,UAAU,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IAC3C,OAAO,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACxC,MAAM,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACvC,OAAO,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAA;AAAA,IACxC,gBAAgB,EAAC,MAAM,UAAU,gBAAgB,CAAA,EAAE;AAAA,EAAA;AAAA,EAEvD,aAAa,CAAA;AACjB;AAEO,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,QACJ,SAAQO,IAAAL,KAAA,gBAAAA,EAAM,gBAAN,gBAAAK,EAAoBH,CAAAA;AAAAA,MAAA;AAAA,IAChC;AAEA,QAAAI;AACJ,WAAI3E,EAAM,WAAW,UAAU,eAAe,WAC9B2E,IAAA;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IAAA,IAGR;AAAA,MACH,MAAM;AAAA,MACN,GAAAnB;AAAA,MACA,GAAAE;AAAAA,MACA,WAAAC;AAAAA,MACA,SAAAC;AAAAA,MACA,UAAAI;AAAAA,MACA,OAAAQ;AAAAA,MACA,WAAAG;AAAAA,MACA,UAAU;AAAA,QACN,MAAM;AAAA,QACN,SAAST;AAAAA,MAAA;AAAA,IAAA;AAAA,EAEjB;AAER;","x_google_ignoreList":[0]}
@@ -0,0 +1,11 @@
1
+ import { ColumnsProvider as l } from "./pframe/ColumnsProvider.js";
2
+ var m = Object.defineProperty, u = (r, e, i) => e in r ? m(r, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : r[e] = i, t = (r, e, i) => u(r, typeof e != "symbol" ? e + "" : e, i);
3
+ class f {
4
+ constructor(e, i, a = (o, s) => s ?? o) {
5
+ t(this, "pFrameProvider"), t(this, "labelsModifier"), this.labelsModifier = a, this.pFrameProvider = new l(e, i);
6
+ }
7
+ }
8
+ export {
9
+ f as DemoDataStore
10
+ };
11
+ //# sourceMappingURL=demoStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demoStore.js","sources":["../../../../../node_modules/@milaboratories/pf-plots/src/demoStore.ts"],"sourcesContent":["import type {DataStore} from './store';\nimport {ColumnsProvider} from './pframe/ColumnsProvider';\nimport type {PFrameDriver, PFrameHandle} from '@milaboratories/pl-model-common';\n\nexport class DemoDataStore implements DataStore {\n readonly pFrameProvider: ColumnsProvider;\n readonly labelsModifier;\n constructor(pframeHandle: PFrameHandle, pframeDriver: PFrameDriver, labelsModifier: (id: string, label: string) => string = (id: string, label: string) => label ?? id) {\n this.labelsModifier = labelsModifier;\n this.pFrameProvider = new ColumnsProvider(pframeHandle, pframeDriver);\n }\n}\n"],"names":["DemoDataStore","pframeHandle","pframeDriver","labelsModifier","id","label","__publicField","ColumnsProvider"],"mappings":";;AAIO,MAAMA,EAAmC;AAAA,EAG5C,YAAYC,GAA4BC,GAA4BC,IAAwD,CAACC,GAAYC,MAAkBA,KAASD,GAAI;AAF/JE,IAAAA,EAAA,MAAA,gBAAA,GACAA,EAAA,MAAA,gBAAA,GAEL,KAAK,iBAAiBH,GACtB,KAAK,iBAAiB,IAAII,EAAgBN,GAAcC,CAAY;AAAA,EAAA;AAE5E;","x_google_ignoreList":[0]}