@gooddata/sdk-ui-ext 11.68.0-alpha.0 → 11.68.0-alpha.10

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 (239) hide show
  1. package/NOTICE +8338 -63070
  2. package/esm/insightPicker/InsightPickerCore.d.ts +1 -1
  3. package/esm/insightPicker/InsightPickerCore.d.ts.map +1 -1
  4. package/esm/insightPicker/InsightPickerCore.js +8 -6
  5. package/esm/insightPicker/InsightPickerMenu.d.ts +1 -1
  6. package/esm/insightPicker/InsightPickerMenu.d.ts.map +1 -1
  7. package/esm/insightPicker/InsightPickerMenu.js +5 -1
  8. package/esm/insightPicker/types.d.ts +5 -1
  9. package/esm/insightPicker/types.d.ts.map +1 -1
  10. package/esm/insightPicker/useInsightPickerHybridSearch.d.ts.map +1 -1
  11. package/esm/insightPicker/useInsightPickerHybridSearch.js +2 -0
  12. package/esm/insightView/InsightRenderer.d.ts.map +1 -1
  13. package/esm/insightView/InsightRenderer.js +4 -4
  14. package/esm/internal/components/BaseVisualization.d.ts.map +1 -1
  15. package/esm/internal/components/BaseVisualization.js +7 -7
  16. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/AttributeHierarchyDialogFooter.js +2 -2
  17. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/AttributeHierarchyDialogProvider.d.ts.map +1 -1
  18. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/AttributeHierarchyDialogProvider.js +4 -4
  19. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/useBackendProvider.d.ts.map +1 -1
  20. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/useBackendProvider.js +2 -2
  21. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.d.ts.map +1 -1
  22. package/esm/internal/components/attributeHierarchies/attributeHierarchyDialog/utils.js +2 -2
  23. package/esm/internal/components/configurationControls/CheckboxControl.d.ts.map +1 -1
  24. package/esm/internal/components/configurationControls/CheckboxControl.js +3 -3
  25. package/esm/internal/components/configurationControls/ConfigSection.d.ts.map +1 -1
  26. package/esm/internal/components/configurationControls/ConfigSection.js +3 -3
  27. package/esm/internal/components/configurationControls/ConfigSubsection.d.ts.map +1 -1
  28. package/esm/internal/components/configurationControls/ConfigSubsection.js +3 -3
  29. package/esm/internal/components/configurationControls/ContinuousLineControl.js +3 -3
  30. package/esm/internal/components/configurationControls/DistintcPointShapesControl.js +3 -3
  31. package/esm/internal/components/configurationControls/DropdownControl.d.ts.map +1 -1
  32. package/esm/internal/components/configurationControls/DropdownControl.js +3 -3
  33. package/esm/internal/components/configurationControls/GeoViewportControl.d.ts.map +1 -1
  34. package/esm/internal/components/configurationControls/GeoViewportControl.js +14 -14
  35. package/esm/internal/components/configurationControls/InputControl.d.ts.map +1 -1
  36. package/esm/internal/components/configurationControls/InputControl.js +4 -4
  37. package/esm/internal/components/configurationControls/LineShapeControl.d.ts.map +1 -1
  38. package/esm/internal/components/configurationControls/LineShapeControl.js +3 -2
  39. package/esm/internal/components/configurationControls/PagingSection.js +5 -5
  40. package/esm/internal/components/configurationControls/PivotTableTextWrappingControl.d.ts.map +1 -1
  41. package/esm/internal/components/configurationControls/PivotTableTextWrappingControl.js +3 -3
  42. package/esm/internal/components/configurationControls/PushpinShapeControl.d.ts.map +1 -1
  43. package/esm/internal/components/configurationControls/PushpinShapeControl.js +5 -5
  44. package/esm/internal/components/configurationControls/advanced/AdvancedSection.d.ts.map +1 -1
  45. package/esm/internal/components/configurationControls/advanced/AdvancedSection.js +3 -3
  46. package/esm/internal/components/configurationControls/colors/ColorsSection.js +3 -3
  47. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorCheckbox.d.ts.map +1 -1
  48. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorCheckbox.js +4 -4
  49. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorItem.d.ts.map +1 -1
  50. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorItem.js +3 -3
  51. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorResetButton.d.ts.map +1 -1
  52. package/esm/internal/components/configurationControls/comparison/indicators/colorsControl/ColorResetButton.js +6 -6
  53. package/esm/internal/components/configurationControls/comparison/values/numberFormat/NumberFormatControl.d.ts.map +1 -1
  54. package/esm/internal/components/configurationControls/comparison/values/numberFormat/NumberFormatControl.js +3 -3
  55. package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingDialog.d.ts.map +1 -1
  56. package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingDialog.js +2 -2
  57. package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.d.ts.map +1 -1
  58. package/esm/internal/components/configurationControls/conditionalFormatting/ConditionalFormattingSection.js +3 -3
  59. package/esm/internal/components/configurationControls/customTooltip/CustomTooltipSection.js +3 -3
  60. package/esm/internal/components/configurationControls/interactions/InteractionsSection.d.ts +1 -2
  61. package/esm/internal/components/configurationControls/interactions/InteractionsSection.d.ts.map +1 -1
  62. package/esm/internal/components/configurationControls/interactions/InteractionsSection.js +2 -2
  63. package/esm/internal/components/configurationControls/total/TotalSection.d.ts.map +1 -1
  64. package/esm/internal/components/configurationControls/total/TotalSection.js +4 -4
  65. package/esm/internal/components/configurationPanels/BaseChartConfigurationPanel.js +2 -2
  66. package/esm/internal/components/configurationPanels/ConfigurationPanelContent.d.ts.map +1 -1
  67. package/esm/internal/components/configurationPanels/ConfigurationPanelContent.js +1 -2
  68. package/esm/internal/components/configurationPanels/LineChartBasedConfigurationPanel.js +1 -1
  69. package/esm/internal/components/configurationPanels/UnsupportedConfigurationPanel.js +2 -2
  70. package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/granularPermissionUtils.d.ts.map +1 -1
  71. package/esm/internal/components/dialogs/userManagementDialogs/Workspace/WorkspaceItem/granularPermissionUtils.js +3 -3
  72. package/esm/internal/components/dialogs/userManagementDialogs/types.d.ts.map +1 -1
  73. package/esm/internal/components/dialogs/userManagementDialogs/types.js +6 -6
  74. package/esm/internal/components/insightList/useInsightPagedList.d.ts.map +1 -1
  75. package/esm/internal/components/insightList/useInsightPagedList.js +3 -3
  76. package/esm/internal/components/pluggableVisualizations/AbstractPluggableVisualization.d.ts.map +1 -1
  77. package/esm/internal/components/pluggableVisualizations/AbstractPluggableVisualization.js +4 -4
  78. package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.d.ts.map +1 -1
  79. package/esm/internal/components/pluggableVisualizations/PluggableColumnBarCharts.js +3 -4
  80. package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.d.ts.map +1 -1
  81. package/esm/internal/components/pluggableVisualizations/areaChart/PluggableAreaChart.js +6 -6
  82. package/esm/internal/components/pluggableVisualizations/barChart/PluggableBarChart.d.ts.map +1 -1
  83. package/esm/internal/components/pluggableVisualizations/barChart/PluggableBarChart.js +7 -7
  84. package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.d.ts.map +1 -1
  85. package/esm/internal/components/pluggableVisualizations/baseChart/PluggableBaseChart.js +9 -8
  86. package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.d.ts.map +1 -1
  87. package/esm/internal/components/pluggableVisualizations/bubbleChart/PluggableBubbleChart.js +4 -5
  88. package/esm/internal/components/pluggableVisualizations/bulletChart/PluggableBulletChart.d.ts.map +1 -1
  89. package/esm/internal/components/pluggableVisualizations/bulletChart/PluggableBulletChart.js +3 -3
  90. package/esm/internal/components/pluggableVisualizations/columnChart/PluggableColumnChart.d.ts.map +1 -1
  91. package/esm/internal/components/pluggableVisualizations/columnChart/PluggableColumnChart.js +7 -7
  92. package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.d.ts.map +1 -1
  93. package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChart.js +6 -6
  94. package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChartDeprecated.d.ts.map +1 -1
  95. package/esm/internal/components/pluggableVisualizations/comboChart/PluggableComboChartDeprecated.js +5 -4
  96. package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.d.ts.map +1 -1
  97. package/esm/internal/components/pluggableVisualizations/geoAreaChart/PluggableGeoAreaChart.js +4 -5
  98. package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.d.ts.map +1 -1
  99. package/esm/internal/components/pluggableVisualizations/geoChart/PluggableGeoPushpinChart.js +8 -9
  100. package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.d.ts.map +1 -1
  101. package/esm/internal/components/pluggableVisualizations/geoChartNext/PluggableGeoPushpinChartNext.js +15 -16
  102. package/esm/internal/components/pluggableVisualizations/geoCommon/geoPropertySanitization.d.ts.map +1 -1
  103. package/esm/internal/components/pluggableVisualizations/geoCommon/geoPropertySanitization.js +8 -8
  104. package/esm/internal/components/pluggableVisualizations/headline/PluggableHeadline.d.ts.map +1 -1
  105. package/esm/internal/components/pluggableVisualizations/headline/PluggableHeadline.js +2 -3
  106. package/esm/internal/components/pluggableVisualizations/headline/headlineBucketHelper.js +3 -3
  107. package/esm/internal/components/pluggableVisualizations/heatMap/PluggableHeatmap.d.ts.map +1 -1
  108. package/esm/internal/components/pluggableVisualizations/heatMap/PluggableHeatmap.js +8 -7
  109. package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.d.ts.map +1 -1
  110. package/esm/internal/components/pluggableVisualizations/lineChart/PluggableLineChart.js +8 -8
  111. package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.d.ts.map +1 -1
  112. package/esm/internal/components/pluggableVisualizations/mekko/PluggableMekko.js +11 -11
  113. package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.d.ts.map +1 -1
  114. package/esm/internal/components/pluggableVisualizations/pieChart/PluggablePieChart.js +8 -8
  115. package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.d.ts.map +1 -1
  116. package/esm/internal/components/pluggableVisualizations/pivotTable/PluggablePivotTable.js +5 -5
  117. package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableAdditionalFactories.d.ts.map +1 -1
  118. package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableAdditionalFactories.js +2 -2
  119. package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableConfigFromInsight.d.ts.map +1 -1
  120. package/esm/internal/components/pluggableVisualizations/pivotTable/pivotTableConfigFromInsight.js +6 -6
  121. package/esm/internal/components/pluggableVisualizations/pivotTableNext/PluggablePivotTableNext.d.ts.map +1 -1
  122. package/esm/internal/components/pluggableVisualizations/pivotTableNext/PluggablePivotTableNext.js +4 -5
  123. package/esm/internal/components/pluggableVisualizations/pivotTableNext/pivotTableNextAdditionalFactories.d.ts.map +1 -1
  124. package/esm/internal/components/pluggableVisualizations/pivotTableNext/pivotTableNextAdditionalFactories.js +2 -2
  125. package/esm/internal/components/pluggableVisualizations/pivotTableNext/sortHelpers.d.ts.map +1 -1
  126. package/esm/internal/components/pluggableVisualizations/pivotTableNext/sortHelpers.js +2 -2
  127. package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.d.ts.map +1 -1
  128. package/esm/internal/components/pluggableVisualizations/radarChart/PluggableRadarChart.js +4 -4
  129. package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.d.ts.map +1 -1
  130. package/esm/internal/components/pluggableVisualizations/repeater/PluggableRepeater.js +6 -7
  131. package/esm/internal/components/pluggableVisualizations/sankeyChart/PluggableSankeyChart.d.ts.map +1 -1
  132. package/esm/internal/components/pluggableVisualizations/sankeyChart/PluggableSankeyChart.js +3 -4
  133. package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.d.ts.map +1 -1
  134. package/esm/internal/components/pluggableVisualizations/scatterPlot/PluggableScatterPlot.js +5 -6
  135. package/esm/internal/components/pluggableVisualizations/treeMap/PluggableTreemap.d.ts.map +1 -1
  136. package/esm/internal/components/pluggableVisualizations/treeMap/PluggableTreemap.js +6 -5
  137. package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.d.ts.map +1 -1
  138. package/esm/internal/components/pluggableVisualizations/waterfallChart/PluggableWaterfallChart.js +11 -11
  139. package/esm/internal/components/pluggableVisualizations/xirr/PluggableXirr.d.ts.map +1 -1
  140. package/esm/internal/components/pluggableVisualizations/xirr/PluggableXirr.js +2 -3
  141. package/esm/internal/interfaces/Visualization.d.ts.map +1 -1
  142. package/esm/internal/interfaces/Visualization.js +6 -6
  143. package/esm/internal/translations/en-US.localization-bundle.d.ts +28 -0
  144. package/esm/internal/translations/en-US.localization-bundle.d.ts.map +1 -1
  145. package/esm/internal/translations/en-US.localization-bundle.js +29 -1
  146. package/esm/internal/translations/fr-CA.localization-bundle.js +1 -1
  147. package/esm/internal/translations/it-IT.localization-bundle.js +2 -2
  148. package/esm/internal/translations/ru-RU.localization-bundle.js +1 -1
  149. package/esm/internal/translations/tr-TR.localization-bundle.js +1 -1
  150. package/esm/internal/translations/zh-Hant.localization-bundle.js +4 -4
  151. package/esm/internal/utils/bucketConfig.d.ts.map +1 -1
  152. package/esm/internal/utils/bucketConfig.js +5 -5
  153. package/esm/internal/utils/bucketHelper.d.ts.map +1 -1
  154. package/esm/internal/utils/bucketHelper.js +15 -14
  155. package/esm/internal/utils/bucketRules.d.ts.map +1 -1
  156. package/esm/internal/utils/bucketRules.js +3 -2
  157. package/esm/internal/utils/colors.d.ts.map +1 -1
  158. package/esm/internal/utils/colors.js +11 -11
  159. package/esm/internal/utils/controlsHelper.d.ts.map +1 -1
  160. package/esm/internal/utils/controlsHelper.js +7 -7
  161. package/esm/internal/utils/dimensions.d.ts.map +1 -1
  162. package/esm/internal/utils/dimensions.js +4 -4
  163. package/esm/internal/utils/drillablePredicates.d.ts.map +1 -1
  164. package/esm/internal/utils/drillablePredicates.js +4 -4
  165. package/esm/internal/utils/embeddingCodeGenerator/getReactEmbeddingCodeGenerator.d.ts.map +1 -1
  166. package/esm/internal/utils/embeddingCodeGenerator/getReactEmbeddingCodeGenerator.js +11 -10
  167. package/esm/internal/utils/propertiesHelper.d.ts.map +1 -1
  168. package/esm/internal/utils/propertiesHelper.js +16 -15
  169. package/esm/internal/utils/removeUseless.js +3 -3
  170. package/esm/internal/utils/sort.d.ts.map +1 -1
  171. package/esm/internal/utils/sort.js +9 -8
  172. package/esm/internal/utils/translations.d.ts.map +1 -1
  173. package/esm/internal/utils/translations.js +2 -3
  174. package/esm/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.d.ts.map +1 -1
  175. package/esm/internal/utils/uiConfigHelpers/areaChartUiConfigHelper.js +10 -10
  176. package/esm/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.d.ts.map +1 -1
  177. package/esm/internal/utils/uiConfigHelpers/baseChartUiConfigHelper.js +19 -19
  178. package/esm/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.d.ts.map +1 -1
  179. package/esm/internal/utils/uiConfigHelpers/bubbleChartUiConfigHelper.js +8 -8
  180. package/esm/internal/utils/uiConfigHelpers/bulletChartUiConfigHelper.d.ts.map +1 -1
  181. package/esm/internal/utils/uiConfigHelpers/bulletChartUiConfigHelper.js +2 -2
  182. package/esm/internal/utils/uiConfigHelpers/columnBarChartUiConfigHelper.d.ts.map +1 -1
  183. package/esm/internal/utils/uiConfigHelpers/columnBarChartUiConfigHelper.js +6 -6
  184. package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelper.d.ts.map +1 -1
  185. package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelper.js +8 -8
  186. package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelperDeprecated.d.ts.map +1 -1
  187. package/esm/internal/utils/uiConfigHelpers/comboChartUiConfigHelperDeprecated.js +10 -10
  188. package/esm/internal/utils/uiConfigHelpers/dependencyWheelChartUiConfigHelper.js +6 -6
  189. package/esm/internal/utils/uiConfigHelpers/donutChartUiConfigHelper.js +5 -5
  190. package/esm/internal/utils/uiConfigHelpers/funnelChartUiConfigHelper.d.ts.map +1 -1
  191. package/esm/internal/utils/uiConfigHelpers/funnelChartUiConfigHelper.js +6 -6
  192. package/esm/internal/utils/uiConfigHelpers/geoAreaChartUiConfigHelper.d.ts.map +1 -1
  193. package/esm/internal/utils/uiConfigHelpers/geoAreaChartUiConfigHelper.js +3 -3
  194. package/esm/internal/utils/uiConfigHelpers/geoPushpinChartUiConfigHelper.d.ts.map +1 -1
  195. package/esm/internal/utils/uiConfigHelpers/geoPushpinChartUiConfigHelper.js +15 -15
  196. package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.d.ts.map +1 -1
  197. package/esm/internal/utils/uiConfigHelpers/headlineUiConfigHelper.js +10 -10
  198. package/esm/internal/utils/uiConfigHelpers/heatmapUiConfigHelper.d.ts.map +1 -1
  199. package/esm/internal/utils/uiConfigHelpers/heatmapUiConfigHelper.js +7 -7
  200. package/esm/internal/utils/uiConfigHelpers/lineChartUiConfigHelper.d.ts.map +1 -1
  201. package/esm/internal/utils/uiConfigHelpers/lineChartUiConfigHelper.js +13 -13
  202. package/esm/internal/utils/uiConfigHelpers/mekkoUiConfigHelper.d.ts.map +1 -1
  203. package/esm/internal/utils/uiConfigHelpers/mekkoUiConfigHelper.js +7 -7
  204. package/esm/internal/utils/uiConfigHelpers/pieChartUiConfigHelper.d.ts.map +1 -1
  205. package/esm/internal/utils/uiConfigHelpers/pieChartUiConfigHelper.js +12 -12
  206. package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.d.ts.map +1 -1
  207. package/esm/internal/utils/uiConfigHelpers/pivotTableNextUiConfigHelper.js +14 -14
  208. package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.d.ts.map +1 -1
  209. package/esm/internal/utils/uiConfigHelpers/pivotTableUiConfigHelper.js +14 -14
  210. package/esm/internal/utils/uiConfigHelpers/pyramidChartUiConfigHelper.js +5 -5
  211. package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.d.ts.map +1 -1
  212. package/esm/internal/utils/uiConfigHelpers/radarChartUiConfigHelper.js +13 -13
  213. package/esm/internal/utils/uiConfigHelpers/repeaterUiConfigHelper.d.ts.map +1 -1
  214. package/esm/internal/utils/uiConfigHelpers/repeaterUiConfigHelper.js +14 -14
  215. package/esm/internal/utils/uiConfigHelpers/sankeyChartUiConfigHelper.d.ts.map +1 -1
  216. package/esm/internal/utils/uiConfigHelpers/sankeyChartUiConfigHelper.js +10 -10
  217. package/esm/internal/utils/uiConfigHelpers/scatterPlotUiConfigHelper.d.ts.map +1 -1
  218. package/esm/internal/utils/uiConfigHelpers/scatterPlotUiConfigHelper.js +8 -8
  219. package/esm/internal/utils/uiConfigHelpers/treemapUiConfigHelper.d.ts.map +1 -1
  220. package/esm/internal/utils/uiConfigHelpers/treemapUiConfigHelper.js +12 -12
  221. package/esm/internal/utils/uiConfigHelpers/waterfallChartUiConfigHelper.d.ts.map +1 -1
  222. package/esm/internal/utils/uiConfigHelpers/waterfallChartUiConfigHelper.js +11 -11
  223. package/esm/internal/utils/uiConfigHelpers/xirrUiConfigHelper.d.ts.map +1 -1
  224. package/esm/internal/utils/uiConfigHelpers/xirrUiConfigHelper.js +5 -5
  225. package/esm/notificationsPanel/Notification/Notification.d.ts.map +1 -1
  226. package/esm/notificationsPanel/Notification/Notification.js +4 -4
  227. package/esm/sdk-ui-ext.d.ts +6 -2
  228. package/esm/share/ObjectShareDialog.d.ts +1 -1
  229. package/esm/share/ObjectShareDialog.js +3 -3
  230. package/esm/share/messages.d.ts +28 -0
  231. package/esm/share/messages.d.ts.map +1 -1
  232. package/esm/share/messages.js +14 -0
  233. package/esm/share/removeAccessConfirm.d.ts +21 -0
  234. package/esm/share/removeAccessConfirm.d.ts.map +1 -0
  235. package/esm/share/removeAccessConfirm.js +27 -0
  236. package/esm/share/useObjectShareDialog.d.ts +14 -11
  237. package/esm/share/useObjectShareDialog.d.ts.map +1 -1
  238. package/esm/share/useObjectShareDialog.js +54 -24
  239. package/package.json +21 -21
