@sisense/sdk-ui 2.8.0 → 2.10.0

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 (184) hide show
  1. package/dist/ai.cjs +32 -32
  2. package/dist/ai.js +126 -125
  3. package/dist/analytics-composer/node.cjs +3 -0
  4. package/dist/analytics-composer/node.d.ts +1 -0
  5. package/dist/analytics-composer/node.js +1033 -0
  6. package/dist/analytics-composer.cjs +118 -118
  7. package/dist/analytics-composer.js +2211 -2906
  8. package/dist/derive-chart-family-B1on_xkS.cjs +170 -0
  9. package/dist/derive-chart-family-BllGhqsW.js +29469 -0
  10. package/dist/dimensions-BYqdB-Q8.cjs +1 -0
  11. package/dist/{dimensions-b8xRITJn.js → dimensions-D-Z9sitz.js} +3 -3
  12. package/dist/execute-query-CABqVn7C.cjs +1 -0
  13. package/dist/execute-query-CGLL9vXX.js +6428 -0
  14. package/dist/index.cjs +25 -26
  15. package/dist/index.js +9320 -8693
  16. package/dist/index.umd.js +389 -440
  17. package/dist/packages/sdk-ui/src/analytics-composer/index-node.d.ts +9 -0
  18. package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +1 -0
  19. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/common.d.ts +40 -0
  20. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/index.d.ts +2 -0
  21. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-dimensions.d.ts +3 -0
  22. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-filters.d.ts +44 -0
  23. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-measures.d.ts +30 -0
  24. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query-to-jaql.d.ts +18 -0
  25. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query.d.ts +224 -0
  26. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +40 -1
  27. package/dist/packages/sdk-ui/src/calendar-heatmap-chart.d.ts +12 -0
  28. package/dist/packages/sdk-ui/src/chart/helpers/get-load-data-function.d.ts +3 -1
  29. package/dist/packages/sdk-ui/src/chart/helpers/use-chart-data-preparation.d.ts +3 -1
  30. package/dist/packages/sdk-ui/src/chart/helpers/use-translated-data-options.d.ts +1 -1
  31. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/calendar-heatmap-chart-builder.d.ts +8 -0
  32. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/constants.d.ts +87 -0
  33. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data-options/data-options.d.ts +54 -0
  34. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data-options/index.d.ts +1 -0
  35. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data.d.ts +33 -0
  36. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/design-options.d.ts +22 -0
  37. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/highcharts-options-builder.d.ts +8 -0
  38. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/index.d.ts +1 -0
  39. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options.d.ts +12 -0
  40. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/chart-options.d.ts +9 -0
  41. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/extras-options.d.ts +9 -0
  42. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/index.d.ts +7 -0
  43. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/legend-options.d.ts +8 -0
  44. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/plot-options.d.ts +9 -0
  45. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/calendar-data-generator.d.ts +35 -0
  46. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/index.d.ts +1 -0
  47. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/series-options.d.ts +9 -0
  48. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/tooltip-options.d.ts +9 -0
  49. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-heatmap-charts-grid.d.ts +26 -0
  50. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-heatmap.d.ts +17 -0
  51. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-pagination/calendar-pagination.d.ts +30 -0
  52. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-pagination/helpers.d.ts +3 -0
  53. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-pagination/index.d.ts +1 -0
  54. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/data-helpers.d.ts +4 -0
  55. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/sizing-helpers.d.ts +25 -0
  56. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/view-helpers.d.ts +14 -0
  57. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/index.d.ts +4 -0
  58. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/use-calendar-heatmap-chart-options.d.ts +55 -0
  59. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/use-calendar-heatmap-navigation.d.ts +33 -0
  60. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/index.d.ts +2 -0
  61. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/types.d.ts +13 -0
  62. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/data-options.d.ts +5 -1
  63. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +5 -0
  64. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/legend.d.ts +3 -2
  65. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/y-axis.d.ts +28 -0
  66. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/helpers/design-options.d.ts +12 -0
  67. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highchart-options/axes.d.ts +6 -0
  68. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highcharts-options-builder.d.ts +2 -0
  69. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/line-chart-builder.d.ts +2 -0
  70. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data/index.d.ts +10 -0
  71. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data-options/index.d.ts +12 -0
  72. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/design-options/index.d.ts +18 -0
  73. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/axes.d.ts +6 -0
  74. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
  75. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/polar-chart-builder.d.ts +2 -0
  76. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/area-chart-builder.d.ts +2 -0
  77. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/helpers/design-options.d.ts +12 -0
  78. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/axes.d.ts +6 -0
  79. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
  80. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/labels-spacing.d.ts +8 -0
  81. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/axes.d.ts +6 -0
  82. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/labels-spacing.d.ts +9 -0
  83. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/axes.d.ts +6 -0
  84. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/labels-spacing.d.ts +9 -0
  85. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/helpers/highchart-options/stacking.d.ts +21 -0
  86. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/types.d.ts +1 -0
  87. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/types.d.ts +1 -1
  88. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/helpers/data-options.d.ts +22 -0
  89. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/helpers/data.d.ts +13 -0
  90. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/alerts/index.d.ts +5 -0
  91. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/data/index.d.ts +15 -0
  92. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/data-options/index.d.ts +32 -0
  93. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/design-options/index.d.ts +17 -0
  94. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
  95. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/pie-chart-builder.d.ts +2 -0
  96. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/types.d.ts +12 -0
  97. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/build-highchart-options.d.ts +9 -4
  98. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/highcharts-based-chart-renderer.d.ts +2 -4
  99. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/use-extra-config.d.ts +2 -0
  100. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/utils.d.ts +2 -1
  101. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/types.d.ts +1 -1
  102. package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +10 -9
  103. package/dist/packages/sdk-ui/src/chart/restructured-charts/utils.d.ts +5 -0
  104. package/dist/packages/sdk-ui/src/chart-data/data-coloring/types.d.ts +6 -0
  105. package/dist/packages/sdk-ui/src/chart-data/types.d.ts +2 -1
  106. package/dist/packages/sdk-ui/src/chart-data-options/translate-data-options.d.ts +2 -1
  107. package/dist/packages/sdk-ui/src/chart-data-options/types.d.ts +19 -2
  108. package/dist/packages/sdk-ui/src/chart-data-options/utils.d.ts +4 -4
  109. package/dist/packages/sdk-ui/src/chart-data-options/validate-data-options/validate-categorical-data-options.d.ts +14 -0
  110. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +155 -0
  111. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-settings.d.ts +39 -0
  112. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-transformers.d.ts +45 -0
  113. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-utils.d.ts +1 -0
  114. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/date-utils.d.ts +27 -0
  115. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/index.d.ts +3 -0
  116. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +33 -3
  117. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +4 -1
  118. package/dist/packages/sdk-ui/src/chart-options-processor/{category-chart-options.d.ts → category-chart-options/category-chart-options.d.ts} +9 -5
  119. package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/funnel-chart-options.d.ts +15 -0
  120. package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/pie-chart-options.d.ts +15 -0
  121. package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/sunburst-chart-options.d.ts +17 -0
  122. package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/treemap-chart-options.d.ts +17 -0
  123. package/dist/packages/sdk-ui/src/chart-options-processor/chart-options-service.d.ts +26 -10
  124. package/dist/packages/sdk-ui/src/chart-options-processor/defaults/cartesian.d.ts +4 -3
  125. package/dist/packages/sdk-ui/src/chart-options-processor/scatter-chart-options.d.ts +3 -3
  126. package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +1 -3
  127. package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +11 -12
  128. package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +19 -5
  129. package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +28 -14
  130. package/dist/packages/sdk-ui/src/chart-options-processor/translations/pie-series.d.ts +34 -6
  131. package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
  132. package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +1 -1
  133. package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +61 -4
  134. package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +2 -2
  135. package/dist/packages/sdk-ui/src/common/formatters/create-date-formatter.d.ts +10 -0
  136. package/dist/packages/sdk-ui/src/common/hooks/useDateFormatter.d.ts +7 -0
  137. package/dist/packages/sdk-ui/src/common/icons/double-arrow-end-icon.d.ts +6 -0
  138. package/dist/packages/sdk-ui/src/const.d.ts +2 -0
  139. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/utils.d.ts +0 -19
  140. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/index.d.ts +1 -1
  141. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-filters.d.ts +12 -1
  142. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-formatters.d.ts +18 -0
  143. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-handlers.d.ts +23 -0
  144. package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-widget-transforms.d.ts +29 -0
  145. package/dist/packages/sdk-ui/src/index.d.ts +1 -0
  146. package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
  147. package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/index.d.ts +1 -0
  148. package/dist/packages/sdk-ui/src/pivot-table/formatters/formatter-utils.d.ts +23 -0
  149. package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +2 -1
  150. package/dist/packages/sdk-ui/src/pivot-table/formatters/types.d.ts +45 -3
  151. package/dist/packages/sdk-ui/src/pivot-table/formatters/utils.d.ts +1 -0
  152. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +4 -1
  153. package/dist/packages/sdk-ui/src/polar-chart.d.ts +1 -1
  154. package/dist/packages/sdk-ui/src/props.d.ts +161 -7
  155. package/dist/packages/sdk-ui/src/query/date-formats/apply-date-format.d.ts +7 -6
  156. package/dist/packages/sdk-ui/src/query/date-formats/index.d.ts +1 -1
  157. package/dist/packages/sdk-ui/src/query/execute-query.d.ts +3 -1
  158. package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
  159. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +9 -2
  160. package/dist/packages/sdk-ui/src/sisense-chart/types.d.ts +2 -2
  161. package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +1 -0
  162. package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +11 -0
  163. package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +22 -0
  164. package/dist/packages/sdk-ui/src/types.d.ts +254 -16
  165. package/dist/packages/sdk-ui/src/utils/combine-handlers.d.ts +19 -0
  166. package/dist/packages/sdk-ui/src/utils/utility-types/transformer.d.ts +8 -0
  167. package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +1 -1
  168. package/dist/packages/sdk-ui/src/widget-by-id/translate-panel-color-format.d.ts +9 -0
  169. package/dist/packages/sdk-ui/src/widget-by-id/translate-statistical-models.d.ts +10 -0
  170. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +0 -14
  171. package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +10 -10
  172. package/dist/types-BRtWk8uC.js +80 -0
  173. package/dist/types-Ds0KtTJF.cjs +1 -0
  174. package/dist/use-common-filters-D8tEa9zb.js +91245 -0
  175. package/dist/use-common-filters-hw1WKPCY.cjs +844 -0
  176. package/dist/{widget-composer-BPlNiX_P.cjs → widget-composer-B7zeAa_D.cjs} +9 -9
  177. package/dist/{widget-composer-SGEFYrXY.js → widget-composer-DL0xPtlC.js} +143 -217
  178. package/package.json +20 -10
  179. package/dist/derive-chart-family-6PZA-xZh.js +0 -92092
  180. package/dist/derive-chart-family-DQUVKMcV.cjs +0 -656
  181. package/dist/dimensions-x8nnAUew.cjs +0 -1
  182. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +0 -41
  183. package/dist/use-common-filters-BHBy4uv6.js +0 -32218
  184. package/dist/use-common-filters-Cg217teN.cjs +0 -350