@@ -1,8 +1,9 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
- import { cloneDeep, compact, isEmpty, negate, set, uniqBy, without } from "lodash-es";
2
+ import { negate, without } from "lodash-es";
3
3
  import { areObjRefsEqual, bucketItems, bucketsFind, bucketsMeasures, idRef, insightBuckets, insightVisualizationType, isObjRef, isPoPMeasure, isPreviousPeriodMeasure, isSimpleMeasure, } from "@gooddata/sdk-model";
4
4
  import { BucketNames, OverTimeComparisonTypes, VisualizationTypes, } from "@gooddata/sdk-ui";
5
5
  import { isAreaChart, isBulletChart, isComboChart, isLineChart } from "@gooddata/sdk-ui-charts";
6
+ import { _cloneDeep, _compact, _isEmpty, _set, _uniqBy } from "@gooddata/util";
6
7
  import { subtitles, titles } from "../../locales.js";
7
8
  import { ATTRIBUTE, BUCKETS, DATE, METRIC, SHOW_ON_SECONDARY_AXIS } from "../constants/bucket.js";
8
9
  import { DATE_DATASET_ATTRIBUTE, } from "../interfaces/Visualization.js";
@@ -307,15 +308,15 @@ export function getDateFilter(filtersBucket) {
307
308
  const filters = filterItem.filters ?? [];
308
309
  return filters.find(isDateFilter);
309
310
  });
310
- const dateFilters = compact(dateFiltersInclEmpty);
311
+ const dateFilters = _compact(dateFiltersInclEmpty);
311
312
  return dateFilters.length ? dateFilters[0] : null;
312
313
  }
313
314
  export function getComparisonTypeFromFilters(filtersBucket) {
314
- if (isEmpty(filtersBucket)) {
315
+ if (_isEmpty(filtersBucket)) {
315
316
  return OverTimeComparisonTypes.NOTHING;
316
317
  }
317
318
  const dateFilter = getDateFilter(filtersBucket);
318
- return !isEmpty(dateFilter) && dateFilter.overTimeComparisonType
319
+ return !_isEmpty(dateFilter) && dateFilter.overTimeComparisonType
319
320
  ? dateFilter.overTimeComparisonType
320
321
  : OverTimeComparisonTypes.NOTHING;
321
322
  }
@@ -349,7 +350,7 @@ function bucketSupportsSubtitle(visualizationType, bucketLocalIdentifier) {
349
350
  }
350
351
  export function setBucketTitles(referencePoint, visualizationType, intl) {
351
352
  const buckets = referencePoint?.buckets;
352
- const updatedUiConfig = cloneDeep(referencePoint?.uiConfig);
353
+ const updatedUiConfig = _cloneDeep(referencePoint?.uiConfig);
353
354
  if (!updatedUiConfig) {
354
355
  return updatedUiConfig;
355
356
  }
@@ -362,11 +363,11 @@ export function setBucketTitles(referencePoint, visualizationType, intl) {
362
363
  if (bucketSupportsSubtitle(visualizationType, localIdentifier)) {
363
364
  const subtitleId = generateBucketSubtitleId(localIdentifier, visualizationType);
364
365
  const subtitle = getTranslation(subtitleId, intl);
365
- set(updatedUiConfig, [BUCKETS, localIdentifier, "subtitle"], subtitle);
366
+ _set(updatedUiConfig, [BUCKETS, localIdentifier, "subtitle"], subtitle);
366
367
  }
367
368
  const titleId = generateBucketTitleId(localIdentifier, visualizationType);
368
369
  const title = getTranslation(titleId, intl);
369
- set(updatedUiConfig, [BUCKETS, localIdentifier, "title"], title);
370
+ _set(updatedUiConfig, [BUCKETS, localIdentifier, "title"], title);
370
371
  });
371
372
  return updatedUiConfig;
372
373
  }