@@ -0,0 +1,3 @@
1
+ "use strict";var Te=Object.defineProperty,Ie=Object.defineProperties;var Me=Object.getOwnPropertyDescriptors;var J=Object.getOwnPropertySymbols;var $e=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable;var Z=(e,t,r)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=(e,t)=>{for(var r in t||(t={}))$e.call(t,r)&&Z(e,r,t[r]);if(J)for(var r of J(t))ke.call(t,r)&&Z(e,r,t[r]);return e},k=(e,t)=>Ie(e,Me(t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../types-Ds0KtTJF.cjs"),l=require("../execute-query-CABqVn7C.cjs"),P=require("../dimensions-BYqdB-Q8.cjs");class Ne{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class oe{constructor(t){this.generateIdentifier=t,this.kv=new Ne}register(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class Pe extends oe{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,r){typeof r=="object"?(r.allowProps&&this.classToAllowedProps.set(t,r.allowProps),super.register(t,r.identifier)):super.register(t,r)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function Se(e){if("values"in Object)return Object.values(e);const t=[];for(const r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function Oe(e,t){const r=Se(e);if("find"in r)return r.find(t);const s=r;for(let n=0;n<s.length;n++){const i=s[n];if(t(i))return i}}function F(e,t){Object.entries(e).forEach(([r,s])=>t(s,r))}function N(e,t){return e.indexOf(t)!==-1}function v(e,t){for(let r=0;r<e.length;r++){const s=e[r];if(t(s))return s}}class Le{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return Oe(this.transfomers,r=>r.isApplicable(t))}findByName(t){return this.transfomers[t]}}const _e=e=>Object.prototype.toString.call(e).slice(8,-1),ae=e=>typeof e=="undefined",Be=e=>e===null,T=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,_=e=>T(e)&&Object.keys(e).length===0,y=e=>Array.isArray(e),xe=e=>typeof e=="string",Ve=e=>typeof e=="number"&&!isNaN(e),Ue=e=>typeof e=="boolean",Qe=e=>e instanceof RegExp,I=e=>e instanceof Map,M=e=>e instanceof Set,le=e=>_e(e)==="Symbol",qe=e=>e instanceof Date&&!isNaN(e.valueOf()),Ke=e=>e instanceof Error,ee=e=>typeof e=="number"&&isNaN(e),Ye=e=>Ue(e)||Be(e)||ae(e)||Ve(e)||xe(e)||le(e),We=e=>typeof e=="bigint",He=e=>e===1/0||e===-1/0,Xe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),je=e=>e instanceof URL,ce=e=>e.replace(/\./g,"\\."),L=e=>e.map(String).map(ce).join("."),R=e=>{const t=[];let r="";for(let n=0;n<e.length;n++){let i=e.charAt(n);if(i==="\\"&&e.charAt(n+1)==="."){r+=".",n++;continue}if(i==="."){t.push(r),r="";continue}r+=i}const s=r;return t.push(s),t};function p(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}const ue=[p(ae,"undefined",()=>null,()=>{}),p(We,"bigint",e=>e.toString(),e=>typeof BigInt!="undefined"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),p(qe,"Date",e=>e.toISOString(),e=>new Date(e)),p(Ke,"Error",(e,t)=>{const r={name:e.name,message:e.message};return t.allowedErrorProps.forEach(s=>{r[s]=e[s]}),r},(e,t)=>{const r=new Error(e.message);return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(s=>{r[s]=e[s]}),r}),p(Qe,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),p(M,"set",e=>[...e.values()],e=>new Set(e)),p(I,"map",e=>[...e.entries()],e=>new Map(e)),p(e=>ee(e)||He(e),"number",e=>ee(e)?"NaN":e>0?"Infinity":"-Infinity",Number),p(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),p(je,"URL",e=>e.toString(),e=>new URL(e))];function S(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}const fe=S((e,t)=>le(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{const s=r.symbolRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown symbol");return s}),Ge=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),me=S(Xe,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const r=Ge[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function de(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const pe=S(de,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return h({},e);const s={};return r.forEach(n=>{s[n]=e[n]}),s},(e,t,r)=>{const s=r.classRegistry.getValue(t[1]);if(!s)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(s.prototype),e)}),ge=S((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{const s=r.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),Je=[pe,fe,ge,me],te=(e,t)=>{const r=v(Je,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};const s=v(ue,n=>n.isApplicable(e,t));if(s)return{value:s.transform(e,t),type:s.annotation}},ye={};ue.forEach(e=>{ye[e.annotation]=e});const Ze=(e,t,r)=>{if(y(t))switch(t[0]){case"symbol":return fe.untransform(e,t,r);case"class":return pe.untransform(e,t,r);case"custom":return ge.untransform(e,t,r);case"typed-array":return me.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{const s=ye[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,r)}},E=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function be(e){if(N(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(N(e,"prototype"))throw new Error("prototype is not allowed as a property");if(N(e,"constructor"))throw new Error("constructor is not allowed as a property")}const ve=(e,t)=>{be(t);for(let r=0;r<t.length;r++){const s=t[r];if(M(e))e=E(e,+s);else if(I(e)){const n=+s,i=+t[++r]==0?"key":"value",o=E(e,n);switch(i){case"key":e=o;break;case"value":e=e.get(o);break}}else e=e[s]}return e},B=(e,t,r)=>{if(be(t),t.length===0)return r(e);let s=e;for(let i=0;i<t.length-1;i++){const o=t[i];if(y(s)){const a=+o;s=s[a]}else if(T(s))s=s[o];else if(M(s)){const a=+o;s=E(s,a)}else if(I(s)){if(i===t.length-2)break;const u=+o,$=+t[++i]==0?"key":"value",A=E(s,u);switch($){case"key":s=A;break;case"value":s=s.get(A);break}}}const n=t[t.length-1];if(y(s)?s[+n]=r(s[+n]):T(s)&&(s[n]=r(s[n])),M(s)){const i=E(s,+n),o=r(i);i!==o&&(s.delete(i),s.add(o))}if(I(s)){const i=+t[t.length-2],o=E(s,i);switch(+n==0?"key":"value"){case"key":{const u=r(o);s.set(u,s.get(o)),u!==o&&s.delete(o);break}case"value":{s.set(o,r(s.get(o)));break}}}return e};function x(e,t,r=[]){if(!e)return;if(!y(e)){F(e,(i,o)=>x(i,t,[...r,...R(o)]));return}const[s,n]=e;n&&F(n,(i,o)=>{x(i,t,[...r,...R(o)])}),t(s,r)}function et(e,t,r){return x(t,(s,n)=>{e=B(e,n,i=>Ze(i,s,r))}),e}function tt(e,t){function r(s,n){const i=ve(e,R(n));s.map(R).forEach(o=>{e=B(e,o,()=>i)})}if(y(t)){const[s,n]=t;s.forEach(i=>{e=B(e,R(i),()=>e)}),n&&F(n,r)}else F(t,r);return e}const rt=(e,t)=>T(e)||y(e)||I(e)||M(e)||de(e,t);function st(e,t,r){const s=r.get(e);s?s.push(t):r.set(e,[t])}function nt(e,t){const r={};let s;return e.forEach(n=>{if(n.length<=1)return;t||(n=n.map(a=>a.map(String)).sort((a,u)=>a.length-u.length));const[i,...o]=n;i.length===0?s=o.map(L):r[L(i)]=o.map(L)}),s?_(r)?[s]:[s,r]:_(r)?void 0:r}const he=(e,t,r,s,n=[],i=[],o=new Map)=>{var G;const a=Ye(e);if(!a){st(e,n,t);const g=o.get(e);if(g)return s?{transformedValue:null}:g}if(!rt(e,r)){const g=te(e,r),d=g?{transformedValue:g.value,annotations:[g.type]}:{transformedValue:e};return a||o.set(e,d),d}if(N(i,e))return{transformedValue:null};const u=te(e,r),$=(G=u==null?void 0:u.value)!=null?G:e,A=y($)?[]:{},z={};F($,(g,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")throw new Error(`Detected property ${d}. This is a prototype pollution risk, please remove it from your object.`);const C=he(g,t,r,s,[...n,d],[...i,e],o);A[d]=C.transformedValue,y(C.annotations)?z[d]=C.annotations:T(C.annotations)&&F(C.annotations,(Ce,Re)=>{z[ce(d)+"."+Re]=Ce})});const j=_(z)?{transformedValue:A,annotations:u?[u.type]:void 0}:{transformedValue:A,annotations:u?[u.type,z]:z};return a||o.set(e,j),j};function we(e){return Object.prototype.toString.call(e).slice(8,-1)}function re(e){return we(e)==="Array"}function it(e){if(we(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function ot(e,t,r,s,n){const i={}.propertyIsEnumerable.call(s,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=r),n&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function V(e,t={}){if(re(e))return e.map(n=>V(n,t));if(!it(e))return e;const r=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...r,...s].reduce((n,i)=>{if(re(t.props)&&!t.props.includes(i))return n;const o=e[i],a=V(o,t);return ot(n,i,a,e,t.nonenumerable),n},{})}class c{constructor({dedupe:t=!1}={}){this.classRegistry=new Pe,this.symbolRegistry=new oe(r=>{var s;return(s=r.description)!=null?s:""}),this.customTransformerRegistry=new Le,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const r=new Map,s=he(t,r,this,this.dedupe),n={json:s.transformedValue};s.annotations&&(n.meta=k(h({},n.meta),{values:s.annotations}));const i=nt(r,this.dedupe);return i&&(n.meta=k(h({},n.meta),{referentialEqualities:i})),n}deserialize(t){const{json:r,meta:s}=t;let n=V(r);return s!=null&&s.values&&(n=et(n,s.values,this)),s!=null&&s.referentialEqualities&&(n=tt(n,s.referentialEqualities)),n}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t))}registerClass(t,r){this.classRegistry.register(t,r)}registerSymbol(t,r){this.symbolRegistry.register(t,r)}registerCustom(t,r){this.customTransformerRegistry.register(h({name:r},t))}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}c.defaultInstance=new c;c.serialize=c.defaultInstance.serialize.bind(c.defaultInstance);c.deserialize=c.defaultInstance.deserialize.bind(c.defaultInstance);c.stringify=c.defaultInstance.stringify.bind(c.defaultInstance);c.parse=c.defaultInstance.parse.bind(c.defaultInstance);c.registerClass=c.defaultInstance.registerClass.bind(c.defaultInstance);c.registerSymbol=c.defaultInstance.registerSymbol.bind(c.defaultInstance);c.registerCustom=c.defaultInstance.registerCustom.bind(c.defaultInstance);c.allowErrorProps=c.defaultInstance.allowErrorProps.bind(c.defaultInstance);const w=e=>e===void 0?l.Sort.None:e,at=e=>new b.JaqlElement(e.metadataItem,e.type),U=e=>new l.DimensionalAttribute(e.name,e.expression,e.type,e.description,w(e.sort),e.dataSource,e.composeCode),Q=e=>new l.DimensionalLevelAttribute(e.name,e.expression,e.granularity,e.format,e.description,w(e.sort),e.dataSource,e.composeCode),m=e=>{switch(e.__serializable){case"DimensionalAttribute":return U(e);case"DimensionalLevelAttribute":return Q(e);default:return e}},Ae=e=>new P.DimensionalDimension(e.name,e.expression,e.attributes.map(m),e.dimensions.map(lt),e.type,e.description,w(e.sort),e.dataSource,e.composeCode,e.defaultAttribute?m(e.defaultAttribute):void 0),Ee=e=>new P.DimensionalDateDimension(e.name,e.expression,e.description,w(e.sort),e.dataSource,e.composeCode),lt=e=>{switch(e.__serializable){case"DimensionalDimension":return Ae(e);case"DimensionalDateDimension":return Ee(e);default:return e}},q=e=>new l.DimensionalBaseMeasure(e.name,m(e.attribute),e.aggregation,e.format,e.description,w(e.sort),e.dataSource,e.composeCode),K=e=>{const t=Object.fromEntries(Object.entries(e.context).map(([r,s])=>{if(s&&typeof s=="object"&&"__serializable"in s)switch(s.__serializable){case"DimensionalAttribute":return[r,U(s)];case"DimensionalLevelAttribute":return[r,Q(s)];case"DimensionalBaseMeasure":return[r,q(s)];case"DimensionalCalculatedMeasure":return[r,K(s)];default:return[r,s]}return[r,s]}));return new l.DimensionalCalculatedMeasure(e.name,e.expression,t,e.format,e.description,w(e.sort),e.dataSource,e.composeCode)},De=e=>new l.DimensionalMeasureTemplate(e.name,m(e.attribute),e.format,e.description,w(e.sort),e.dataSource,e.composeCode),se=e=>{switch(e.__serializable){case"DimensionalBaseMeasure":return q(e);case"DimensionalCalculatedMeasure":return K(e);case"DimensionalMeasureTemplate":return De(e);default:return e}},f=e=>{switch(e.__serializable){case"MembersFilter":return new l.MembersFilter(m(e.attribute),e.members,e.config.backgroundFilter?k(h({},e.config),{backgroundFilter:f(e.config.backgroundFilter)}):e.config,e.composeCode);case"LogicalAttributeFilter":return new l.LogicalAttributeFilter(e.filters.map(r=>f(r)),e.operator,e.config,e.composeCode);case"CascadingFilter":return new l.CascadingFilter(e._filters.map(r=>f(r)),e.config,e.composeCode);case"ExcludeFilter":return new l.ExcludeFilter(f(e.filter),e.input?f(e.input):void 0,e.config,e.composeCode);case"MeasureFilter":return new l.MeasureFilter(m(e.attribute),se(e.measure),e.operatorA,e.valueA,e.operatorB,e.valueB,e.config,e.composeCode);case"RankingFilter":return new l.RankingFilter(m(e.attribute),se(e.measure),e.operator,e.count,e.config,e.composeCode);case"NumericFilter":return new l.NumericFilter(m(e.attribute),e.operatorA,e.valueA,e.operatorB,e.valueB,e.config,e.composeCode);case"TextFilter":return new l.TextFilter(m(e.attribute),e.operatorA,e.valueA,e.config,e.composeCode);case"DateRangeFilter":{const{valueA:r,valueB:s}=e;return new l.DateRangeFilter(m(e.attribute),r,s,e.config,e.composeCode)}case"RelativeDateFilter":return new l.RelativeDateFilter(m(e.attribute),e.offset,e.count,e.operator,e.anchor,e.config,e.composeCode);case"CustomFilter":return new l.CustomFilter(m(e.attribute),e.jaqlExpression,e.config,e.composeCode);default:return e}};c.registerCustom({isApplicable:b.isJaqlElement,serialize:e=>e.serialize(),deserialize:e=>at(e)},"JaqlElement");c.registerCustom({isApplicable:l.isDimensionalAttribute,serialize:e=>e.serialize(),deserialize:e=>U(e)},"DimensionalAttribute");c.registerCustom({isApplicable:l.isDimensionalLevelAttribute,serialize:e=>e.serialize(),deserialize:e=>Q(e)},"DimensionalLevelAttribute");c.registerCustom({isApplicable:P.isDimensionalDimension,serialize:e=>e.serialize(),deserialize:e=>Ae(e)},"DimensionalDimension");c.registerCustom({isApplicable:P.isDimensionalDateDimension,serialize:e=>e.serialize(),deserialize:e=>Ee(e)},"DimensionalDateDimension");c.registerCustom({isApplicable:l.isDimensionalBaseMeasure,serialize:e=>e.serialize(),deserialize:e=>q(e)},"DimensionalBaseMeasure");c.registerCustom({isApplicable:l.isDimensionalCalculatedMeasure,serialize:e=>e.serialize(),deserialize:e=>K(e)},"DimensionalCalculatedMeasure");c.registerCustom({isApplicable:l.isDimensionalMeasureTemplate,serialize:e=>e.serialize(),deserialize:e=>De(e)},"DimensionalMeasureTemplate");c.registerCustom({isApplicable:l.isMembersFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"MembersFilter");c.registerCustom({isApplicable:l.isLogicalAttributeFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"LogicalAttributeFilter");c.registerCustom({isApplicable:l.isCascadingFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"CascadingFilter");c.registerCustom({isApplicable:l.isExcludeFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"ExcludeFilter");c.registerCustom({isApplicable:l.isMeasureFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"MeasureFilter");c.registerCustom({isApplicable:l.isRankingFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"RankingFilter");c.registerCustom({isApplicable:l.isNumericFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"NumericFilter");c.registerCustom({isApplicable:l.isTextFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"TextFilter");c.registerCustom({isApplicable:l.isDateRangeFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"DateRangeFilter");c.registerCustom({isApplicable:l.isRelativeDateFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"RelativeDateFilter");c.registerCustom({isApplicable:l.isCustomFilter,serialize:e=>e.serialize(),deserialize:e=>f(e)},"CustomFilter");const ct=c,D="DM.";function ut(e){return typeof e=="object"&&e!==null&&"function"in e&&"args"in e}function Y(e){return e.every(ut)}function W(e){return"attribute"in e&&"config"in e}function H(e){return"left"in e&&"right"in e&&"operator"in e}function ft(e){return!W(e)&&!H(e)}function X(e,t){const r={},s=e!==""?e+".":"";for(const n in t)if(typeof t[`${n}`]=="function")r[`${s}${n}`]=t[`${n}`];else if(typeof t[`${n}`]=="object"){const i=X("",t[`${n}`]);for(const o in i)r[`${s}${n}.${o}`]=i[`${o}`]}return r}const ne=X("measureFactory",l.measureFactory),ie=X("filterFactory",l.filterFactory);function mt(e,t){const s=e.split(".")[0];if(s==="filterFactory"&&ie[`${e}`])return ie[`${e}`](...t);if(s==="measureFactory"&&ne[`${e}`])return ne[`${e}`](...t);throw new Error(`Function "${e}" not found in filterFactory or measureFactory.`)}function dt(e){const t=e.split(".");if(t.length<3||`${t[0]}.`!==D)throw new Error(`Invalid attribute name format: "${e}". Expected format: "${D}TableName.ColumnName[.Level]".`);const r=t[1],s=t[2];let n;return t.length===4&&(n=t[3]),{tableName:r,columnName:s,level:n}}function pt(e,t){const{tableName:r,columnName:s,level:n}=dt(e),i=t.find(a=>a.name===r);if(!i)throw new Error(`Table "${r}" not found in the data model.`);const o=i.columns.find(a=>a.name===s);if(!o)throw new Error(`Column "${s}" not found in table "${r}".`);if(n){if(o.dataType!==l.DataType.DATETIME)throw new Error(`Invalid date level "${n}" in attribute "${e}". Column "${r}.${s}" is not a datetime column.`);const a=l.DateLevels.all;if(!a.includes(n))throw new Error(`Invalid date level "${n}" in attribute "${e}". Valid levels are: ${a.join(", ")}.`)}return{field:o,level:n}}function gt(e,t){if(e.startsWith(D))return{isLikelyAttribute:!0,suggestion:e};const r=e.split(".");if(r.length===2){const[s,n]=r,i=t.some(o=>o.name===s&&o.columns.some(a=>a.name===n));return i?{isLikelyAttribute:i,suggestion:`${D}${e}`}:{isLikelyAttribute:!1}}if(r.length===3){const[s,n,i]=r,o=t.find(u=>u.name===s);if(!o)return{isLikelyAttribute:!1};const a=o.columns.find(u=>u.name===n);return a?a.dataType===l.DataType.DATETIME&&l.DateLevels.all.includes(i)?{isLikelyAttribute:!0,suggestion:`${D}${e}`}:{isLikelyAttribute:!1}:{isLikelyAttribute:!1}}return{isLikelyAttribute:!1}}function Fe(e,t,r){const{field:s,level:n}=pt(e,r);return l.createAttributeHelper({expression:s.expression,dataType:s.dataType,granularity:n,format:void 0,sort:void 0,dataSource:t})}function yt(e,t,r){if(typeof e=="object"&&e!==null&&!Array.isArray(e)&&"function"in e&&"args"in e)return O(e,t,r);if(typeof e=="string"){if(e.startsWith(D))return Fe(e,t,r);const{isLikelyAttribute:s,suggestion:n}=gt(e,r);if(s)throw new Error(`Invalid attribute format: "${e}". Did you mean "${n}"?`)}return e}function O(e,t,r){const{function:s,args:n}=e,i=n.map(o=>yt(o,t,r));return mt(s,i)}function ze(e){const{attribute:t,config:r}=e;if(l.isMembersFilter(e)&&l.isLevelAttribute(t)){const{granularity:s}=t;return l.members(t,e.members.map(n=>s==="Years"&&!isNaN(Number(n))?`${n}-01-01T00:00:00`:n),r)}return e}function bt(e){let t=[];for(const r of e)H(r)?t=l.mergeFiltersOrFilterRelations(r,t):t=l.mergeFiltersOrFilterRelations([ze(r)],t);return t!=null?t:[]}const ht=(e,t,r)=>{const s=[],n=[];return e.forEach((i,o)=>{try{const a=O(i,t,r);!H(a)&&!W(a)?n.push(`Filter ${o+1} (${i.function}): Invalid filter JSON`):s.push(a)}catch(a){const u=a instanceof Error?a.message:"Unknown error";n.push(`Filter ${o+1} (${i.function}): ${u}`)}}),n.length>0?{success:!1,errors:n}:{success:!0,data:bt(s)}},wt=(e,t,r)=>e?Y(e)?ht(e,t,r):{success:!1,errors:['Invalid filters JSON. Expected an array of function calls with "function" and "args" properties.']}:{success:!0,data:[]},At=(e,t,r)=>{const s=[],n=[];return e.forEach((i,o)=>{try{const a=O(i,t,r);W(a)?s.push(ze(a)):n.push(`Highlight ${o+1} (${i.function}): Invalid filter JSON`)}catch(a){const u=a instanceof Error?a.message:"Unknown error";n.push(`Highlight ${o+1} (${i.function}): ${u}`)}}),n.length>0?{success:!1,errors:n}:{success:!0,data:s}},Et=(e,t,r)=>e?Y(e)?At(e,t,r):{success:!1,errors:['Invalid highlights JSON. Expected an array of function calls with "function" and "args" properties.']}:{success:!0,data:[]};function Dt(e){return e.every(t=>typeof t=="string")}const Ft=(e,t,r)=>{if(!e)return{success:!0,data:[]};if(!Dt(e))return{success:!1,errors:["Invalid dimensions JSON. Expected an array of strings."]};const s=[],n=[];return e.forEach((i,o)=>{try{const a=Fe(i,t,r);s.push(a)}catch(a){const u=a instanceof Error?a.message:"Unknown error";n.push(`Dimension ${o+1} ("${i}"): ${u}`)}}),n.length>0?{success:!1,errors:n}:{success:!0,data:s}},zt=(e,t,r)=>{const s=[],n=[];return e.forEach((i,o)=>{try{const a=O(i,t,r);ft(a)?s.push(a):n.push(`Measure ${o+1} (${i.function}): Invalid measure JSON`)}catch(a){const u=a instanceof Error?a.message:"Unknown error";n.push(`Measure ${o+1} (${i.function}): ${u}`)}}),n.length>0?{success:!1,errors:n}:{success:!0,data:s}},Ct=(e,t,r)=>e?Y(e)?zt(e,t,r):{success:!1,errors:['Invalid measures JSON. Expected an array of function calls with "function" and "args" properties.']}:{success:!0,data:[]};function Rt(e){const t={},r=[];for(const s in e){const n=e[`${s}`],i=n();if(i.success)t[`${s}`]=i.data;else{const o=i.errors.map(a=>`[${s}] ${a}`);r.push(...o)}}return r.length>0?{success:!1,errors:r}:{success:!0,data:t}}const Tt=(e,t,r)=>{const s={dimensions:()=>Ft(e.dimensions||[],t,r),measures:()=>Ct(e.measures||[],t,r),filters:()=>wt(e.filters||[],t,r)};e.highlights&&(s.highlights=()=>Et(e.highlights||[],t,r));const n=Rt(s);if(!n.success){const o=`Translation failed with ${n.errors.length} error(s):
2
+ ${n.errors.join(`
3
+ `)}`;throw new Error(o)}return h({dataSource:l.convertDataSource(t)},n.data)};function It(e){const{filters:t,relations:r}=l.getFilterListAndRelationsJaql(e.filters||[]);return{dataSource:e.dataSource,dimensions:e.dimensions,measures:e.measures,filters:t,filterRelations:r,highlights:e.highlights}}function Mt(e,t,r=!1){const s=It(e),n=l.prepareQueryParams(s,t);return l.getJaqlQueryPayload(n,r)}exports.EMPTY_EXPANDED_QUERY_MODEL=b.EMPTY_EXPANDED_QUERY_MODEL;exports.EMPTY_SIMPLE_QUERY_MODEL=b.EMPTY_SIMPLE_QUERY_MODEL;exports.isByIdDashboardCodeParams=b.isByIdDashboardCodeParams;exports.isByIdWidgetCodeParams=b.isByIdWidgetCodeParams;exports.isClientSideDashboardCodeParams=b.isClientSideDashboardCodeParams;exports.isClientSideWidgetCodeParams=b.isClientSideWidgetCodeParams;exports.CustomSuperJSON=ct;exports.translateQueryJSON=Tt;exports.translateQueryToJaql=Mt;
@@ -0,0 +1 @@
1
+ export * from '../packages/sdk-ui/src/analytics-composer/index-node'