@@ -454,7 +455,7 @@ export function getTotalsFromBucket(buckets, bucketName) {
454
455
  }
455
456
  function getUniqueAttributes(buckets) {
456
457
  const attributes = getAllItemsByType(buckets, [ATTRIBUTE, DATE]);
457
- return uniqBy(attributes, (attribute) => attribute?.attribute);
458
+ return _uniqBy(attributes, (attribute) => attribute?.attribute);
458
459
  }
459
460
  export function getMeasuresFromMdObject(insight) {
460
461
  if (!insight) {
@@ -487,7 +488,7 @@ export function getMeasureItems(buckets) {
487
488
  return acc;
488
489
  }, []);
489
490
  // if no preferred items are found, return all available items
490
- if (isEmpty(preferredMeasures)) {
491
+ if (_isEmpty(preferredMeasures)) {
491
492
  return getAllMeasures(buckets);
492
493
  }
493
494
  return preferredMeasures;
@@ -577,7 +578,7 @@ function hasItemsAboveLimit(bucket, itemsLimit) {
577
578
  }
578
579
  function applyItemsLimit(bucket, itemsLimit) {
579
580
  if (itemsLimit !== undefined && hasItemsAboveLimit(bucket, itemsLimit)) {
580
- const newBucket = cloneDeep(bucket);
581
+ const newBucket = _cloneDeep(bucket);
581
582
  newBucket.items = newBucket.items.slice(0, itemsLimit);
582
583
  return newBucket;
583
584
  }
@@ -590,7 +591,7 @@ export function applyUiConfig(referencePoint) {
590
591
  const buckets = referencePoint.buckets;
591
592
  const uiConfig = referencePoint.uiConfig?.buckets;
592
593
  const newBuckets = buckets.map((bucket) => applyUiConfigOnBucket(bucket, uiConfig?.[bucket.localIdentifier]));
593
- set(referencePoint, "buckets", newBuckets);
594
+ _set(referencePoint, "buckets", newBuckets);
594
595
  return referencePoint;
595
596
  }
596
597
  export function hasBucket(buckets, localIdentifier) {
@@ -609,7 +610,7 @@ export function getFirstMasterWithDerived(measureItems) {
609
610
  measureItem === chosenMaster);
610
611
  }
611
612
  export function removeAllArithmeticMeasuresFromDerived(extendedReferencePoint) {
612
- const originalBuckets = cloneDeep(extendedReferencePoint.buckets);
613
+ const originalBuckets = _cloneDeep(extendedReferencePoint.buckets);
613
614
  extendedReferencePoint.buckets.forEach((bucket) => {
614
615
  bucket.items = filterOutArithmeticMeasuresFromDerived(bucket.items, originalBuckets);
615
616
  });
@@ -733,7 +734,7 @@ function getMeasureDependencies(measure, allMeasures) {
733
734
  const dependenciesOfDependency = getMeasureDependencies(directDependency, allMeasures);
734
735
  indirectDependencies.push(...dependenciesOfDependency);
735
736
  });
736
- return uniqBy([...directDependencies, ...indirectDependencies], (dependency) => dependency.localIdentifier);
737
+ return _uniqBy([...directDependencies, ...indirectDependencies], (dependency) => dependency.localIdentifier);
737
738
  }
738
739
  function tryToSelectMeasures(measures, alreadySelectedMeasures, limit) {
739
740
  const measuresToBePlaced = without(measures, ...alreadySelectedMeasures);
@@ -848,7 +849,7 @@ export const getMainRowAttribute = (buckets) => {
848
849
  return attributeItems[0] ?? undefined;
849
850
  };
850
851
  export const cloneBucketItem = (item) => {
851
- const clonedItem = cloneDeep(item);
852
+ const clonedItem = _cloneDeep(item);
852
853
  clonedItem.localIdentifier = clonedItem.localIdentifier + "_cloned";
853
854
  return cloned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O,CAYpF;AAED,wBAAgB,qCAAqC,CAAC,OAAO,EAAE,YAAY,EAAE,WAI5E;AAED,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,YAAY,EAAE,WAM9E"}
@@ -1,6 +1,7 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
- import { isEmpty, reduce } from "lodash-es";
2
+ import { reduce } from "lodash-es";
3
3
  import { BucketNames } from "@gooddata/sdk-ui";
4
+ import { _isEmpty } from "@gooddata/util";
4
5
  import { ALL_TIME, ATTRIBUTE, DATE, METRIC } from "../constants/bucket.js";
5
6
  import { INCREASE_MAX_TABLE_ATTRIBUTES_ITEMS_LIMIT, INCREASE_MAX_TABLE_MEASURE_ITEMS_LIMIT, MAX_METRICS_COUNT, MAX_TABLE_CATEGORIES_COUNT, } from "../constants/uiConfig.js";
6
7
  import { getAllAttributeItems, getAllItemsByType, getAttributeItemsWithoutStacks, getBucketItems, getItemsCount, getMeasureItems, getStackItems, isDateBucketItem, isMeasureValueFilter, isRankingFilter, } from "./bucketHelper.js";
@@ -130,7 +131,7 @@ export function hasNonAllTimeFilter(filters) {
130
131
  return filter?.attribute === "attr.datedataset";
131
132
  });
132
133
  const filterInterval = dateFilter?.filters?.[0]?.interval?.interval ?? [];
133
- return !isEmpty(filterInterval);
134
+ return !_isEmpty(filterInterval);
134
135
  }
135
136
  function hasNoRankingFilter(_, filters) {
136
137
  const allBucketFilters = filters?.items.flatMap((filterItem) => filterItem.filters);
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/colors.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,MAAM,EACX,KAAK,iBAAiB,EASzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,cAAc,EAAiC,MAAM,kBAAkB,CAAC;AAC7G,OAAO,EAAc,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEjF,OAAO,EAAE,KAAK,m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CAA4C,CACxD,UAAU,EAAE,wBAAwB,GAAG,SAAS,EAChD,eAAe,EAAE,MAAM,EAAE,GAC1B,wBAAwB,GAAG,SAAS,CAoBtC;AAED,wBAAgB,kBAAkB,CAC9B,UAAU,EAAE,wBAAwB,EACpC,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,SAAS,GACjD,wBAAwB,CAiE1B"}
@@ -1,8 +1,8 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
- import { cloneDeep, compact, isEmpty, isEqual, set, uniqBy } from "lodash-es";
3
2
  import { isAttributeDescriptor, isColorDescriptor, isColorFromPalette, isMeasureDescriptor, isResultAttributeHeader, isRgbColor, isUriRef, } from "@gooddata/sdk-model";
4
3
  import { getMappingHeaderFormattedName } from "@gooddata/sdk-ui";
5
4
  import { ColorUtils } from "@gooddata/sdk-ui-charts";
5
+ import { _cloneDeep, _compact, _isEmpty, _isEqual, _set, _uniqBy } from "@gooddata/util";
6
6
  /**
7
7
  * Name of the colored item as the list displays it, so that searching matches what the user sees: the
8
8
  * formatted element value for dates and number-formatted attributes, the raw name otherwise.
@@ -11,7 +11,7 @@ function getItemName(item) {
11
11
  return getMappingHeaderFormattedName(item.mappingHeader) || "";
12
12
  }
13
13
  export function getSearchedItems(inputItems, searchString) {
14
- if (isEmpty(searchString)) {
14
+ if (_isEmpty(searchString)) {
15
15
  return inputItems;
16
16
  }
17
17
  return inputItems.filter((item) => {
@@ -94,9 +94,9 @@ function mergeColorMappingToProperties(properties, id, color) {
94
94
  },
95
95
  ];
96
96
  const previousColorMapping = properties?.controls?.["colorMapping"] ?? [];
97
- const mergedMapping = compact(uniqBy([...colorMapping, ...previousColorMapping], "id"));
98
- const newProperties = cloneDeep(properties);
99
- set(newProperties, "controls.colorMapping", mergedMapping);
97
+ const mergedMapping = _compact(_uniqBy([...colorMapping, ...previousColorMapping], "id"));
98
+ const newProperties = _cloneDeep(properties);
99
+ _set(newProperties, "controls.colorMapping", mergedMapping);
100
100
  return newProperties;
101
101
  }
102
102
  export function getProperties(properties, item, color) {
@@ -111,16 +111,16 @@ export function removeColorMappingFromProperties(properties, id) {
111
111
  // a null color instructs the host application to remove the stored entry;
112
112
  // omitting the entry is not enough because hosts merge pushed properties additively
113
113
  const updatedMapping = previousColorMapping.map((item) => item.id === id ? { id, color: null } : item);
114
- const newProperties = cloneDeep(properties);
115
- set(newProperties, "controls.colorMapping", updatedMapping);
114
+ const newProperties = _cloneDeep(properties);
115
+ _set(newProperties, "controls.colorMapping", updatedMapping);
116
116
  return newProperties;
117
117
  }
118
118
  export function getLineStyleProperties(properties, id, lineStyle, lineWidth) {
119
119
  const newEntry = { id, lineStyle, lineWidth };
120
120
  const previousMapping = properties?.controls?.["lineStyleMapping"] ?? [];
121
- const merged = compact(uniqBy([newEntry, ...previousMapping], "id"));
122
- const newProperties = cloneDeep(properties);
123
- set(newProperties, "controls.lineStyleMapping", merged);
121
+ const merged = _compact(_uniqBy([newEntry, ...previousMapping], "id"));
122
+ const newProperties = _cloneDeep(properties);
123
+ _set(newProperties, "controls.lineStyleMapping", merged);
124
124
  return newProperties;
125
125
  }
126
126
  export function getPropertiesWithLineStyleMappingForMeasures(properties, measureLocalIds) {
@@ -158,7 +158,7 @@ export function getValidProperties(properties, colorAssignments) {
158
158
  const assignmentValid = colorAssignments?.find((colorAssignment) => {
159
159
  if (isMeasureDescriptor(colorAssignment.headerItem)) {
160
160
  return (colorAssignment.headerItem.measureHeaderItem.localIdentifier === id &&
161
- isEqual(colorAssignment.color?.value, colorValue));
161
+ _isEqual(colorAssignment.color?.value, colorValue));
162
162
  }
163
163
  else if (isResultAttributeHeader(colorAssignment.headerItem)) {
164
164
  return colorAssignment.headerItem.attributeHeaderItem.uri === id;
@@ -1 +1 @@
1
- {"version":3,"file":"controlsHelper.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/controlsHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,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IAAI,EAAE,SAAS,EACf,KAAK,EAAE,mBAAmB,EAC1B,KAAK,EAAE,mBAAmB,GAAG,qBAAqB,EAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,EACtD,YAAY,EAAE,mBAAmB,GAClC,IAAI,CAsDN;AAED,wBAAgB,2BAA2B,CACvC,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,mBAAmB,EAC1B,KAAK,EAAE,mBAAmB,GAAG,qBAAqB,EAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAAK,IAAI,EACtD,YAAY,EAAE,mBAAmB,GAClC,IAAI,CAuDN;AAED,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,uBAa9F"}
@@ -1,7 +1,7 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
- import { set } from "lodash-es";
3
2
  import { bucketItems, bucketsFind, insightBuckets, insightProperties, } from "@gooddata/sdk-model";
4
3
  import { BucketNames } from "@gooddata/sdk-ui";
4
+ import { _set } from "@gooddata/util";
5
5
  import { messages } from "../../locales.js";
6
6
  import { getMeasureGroupDimensionFromProperties } from "./propertiesHelper.js";
7
7
  import { getTranslation } from "./translations.js";
@@ -31,7 +31,7 @@ export function maxInputValidateAndPushData(data, state, props, setState, defaul
31
31
  const maxNumberValue = fixEmptyMaxValue(maxValue);
32
32
  const maxIsMinus = maxValue === "-";
33
33
  const { propertiesMeta, pushData } = props;
34
- set(propertiesMeta, "undoApplied", false);
34
+ _set(propertiesMeta, "undoApplied", false);
35
35
  // dash, non-numeric or min/max mismatch: set error
36
36
  if (isInvalidOrMinMaxError(maxValue, minNumberValue, maxNumberValue)) {
37
37
  setState({
@@ -52,7 +52,7 @@ export function maxInputValidateAndPushData(data, state, props, setState, defaul
52
52
  // valid, set new value
53
53
  const { properties } = props;
54
54
  if (properties) {
55
- set(properties, `controls.${basePath}.max`, maxValue);
55
+ _set(properties, `controls.${basePath}.max`, maxValue);
56
56
  }
57
57
  // if incorrect value was set previously but now validation passed, set incorrect value as correct value
58
58
  if (isNaN(parseFloat(incorrectMinValue))) {
@@ -62,7 +62,7 @@ export function maxInputValidateAndPushData(data, state, props, setState, defaul
62
62
  }
63
63
  else {
64
64
  if (properties) {
65
- set(properties, `controls.${basePath}.min`, incorrectMinValue);
65
+ _set(properties, `controls.${basePath}.min`, incorrectMinValue);
66
66
  }
67
67
  setState(defaultState);
68
68
  }
@@ -80,7 +80,7 @@ export function minInputValidateAndPushData(data, state, props, setState, defaul
80
80
  const minNumberValue = fixEmptyMinValue(minValue);
81
81
  const minIsDash = minValue === "-";
82
82
  const { propertiesMeta, pushData } = props;
83
- set(propertiesMeta, "undoApplied", false);
83
+ _set(propertiesMeta, "undoApplied", false);
84
84
  // dash, non-numeric or min/max mismatch: set error
85
85
  if (isInvalidOrMinMaxError(minValue, minNumberValue, maxNumberValue)) {
86
86
  setState({
@@ -101,7 +101,7 @@ export function minInputValidateAndPushData(data, state, props, setState, defaul
101
101
  // valid, set new value
102
102
  const { properties } = props;
103
103
  if (properties) {
104
- set(properties, `controls.${basePath}.min`, minValue);
104
+ _set(properties, `controls.${basePath}.min`, minValue);
105
105
  }
106
106
  // if incorrect value was set previously but now validation passed, set incorrect value as correct value
107
107
  if (isNaN(parseFloat(incorrectMaxValue))) {
@@ -111,7 +111,7 @@ export function minInputValidateAndPushData(data, state, props, setState, defaul
111
111
  }
112
112
  else {
113
113
  if (properties) {
114
- set(properties, `controls.${basePath}.max`, incorrectMaxValue);
114
+ _set(properties, `controls.${basePath}.max`, incorrectMaxValue);
115
115
  }
116
116
  setState(defaultState);
117
117
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dimensions.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/dimensions.ts"],"names":[],"mappings":"AAIA,OAAO,EAGH,KAAK,UAAU,EACf,KAAK,kBAAkB,EAS1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAe,KAAK,OAAO,EAAsB,MAAM,kBAAkB,CAAC;AA2BjF,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,kBAAkB,EAC3B,yBAAyB,CAAC,EAAE,GAAG,GAChC,UAAU,EAAE,CAMd;AAwCD,wBAAgB,sBAAsB,IAAI,UAAU,EAAE,CAErD;AAmCD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,kBAAkB,EAC3B,IAAI,EAAE,OAAO,EACb,yBAAyB,CAAC,EAAE,GAAG,GAChC,UAAU,EAAE,CAiDd;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,kBAAkB,GAAG,UAAU,EAAE,CAKnF"}
1
+ {"version":3,"file":"dimensions.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/dimensions.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,UAAU,EACf,KAAK,kBAAkB,EAS1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAe,KAAK,OAAO,EAAsB,MAAM,kBAAkB,CAAC;AA4BjF,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,kBAAkB,EAC3B,yBAAyB,CAAC,EAAE,GAAG,GAChC,UAAU,EAAE,CAMd;AAwCD,wBAAgB,sBAAsB,IAAI,UAAU,EAAE,CAErD;AAmCD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,kBAAkB,EAC3B,IAAI,EAAE,OAAO,EACb,yBAAyB,CAAC,EAAE,GAAG,GAChC,UAAU,EAAE,CAiDd;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,kBAAkB,GAAG,UAAU,EAAE,CAKnF"}
@@ -1,8 +1,8 @@
1
1
  // (C) 2007-2026 GoodData Corporation
2
- import { compact } from "lodash-es";
3
2
  import { MeasureGroupIdentifier, bucketAttributes, insightAttributes, insightBucket, insightBuckets, insightProperties, newDimension, newTwoDimensional, } from "@gooddata/sdk-model";
4
3
  import { BucketNames, VisualizationTypes } from "@gooddata/sdk-ui";
5
4
  import { getPivotTableDimensions as getPivotTableDimensionsShared, } from "@gooddata/sdk-ui-pivot";
5
+ import { _compact } from "@gooddata/util";
6
6
  import { getMeasureGroupDimensionFromProperties } from "./propertiesHelper.js";
7
7
  const COLUMNS = "columns";
8
8
  const ROWS = "rows";
@@ -41,8 +41,8 @@ function getAreaDimensions(insight) {
41
41
  const seriesAttribute = viewByAttributes[0];
42
42
  const sliceAttribute = stackByAttributes[0] ?? viewByAttributes[1];
43
43
  return sliceAttribute
44
- ? newTwoDimensional([sliceAttribute], compact([seriesAttribute, MeasureGroupIdentifier]))
45
- : newTwoDimensional([MeasureGroupIdentifier], compact([seriesAttribute]));
44
+ ? newTwoDimensional([sliceAttribute], _compact([seriesAttribute, MeasureGroupIdentifier]))
45
+ : newTwoDimensional([MeasureGroupIdentifier], _compact([seriesAttribute]));
46
46
  }
47
47
  function getLineDimensions(insight) {
48
48
  const trendAttributes = safeBucketAttributes(insight, BucketNames.TREND);
@@ -75,7 +75,7 @@ function getBubbleDimensions(insight) {
75
75
  function getSankeyDimensions(insight) {
76
76
  const fromAttributes = safeBucketAttributes(insight, BucketNames.ATTRIBUTE_FROM);
77
77
  const toAttributes = safeBucketAttributes(insight, BucketNames.ATTRIBUTE_TO);
78
- return newTwoDimensional([MeasureGroupIdentifier], compact([...fromAttributes, ...toAttributes]));
78
+ return newTwoDimensional([MeasureGroupIdentifier], _compact([...fromAttributes, ...toAttributes]));
79
79
  }
80
80
  /**
81
81
  * Generates dimensions based on buckets and visualization objects.
@@ -1 +1 @@
1
- {"version":3,"file":"drillablePredicates.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/drillablePredicates.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,0BAA0B,EAGlC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAgB3E;;;;;;;;;;GAUG;AACH,wBAAgB,uCAAuC,CAAC,EACpD,IAAI,EACJ,WAAW,EACX,YAAY,GACf,EAAE,0BAA0B,GAAG,gBAAgB,EAAE,CAsBjD;AAED,eAAO,MAAM,wBAAwB;;CAEpC,CAAC"}
1
+ {"version":3,"file":"drillablePredicates.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/drillablePredicates.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,0BAA0B,EAGlC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAiB3E;;;;;;;;;;GAUG;AACH,wBAAgB,uCAAuC,CAAC,EACpD,IAAI,EACJ,WAAW,EACX,YAAY,GACf,EAAE,0BAA0B,GAAG,gBAAgB,EAAE,CAsBjD;AAED,eAAO,MAAM,wBAAwB;;CAEpC,CAAC"}
@@ -1,13 +1,13 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
- import { uniq, uniqBy } from "lodash-es";
3
2
  import { HeaderPredicates } from "@gooddata/sdk-ui";
3
+ import { _uniq, _uniqBy } from "@gooddata/util";
4
4
  const toQualifier = (identifier) => typeof identifier === "string" ? { identifier } : identifier;
5
5
  /**
6
6
  * An untyped entry stays distinct from the same identifier typed, and two types of one identifier stay
7
7
  * distinct from each other, because each activates drilling on a different object.
8
8
  */
9
9
  const uniqueQualifiers = (identifiers) => Array.isArray(identifiers)
10
- ? uniqBy(identifiers.map(toQualifier), ({ identifier, type }) => `${type ?? ""}.${identifier}`)
10
+ ? _uniqBy(identifiers.map(toQualifier), ({ identifier, type }) => `${type ?? ""}.${identifier}`)
11
11
  : [];
12
12
  /**
13
13
  * Converts post message with drilling specification into header predicates. Given the message with
@@ -21,9 +21,9 @@ const uniqueQualifiers = (identifiers) => Array.isArray(identifiers)
21
21
  * @internal
22
22
  */
23
23
  export function convertPostMessageToDrillablePredicates({ uris, identifiers, composedFrom, }) {
24
- const simpleUris = Array.isArray(uris) ? uniq(uris) : [];
24
+ const simpleUris = Array.isArray(uris) ? _uniq(uris) : [];
25
25
  const simpleIdentifiers = uniqueQualifiers(identifiers);
26
- const composedFromUris = composedFrom?.uris && Array.isArray(composedFrom.uris) ? uniq(composedFrom.uris) : [];
26
+ const composedFromUris = composedFrom?.uris && Array.isArray(composedFrom.uris) ? _uniq(composedFrom.uris) : [];
27
27
  const composedFromIdentifiers = uniqueQualifiers(composedFrom?.identifiers);
28
28
  // note: not passing factory function to maps to make testing assertions simpler (passing factory fun-as-is
29
29
  // will call the factory with 3 args (value, index and all values)
@@ -1 +1 @@
1
- {"version":3,"file":"getReactEmbeddingCodeGenerator.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/embeddingCodeGenerator/getReactEmbeddingCodeGenerator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAsB,MAAM,qBAAqB,CAAC;AAElF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAGxF,OAAO,EAEH,KAAK,oCAAoC,EAI5C,MAAM,YAAY,CAAC;AA0JpB;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,SAAS,MAAM,EAAE,EAClE,SAAS,EACT,cAAc,EACd,mBAAmB,GACtB,EAAE,oCAAoC,CAAC,MAAM,CAAC,GAAG,CAC9C,OAAO,EAAE,kBAAkB,EAC3B,MAAM,CAAC,EAAE,oBAAoB,KAC5B,MAAM,CA4BV"}
1
+ {"version":3,"file":"getReactEmbeddingCodeGenerator.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/embeddingCodeGenerator/getReactEmbeddingCodeGenerator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAsB,MAAM,qBAAqB,CAAC;AAGlF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAGxF,OAAO,EAEH,KAAK,oCAAoC,EAI5C,MAAM,YAAY,CAAC;AA0JpB;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,SAAS,MAAM,EAAE,EAClE,SAAS,EACT,cAAc,EACd,mBAAmB,GACtB,EAAE,oCAAoC,CAAC,MAAM,CAAC,GAAG,CAC9C,OAAO,EAAE,kBAAkB,EAC3B,MAAM,CAAC,EAAE,oBAAoB,KAC5B,MAAM,CA4BV"}
@@ -1,6 +1,7 @@
1
1
  // (C) 2022-2026 GoodData Corporation
2
- import { compact, groupBy, isEmpty, partition, sortBy, uniqBy } from "lodash-es";
2
+ import { sortBy } from "lodash-es";
3
3
  import { factoryNotationFor } from "@gooddata/sdk-model";
4
+ import { _compact, _groupBy, _isEmpty, _partition, _uniqBy } from "@gooddata/util";
4
5
  import { normalizeInsight } from "./normalizeInsight.js";
5
6
  // these are in line with what `factoryNotationFor` supports
6
7
  const defaultFactories = [
@@ -59,12 +60,12 @@ function indent(str, tabs) {
59
60
  .map((chunk) => `${" ".repeat(tabs * TAB_SIZE)}${chunk}`)
60
61
  .join("\n");
61
62
  }
62
- const renderImports = (imports) => Object.entries(groupBy(imports, (i) => i.package))
63
+ const renderImports = (imports) => Object.entries(_groupBy(imports, (i) => i.package))
63
64
  .map(([pkg, imports]) => {
64
- const [[defaultImport], namedImports] = partition(imports, (i) => i.importType === "default");
65
- return compact([
65
+ const [[defaultImport], namedImports] = _partition(imports, (i) => i.importType === "default");
66
+ return _compact([
66
67
  "import",
67
- compact([
68
+ _compact([
68
69
  defaultImport?.name,
69
70
  namedImports.length &&
70
71
  `{ ${sortBy(namedImports.map((i) => i.name), (i) => i.toLowerCase()).join(", ")} }`,
@@ -80,11 +81,11 @@ function walkProps(props, additionalFactories, config) {
80
81
  const propsToOmit = config?.omitChartProps ?? [];
81
82
  const importsUsed = [];
82
83
  // we ignore undefined values and functions as there is no bullet-proof way to serialize them
83
- // Note: isEmpty() returns true for primitive values like numbers/booleans, so we check for them explicitly
84
- // Non-empty strings are handled correctly by isEmpty(), but we explicitly check to be safe
84
+ // Note: _isEmpty() returns true for primitive values like numbers/booleans, so we check for them explicitly
85
+ // Non-empty strings are handled correctly by _isEmpty(), but we explicitly check to be safe
85
86
  const propPairsIgnoredFunctions = Object.entries(props).filter(([_, meta]) => meta !== undefined &&
86
87
  !(typeof meta.value === "function") &&
87
- (typeof meta.value === "number" || typeof meta.value === "boolean" || !isEmpty(meta.value)));
88
+ (typeof meta.value === "number" || typeof meta.value === "boolean" || !_isEmpty(meta.value)));
88
89
  //omit chart configuration when define in config
89
90
  const propPairs = propPairsIgnoredFunctions.filter(([key, _]) => !propsToOmit.includes(key));
90
91
  // get variable declaration for each prop to render outside of the component
@@ -112,7 +113,7 @@ function walkProps(props, additionalFactories, config) {
112
113
  const detectedFactories = detectFactoryImports(propDeclarations, additionalFactories ?? []);
113
114
  importsUsed.push(...detectedFactories);
114
115
  return {
115
- importsUsed: uniqBy(importsUsed, (i) => `${i.package}#${i.name}`),
116
+ importsUsed: _uniqBy(importsUsed, (i) => `${i.package}#${i.name}`),
116
117
  propDeclarations,
117
118
  propUsages,
118
119
  };
@@ -132,7 +133,7 @@ export function getReactEmbeddingCodeGenerator({ component, insightToProps, addi
132
133
  const normalizedInsight = normalizeInsight(insight);
133
134
  const props = insightToProps(normalizedInsight, config?.context);
134
135
  const { importsUsed, propDeclarations, propUsages } = walkProps(props, additionalFactories, config);
135
- const imports = compact([REACT_IMPORT_INFO, ...importsUsed, component]);
136
+ const imports = _compact([REACT_IMPORT_INFO, ...importsUsed, component]);
136
137
  const height = config?.height ?? DEFAULT_HEIGHT;
137
138
  const stringifiedHeight = typeof height === "string" ? `"${height}"` : height.toString();
138
139
  const componentBody = `<${component.name}\n${indent(propUsages.join("\n"), 1)}\n/>`;
@@ -1 +1 @@
1
- {"version":3,"file":"propertiesHelper.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/propertiesHelper.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,MAAM,EAKd,MAAM,qBAAqB,CAAC;AAE7B,OA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AAS,GAChC,OAAO,CAGT;AAED;;;;;;;GAOG;AACH,wBAAgB,sCAAsC,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAI/F;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAC7C,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,SAAS,GAAG,SAAS,EAC/B,cAAc,CAAC,EAAE,sBAAsB,GACxC,sBAAsB,GAAG,SAAS,CAKpC;AAED,wBAAgB,yBAAyB,CACrC,uBAAuB,EAAE,wBAAwB,GAClD,MAAM,GAAG,SAAS,CAGpB;AAED,wBAAgB,sCAAsC,CAClD,uBAAuB,EAAE,wBAAwB,GAClD,qBAAqB,CAEvB;AAED,wBAAgB,sCAAsC,CAClD,uBAAuB,EAAE,wBAAwB,GAClD,qBAAqB,CAEvB;AAED,wBAAgB,sBAAsB,CAClC,iBAAiB,EAAE,wBAAwB,EAC3C,OAAO,EAAE,kBAAkB,GAC5B,wBAAwB,CAK1B;AAED,wBAAgB,mCAAmC,CAC/C,iBAAiB,EAAE,wBAAwB,EAC3C,OAAO,EAAE,SAAS,GACnB,wBAAwB,CAO1B;AAED,wBAAgB,yBAAyB,CACrC,iBAAiB,EAAE,wBAAwB,GAAG,SAAS,EACvD,OAAO,EAAE,kBAAkB,GAC5B,wBAAwB,GAAG,SAAS,CAMtC;AAED,wBAAgB,sCAAsC,CAClD,iBAAiB,EAAE,wBAAwB,GAAG,SAAS,EACvD,OAAO,EAAE,SAAS,GACnB,wBAAwB,GAAG,SAAS,CAStC;AA0BD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,wBAAwB;;;;;;EAiBhG"}
@@ -1,17 +1,18 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
2
  // eslint-disable-next-line no-restricted-imports
3
- import { cloneDeep, get, has, isEmpty, set } from "lodash-es";
3
+ import { get, has } from "lodash-es";
4
4
  import { bucketsIsEmpty, insightBuckets, insightProperties, insightVisualizationUrl, } from "@gooddata/sdk-model";
5
5
  import { BucketNames } from "@gooddata/sdk-ui";
6
+ import { _cloneDeep, _isEmpty, _set } from "@gooddata/util";
6
7
  import { AXIS } from "../constants/axis.js";
7
8
  import { PROPERTY_CONTROLS } from "../constants/properties.js";
8
9
  import { OPTIONAL_STACKING_PROPERTIES } from "../constants/supportedProperties.js";
9
10
  import { UICONFIG_AXIS } from "../constants/uiConfig.js";
10
11
  import { getAllMeasuresShowOnSecondaryAxis, getItemsCount, getItemsLocalIdentifiers, getMeasureItems, getStackItems, } from "./bucketHelper.js";
11
12
  export function getSupportedPropertiesControls(visualizationControlsProperties, supportedPropertiesList) {
12
- const clonedControls = cloneDeep(visualizationControlsProperties);
13
+ const clonedControls = _cloneDeep(visualizationControlsProperties);
13
14
  if (supportedPropertiesList) {
14
- return supportedPropertiesList.reduce((props, current) => has(clonedControls, current) ? set(props, current, get(clonedControls, current)) : props, {});
15
+ return supportedPropertiesList.reduce((props, current) => has(clonedControls, current) ? _set(props, current, get(clonedControls, current)) : props, {});
15
16
  }
16
17
  return {};
17
18
  }
@@ -22,7 +23,7 @@ export function setSecondaryMeasures(referencePoint, axisName) {
22
23
  if (!axisName) {
23
24
  return referencePoint;
24
25
  }
25
- const newReferencePoint = cloneDeep(referencePoint);
26
+ const newReferencePoint = _cloneDeep(referencePoint);
26
27
  const path = `${PROPERTY_CONTROLS}.${axisName}`;
27
28
  const secondaryAxisProperties = newReferencePoint?.properties?.controls?.[axisName];
28
29
  const buckets = newReferencePoint?.buckets ?? [];
@@ -39,8 +40,8 @@ export function setSecondaryMeasures(referencePoint, axisName) {
39
40
  0: AXIS.PRIMARY,
40
41
  [allMeasures.length]: AXIS.SECONDARY,
41
42
  }[secondaryMeasures.length] || AXIS.DUAL;
42
- set(newReferencePoint, path, secondaryAxis);
43
- set(newReferencePoint, UICONFIG_AXIS, axis);
43
+ _set(newReferencePoint, path, secondaryAxis);
44
+ _set(newReferencePoint, UICONFIG_AXIS, axis);
44
45
  return newReferencePoint;
45
46
  }
46
47
  export function isEmptyObject(obj) {
@@ -49,7 +50,7 @@ export function isEmptyObject(obj) {
49
50
  export function getSupportedProperties(visualizationProperties, supportedPropertiesList) {
50
51
  const controls = visualizationProperties?.controls ?? {};
51
52
  const supportedControls = getSupportedPropertiesControls(controls, supportedPropertiesList);
52
- return isEmpty(supportedControls)
53
+ return _isEmpty(supportedControls)
53
54
  ? {}
54
55
  : {
55
56
  controls: supportedControls,
@@ -59,9 +60,9 @@ export function getReferencePointWithSupportedProperties(referencePoint, support
59
60
  const supportedControlsProperties = referencePoint.properties
60
61
  ? getSupportedPropertiesControls(referencePoint.properties.controls, supportedPropertiesList)
61
62
  : {};
62
- if (isEmpty(supportedControlsProperties)) {
63
+ if (_isEmpty(supportedControlsProperties)) {
63
64
  const sortItems = referencePoint.properties?.sortItems;
64
- const sortItemsExpand = sortItems && !isEmpty(sortItems) ? { sortItems } : {};
65
+ const sortItemsExpand = sortItems && !_isEmpty(sortItems) ? { sortItems } : {};
65
66
  return {
66
67
  ...referencePoint,
67
68
  properties: {
@@ -149,7 +150,7 @@ const AXIS_TYPES = ["xaxis", "yaxis", "secondary_xaxis", "secondary_yaxis"];
149
150
  export function getHighchartsAxisNameConfiguration(controlProperties) {
150
151
  const axisProperties = AXIS_TYPES.reduce((result, axis) => {
151
152
  const axisNameConfig = controlProperties?.[axis]?.name;
152
- if (isEmpty(axisNameConfig)) {
153
+ if (_isEmpty(axisNameConfig)) {
153
154
  return result;
154
155
  }
155
156
  if (axisNameConfig.position) {
@@ -254,20 +255,20 @@ export function getColumnHeadersPositionFromProperties(visualizationProperties)
254
255
  }
255
256
  export function getLegendConfiguration(controlProperties, insight) {
256
257
  const legendPosition = getLegendPosition(controlProperties, insight);
257
- set(controlProperties, "legend.position", legendPosition);
258
+ _set(controlProperties, "legend.position", legendPosition);
258
259
  return controlProperties;
259
260
  }
260
261
  export function getLegendConfigurationDashboardsEnv(controlProperties, options) {
261
262
  const legendPosition = getLegendPositionDashboardsEnv(controlProperties, options);
262
- set(controlProperties, "legend.position", legendPosition);
263
- set(controlProperties, "legend.responsive", "autoPositionWithPopup");
263
+ _set(controlProperties, "legend.position", legendPosition);
264
+ _set(controlProperties, "legend.responsive", "autoPositionWithPopup");
264
265
  return controlProperties;
265
266
  }
266
267
  export function getChartSupportedControls(controlProperties, insight) {
267
- return getDataPointsConfiguration(getHighchartsAxisNameConfiguration(getLegendConfiguration(cloneDeep(controlProperties ?? {}), insight)));
268
+ return getDataPointsConfiguration(getHighchartsAxisNameConfiguration(getLegendConfiguration(_cloneDeep(controlProperties ?? {}), insight)));
268
269
  }
269
270
  export function getChartSupportedControlsDashboardsEnv(controlProperties, options) {
270
- return getDataPointsConfiguration(getHighchartsAxisNameConfiguration(getLegendConfigurationDashboardsEnv(cloneDeep(controlProperties ?? {}), options)));
271
+ return getDataPointsConfiguration(getHighchartsAxisNameConfiguration(getLegendConfigurationDashboardsEnv(_cloneDeep(controlProperties ?? {}), options)));
271
272
  }
272
273
  function getLegendPosition(controlProperties, insight) {
273
274
  const legendPosition = controlProperties?.["legend"]?.position ?? "auto";
@@ -1,7 +1,7 @@
1
1
  // (C) 2022-2026 GoodData Corporation
2
- import { compact, isEmpty } from "lodash-es";
2
+ import { _compact, _isEmpty } from "@gooddata/util";
3
3
  function isUseless(obj) {
4
- return obj === null || obj === undefined || (typeof obj === "object" && isEmpty(obj));
4
+ return obj === null || obj === undefined || (typeof obj === "object" && _isEmpty(obj));
5
5
  }
6
6
  /**
7
7
  * For a given object returns a copy that has all properties that are empty objects or arrays or nil removed.
@@ -13,7 +13,7 @@ function isUseless(obj) {
13
13
  export function removeUseless(obj) {
14
14
  let res = obj;
15
15
  if (Array.isArray(obj)) {
16
- res = compact(obj.map(removeUseless));
16
+ res = _compact(obj.map(removeUseless));
17
17
  }
18
18
  else if (obj !== null && typeof obj === "object") {
19
19
  res = Object.fromEntries(Object.entries(obj)
@@ -1 +1 @@
1
- {"version":3,"file":"sort.d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EAAO,EAC9B,cAAc,GAAE,oBAAoB,EAAO,EAC3C,WAAW,GAAE,SAAS,EAAO,GAC9B,SAAS,EAAE,CA8Bb;AAED,wBAAgB,gCAAgC,CAC5C,gBAAgB,EAAE,WAAW,EAAE,EAC/B,kBAAkB,EAAE,WAAW,EAAE,EACjC,IAAI,EAAE,SAAS,GAChB,MAAM,GAAG,SAAS,CAUpB"}
@@ -1,7 +1,8 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
- import { isEmpty, isEqual, omitBy } from "lodash-es";
2
+ import { omitBy } from "lodash-es";
3
3
  import { areObjRefsEqual, bucketAttributes, insightBucket, insightMeasures, insightSorts, isAttributeAreaSort, isAttributeValueSort, isMeasureSort, newAttributeAreaSort, newAttributeSort, newMeasureSort, newMeasureSortFromLocators, sortDirection, sortMeasureLocators, } from "@gooddata/sdk-model";
4
4
  import { BucketNames, VisualizationTypes } from "@gooddata/sdk-ui";
5
+ import { _isEmpty, _isEqual } from "@gooddata/util";
5
6
  import { messages } from "../../locales.js";
6
7
  import { SORT_DIR_DESC } from "../constants/sort.js";
7
8
  import { getTranslation } from "./translations.js";
@@ -37,18 +38,18 @@ function getDefaultBarChartSort(insight, canSortStackTotalValue = false) {
37
38
  newAttributeAreaSort(viewBy[1], SORT_DIR_DESC),
38
39
  ];
39
40
  }
40
- if (!isEmpty(viewBy) && !isEmpty(stackBy)) {
41
+ if (!_isEmpty(viewBy) && !_isEmpty(stackBy)) {
41
42
  return [newAttributeAreaSort(viewBy[0], SORT_DIR_DESC)];
42
43
  }
43
- if (!isEmpty(viewBy) && canSortStackTotalValue) {
44
+ if (!_isEmpty(viewBy) && canSortStackTotalValue) {
44
45
  return [newAttributeAreaSort(viewBy[0], SORT_DIR_DESC)];
45
46
  }
46
- return isEmpty(stackBy) && !isEmpty(measures) ? [newMeasureSort(measures[0], SORT_DIR_DESC)] : [];
47
+ return _isEmpty(stackBy) && !_isEmpty(measures) ? [newMeasureSort(measures[0], SORT_DIR_DESC)] : [];
47
48
  }
48
49
  export function getDefaultTreemapSortFromBuckets(viewBy, segmentBy, measures) {
49
50
  const viewAttr = viewBy ? bucketAttributes(viewBy) : [];
50
51
  const stackAttr = segmentBy ? bucketAttributes(segmentBy) : [];
51
- if (!isEmpty(viewAttr) && !isEmpty(stackAttr)) {
52
+ if (!_isEmpty(viewAttr) && !_isEmpty(stackAttr)) {
52
53
  return [
53
54
  newAttributeSort(viewAttr[0], "asc"),
54
55
  ...(measures ?? []).map((m) => newMeasureSort(m, "desc")),
@@ -61,7 +62,7 @@ function getDefaultTreemapSort(insight) {
61
62
  }
62
63
  function getDefaultHeatmapSortFromBuckets(viewBy) {
63
64
  const viewAttr = viewBy ? bucketAttributes(viewBy) : [];
64
- if (!isEmpty(viewAttr)) {
65
+ if (!_isEmpty(viewAttr)) {
65
66
  return [newAttributeSort(viewAttr[0], "desc")];
66
67
  }
67
68
  return [];
@@ -77,7 +78,7 @@ function getDefaultPieDonutPyramidFunnelSort(insight) {
77
78
  const measures = insightMeasures(insight);
78
79
  const viewBucket = insightBucket(insight, BucketNames.VIEW);
79
80
  const viewBy = viewBucket ? bucketAttributes(viewBucket) : [];
80
- if (!isEmpty(measures) && !isEmpty(viewBy)) {
81
+ if (!_isEmpty(measures) && !_isEmpty(viewBy)) {
81
82
  return [newMeasureSort(measures[0], SORT_DIR_DESC)];
82
83
  }
83
84
  return [];
@@ -145,7 +146,7 @@ export function removeSort(referencePoint) {
145
146
  }
146
147
  function validateMeasureSortLocators(sortLocators, availableLocators) {
147
148
  return (sortLocators.length === availableLocators.length &&
148
- sortLocators.every((sortLocator, locatorIndex) => isEqual(sortLocator, availableLocators[locatorIndex])));
149
+ sortLocators.every((sortLocator, locatorIndex) => _isEqual(sortLocator, availableLocators[locatorIndex])));
149
150
  }
150
151
  function isValidMeasureSort(measureSort, availableSort) {
151
152
  return (availableSort &&