@embeddable.com/remarkable-pro 0.3.9 → 0.3.11

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 (161) hide show
  1. package/dist/AreaChartPro.js +1 -1
  2. package/dist/BarChartDefaultHorizontalPro.js +1 -1
  3. package/dist/BarChartDefaultPro.js +1 -1
  4. package/dist/BarChartGroupedHorizontalPro.js +1 -1
  5. package/dist/BarChartGroupedPro.js +1 -1
  6. package/dist/BarChartStackedHorizontalPro.js +1 -1
  7. package/dist/BarChartStackedPro.js +1 -1
  8. package/dist/BarLineChartPro.js +1 -1
  9. package/dist/BubbleChartPro.js +1 -1
  10. package/dist/ComparisonPeriodSelectFieldPro.js +1 -1
  11. package/dist/DateRangePickerCustomPro.js +1 -1
  12. package/dist/DateRangeSelectFieldPro.js +1 -1
  13. package/dist/{DimensionAndMeasureSingleSelectField-CC5BTau4.js → DimensionAndMeasureSingleSelectField-_jJAx5WA.js} +2 -2
  14. package/dist/{DimensionAndMeasureSingleSelectField-CC5BTau4.js.map → DimensionAndMeasureSingleSelectField-_jJAx5WA.js.map} +1 -1
  15. package/dist/DimensionMeasureMultiSelectFieldPro.js +1 -1
  16. package/dist/DimensionSingleSelectFieldPro.js +1 -1
  17. package/dist/DonutChartPro.js +1 -1
  18. package/dist/DonutLabelChartPro.js +1 -1
  19. package/dist/FilterBuilderPro.js +1 -1
  20. package/dist/{GranularitySelectField-D9mv6FF7.js → GranularitySelectField-DqIroVY8.js} +2 -2
  21. package/dist/{GranularitySelectField-D9mv6FF7.js.map → GranularitySelectField-DqIroVY8.js.map} +1 -1
  22. package/dist/GranularitySelectFieldPro.js +1 -1
  23. package/dist/HeatMapPro.js +1 -1
  24. package/dist/HorizontalDividerPro.js +1 -1
  25. package/dist/KpiChartNumberComparisonPro.js +1 -1
  26. package/dist/KpiChartNumberPro.js +1 -1
  27. package/dist/LineChartComparisonDefaultPro.js +1 -1
  28. package/dist/LineChartComparisonWithKpiTabsPro.js +1 -1
  29. package/dist/LineChartDefaultPro.js +1 -1
  30. package/dist/LineChartGroupedPro.js +1 -1
  31. package/dist/LineChartWithKpiTabsPro.js +1 -1
  32. package/dist/MarkdownPro.js +1 -1
  33. package/dist/MeasureMultiSelectFieldPro.js +1 -1
  34. package/dist/MeasureSingleSelectFieldPro.js +1 -1
  35. package/dist/MultiSelectFieldPro.js +1 -1
  36. package/dist/PieChartPro.js +1 -1
  37. package/dist/PivotTablePro.js +1 -1
  38. package/dist/ScatterChartPro.js +1 -1
  39. package/dist/SingleSelectFieldPro.js +1 -1
  40. package/dist/TableChartPaginated.js +1 -1
  41. package/dist/TableScrollable.js +1 -1
  42. package/dist/TextFieldPro.js +1 -1
  43. package/dist/{bars.loadData.utils-fZI0VNkB.js → bars.loadData.utils-UhQFoiF3.js} +3 -3
  44. package/dist/{bars.loadData.utils-fZI0VNkB.js.map → bars.loadData.utils-UhQFoiF3.js.map} +1 -1
  45. package/dist/{bars.utils-BR7xdKJL.js → bars.utils-BGi2vvkU.js} +3 -3
  46. package/dist/{bars.utils-BR7xdKJL.js.map → bars.utils-BGi2vvkU.js.map} +1 -1
  47. package/dist/{charts.fillGaps.hooks-tjjJ-L-X.js → charts.fillGaps.hooks-ImD798b-.js} +34 -34
  48. package/dist/charts.fillGaps.hooks-ImD798b-.js.map +1 -0
  49. package/dist/{component.inputs.constants-WqUoEXZX.js → component.inputs.constants-CJRHMXHA.js} +178 -168
  50. package/dist/component.inputs.constants-CJRHMXHA.js.map +1 -0
  51. package/dist/components/charts/charts.fillGaps.hooks.d.ts.map +1 -1
  52. package/dist/components/component.subinputs.constants.d.ts +8 -0
  53. package/dist/components/component.subinputs.constants.d.ts.map +1 -1
  54. package/dist/{definition-rVkVVeS6.js → definition-3QpYOtAr.js} +3 -3
  55. package/dist/{definition-rVkVVeS6.js.map → definition-3QpYOtAr.js.map} +1 -1
  56. package/dist/{definition-CUET0bC2.js → definition-81RJMlxU.js} +3 -3
  57. package/dist/{definition-CUET0bC2.js.map → definition-81RJMlxU.js.map} +1 -1
  58. package/dist/{definition-DqaokgFC.js → definition-BAb2u4mc.js} +6 -6
  59. package/dist/{definition-DqaokgFC.js.map → definition-BAb2u4mc.js.map} +1 -1
  60. package/dist/{definition-hq9u01ar.js → definition-BLXhy0w7.js} +2 -2
  61. package/dist/{definition-hq9u01ar.js.map → definition-BLXhy0w7.js.map} +1 -1
  62. package/dist/{definition-D8XbATlY.js → definition-BObbBhcm.js} +5 -5
  63. package/dist/{definition-D8XbATlY.js.map → definition-BObbBhcm.js.map} +1 -1
  64. package/dist/{definition-DeAu3Owr.js → definition-BSCzplhq.js} +3 -3
  65. package/dist/{definition-DeAu3Owr.js.map → definition-BSCzplhq.js.map} +1 -1
  66. package/dist/{definition-BWuUDcjc.js → definition-BT_TJ2xu.js} +6 -6
  67. package/dist/{definition-BWuUDcjc.js.map → definition-BT_TJ2xu.js.map} +1 -1
  68. package/dist/{definition-DanyoB3T.js → definition-BUb4WQQi.js} +4 -4
  69. package/dist/{definition-DanyoB3T.js.map → definition-BUb4WQQi.js.map} +1 -1
  70. package/dist/{definition-BKo_lK59.js → definition-BUjb1Q6D.js} +2 -2
  71. package/dist/{definition-BKo_lK59.js.map → definition-BUjb1Q6D.js.map} +1 -1
  72. package/dist/{definition-CUhQEZ6r.js → definition-BVKJiEOy.js} +3 -3
  73. package/dist/{definition-CUhQEZ6r.js.map → definition-BVKJiEOy.js.map} +1 -1
  74. package/dist/{definition-o-5gD8vB.js → definition-BWMkkQfu.js} +3 -3
  75. package/dist/{definition-o-5gD8vB.js.map → definition-BWMkkQfu.js.map} +1 -1
  76. package/dist/{definition-DvNvLADK.js → definition-BhJTfgLy.js} +3 -3
  77. package/dist/{definition-DvNvLADK.js.map → definition-BhJTfgLy.js.map} +1 -1
  78. package/dist/{definition-BNBB0_t9.js → definition-Bhq5zlSY.js} +6 -6
  79. package/dist/{definition-BNBB0_t9.js.map → definition-Bhq5zlSY.js.map} +1 -1
  80. package/dist/{definition-C9JkxGxC.js → definition-BhzssiIh.js} +3 -3
  81. package/dist/{definition-C9JkxGxC.js.map → definition-BhzssiIh.js.map} +1 -1
  82. package/dist/{definition-7QqFZpBX.js → definition-Bumjg1Nc.js} +5 -5
  83. package/dist/{definition-7QqFZpBX.js.map → definition-Bumjg1Nc.js.map} +1 -1
  84. package/dist/{definition-H0k6JdIe.js → definition-BwAHlBSA.js} +3 -3
  85. package/dist/{definition-H0k6JdIe.js.map → definition-BwAHlBSA.js.map} +1 -1
  86. package/dist/{definition-a4k4zu-S.js → definition-C7M49DO-.js} +2 -2
  87. package/dist/{definition-a4k4zu-S.js.map → definition-C7M49DO-.js.map} +1 -1
  88. package/dist/{definition-DtgG_A8G.js → definition-C9J7qbst.js} +3 -3
  89. package/dist/{definition-DtgG_A8G.js.map → definition-C9J7qbst.js.map} +1 -1
  90. package/dist/{definition-BxGoL7F_.js → definition-CB2yhrXd.js} +3 -3
  91. package/dist/{definition-BxGoL7F_.js.map → definition-CB2yhrXd.js.map} +1 -1
  92. package/dist/{definition-Djha-scF.js → definition-CI1F6BYS.js} +4 -4
  93. package/dist/{definition-Djha-scF.js.map → definition-CI1F6BYS.js.map} +1 -1
  94. package/dist/{definition-CU5wU8GH.js → definition-CKr3luD3.js} +6 -6
  95. package/dist/{definition-CU5wU8GH.js.map → definition-CKr3luD3.js.map} +1 -1
  96. package/dist/{definition-_WRoLhz1.js → definition-CUecLROw.js} +2 -2
  97. package/dist/{definition-_WRoLhz1.js.map → definition-CUecLROw.js.map} +1 -1
  98. package/dist/{definition-DkgbKZS3.js → definition-CWC28cKE.js} +2 -2
  99. package/dist/{definition-DkgbKZS3.js.map → definition-CWC28cKE.js.map} +1 -1
  100. package/dist/{definition-B-ha7ip9.js → definition-Cc3GuVLL.js} +3 -3
  101. package/dist/{definition-B-ha7ip9.js.map → definition-Cc3GuVLL.js.map} +1 -1
  102. package/dist/{definition-oU2ZMz1V.js → definition-Cvmrf_Av.js} +5 -5
  103. package/dist/{definition-oU2ZMz1V.js.map → definition-Cvmrf_Av.js.map} +1 -1
  104. package/dist/{definition-B1mBn8UP.js → definition-CzIq3snB.js} +5 -5
  105. package/dist/{definition-B1mBn8UP.js.map → definition-CzIq3snB.js.map} +1 -1
  106. package/dist/{definition-BE7dzWJf.js → definition-D5M0-YDz.js} +6 -6
  107. package/dist/{definition-BE7dzWJf.js.map → definition-D5M0-YDz.js.map} +1 -1
  108. package/dist/{definition-BrCdk9h7.js → definition-DA1NiTYd.js} +4 -4
  109. package/dist/{definition-BrCdk9h7.js.map → definition-DA1NiTYd.js.map} +1 -1
  110. package/dist/{definition-Df9xEGGh.js → definition-DBm7UExP.js} +6 -6
  111. package/dist/{definition-Df9xEGGh.js.map → definition-DBm7UExP.js.map} +1 -1
  112. package/dist/{definition-D0Ofarri.js → definition-DCw41pB6.js} +3 -3
  113. package/dist/{definition-D0Ofarri.js.map → definition-DCw41pB6.js.map} +1 -1
  114. package/dist/{definition-DwgGLIsi.js → definition-DGm0gnDo.js} +4 -4
  115. package/dist/{definition-DwgGLIsi.js.map → definition-DGm0gnDo.js.map} +1 -1
  116. package/dist/{definition-CvLRALjd.js → definition-DOgO1UO1.js} +3 -3
  117. package/dist/{definition-CvLRALjd.js.map → definition-DOgO1UO1.js.map} +1 -1
  118. package/dist/{definition-BKTuIe2e.js → definition-DYRmzQG8.js} +5 -5
  119. package/dist/{definition-BKTuIe2e.js.map → definition-DYRmzQG8.js.map} +1 -1
  120. package/dist/{definition-BrGnOErk.js → definition-QQGyselv.js} +3 -3
  121. package/dist/{definition-BrGnOErk.js.map → definition-QQGyselv.js.map} +1 -1
  122. package/dist/{definition-DwxvVeU1.js → definition-ViiZJXzp.js} +3 -3
  123. package/dist/{definition-DwxvVeU1.js.map → definition-ViiZJXzp.js.map} +1 -1
  124. package/dist/{definition-DTw_4bG-.js → definition-WpA0B1mq.js} +5 -5
  125. package/dist/{definition-DTw_4bG-.js.map → definition-WpA0B1mq.js.map} +1 -1
  126. package/dist/{definition-DFfB8LEv.js → definition-n2w2opqD.js} +4 -4
  127. package/dist/{definition-DFfB8LEv.js.map → definition-n2w2opqD.js.map} +1 -1
  128. package/dist/{definition-Bq-44rMc.js → definition-v65ricVf.js} +2 -2
  129. package/dist/{definition-Bq-44rMc.js.map → definition-v65ricVf.js.map} +1 -1
  130. package/dist/{dimensionsAndMeasures.utils-Bkihe1T9.js → dimensionsAndMeasures.utils-6WmCMSx-.js} +2 -2
  131. package/dist/{dimensionsAndMeasures.utils-Bkihe1T9.js.map → dimensionsAndMeasures.utils-6WmCMSx-.js.map} +1 -1
  132. package/dist/embeddable-components.json +46 -46
  133. package/dist/{formatter.utils-CFf9W7Jq.js → formatter.utils-BaA4WFcv.js} +2 -2
  134. package/dist/{formatter.utils-CFf9W7Jq.js.map → formatter.utils-BaA4WFcv.js.map} +1 -1
  135. package/dist/{granularity.utils-Ck8am6YG.js → granularity.utils-BXLMSveL.js} +2 -2
  136. package/dist/{granularity.utils-Ck8am6YG.js.map → granularity.utils-BXLMSveL.js.map} +1 -1
  137. package/dist/index.js +49 -49
  138. package/dist/meta/AreaChartPro.meta.json +11 -1
  139. package/dist/meta/BarChartDefaultHorizontalPro.meta.json +11 -1
  140. package/dist/meta/BarChartDefaultPro.meta.json +11 -1
  141. package/dist/meta/BarChartGroupedHorizontalPro.meta.json +11 -1
  142. package/dist/meta/BarChartGroupedPro.meta.json +11 -1
  143. package/dist/meta/BarChartStackedHorizontalPro.meta.json +11 -1
  144. package/dist/meta/BarChartStackedPro.meta.json +11 -1
  145. package/dist/meta/BarLineChartPro.meta.json +11 -1
  146. package/dist/meta/HeatMapPro.meta.json +20 -0
  147. package/dist/meta/LineChartComparisonDefaultPro.meta.json +11 -1
  148. package/dist/meta/LineChartComparisonWithKpiTabsPro.meta.json +11 -1
  149. package/dist/meta/LineChartDefaultPro.meta.json +11 -1
  150. package/dist/meta/LineChartGroupedPro.meta.json +11 -1
  151. package/dist/meta/LineChartWithKpiTabsPro.meta.json +11 -1
  152. package/dist/meta/PivotTablePro.meta.json +20 -0
  153. package/dist/{pies.utils-DmDV0WY9.js → pies.utils-vf7_pmdH.js} +3 -3
  154. package/dist/{pies.utils-DmDV0WY9.js.map → pies.utils-vf7_pmdH.js.map} +1 -1
  155. package/dist/{tables.utils-2q0j8fQN.js → tables.utils-Be6yca9d.js} +3 -3
  156. package/dist/{tables.utils-2q0j8fQN.js.map → tables.utils-Be6yca9d.js.map} +1 -1
  157. package/dist/{theme.constants-OTt5Bo-V.js → theme.constants-gny2xWxf.js} +3 -3
  158. package/dist/{theme.constants-OTt5Bo-V.js.map → theme.constants-gny2xWxf.js.map} +1 -1
  159. package/package.json +1 -1
  160. package/dist/charts.fillGaps.hooks-tjjJ-L-X.js.map +0 -1
  161. package/dist/component.inputs.constants-WqUoEXZX.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"granularity.utils-Ck8am6YG.js","sources":["../src/components/charts/shared/ChartGranularitySelectField/ChartGranularitySelectField.tsx","../src/components/charts/utils/granularity.utils.ts"],"sourcesContent":["import { Dimension, Granularity } from '@embeddable.com/core';\nimport {\n GranularitySelectField,\n GranularitySelectFieldProps,\n} from '../../../editors/shared/GranularitySelectField/GranularitySelectField';\nimport styles from './ChartGranularitySelectField.module.css';\nimport clsx from 'clsx';\n\nexport type ChartGranularitySelectFieldProps = Pick<GranularitySelectFieldProps, 'onChange'> & {\n dimension: Dimension;\n hasMarginTop?: boolean;\n};\n\nconst dimensionGranularities: Granularity[] = ['day', 'week', 'month', 'quarter', 'year'];\n\nexport const ChartGranularitySelectField = ({\n dimension,\n hasMarginTop,\n ...props\n}: ChartGranularitySelectFieldProps) => {\n const showGranularitySelector = dimension?.inputs?.showGranularityDropdown;\n\n if (!showGranularitySelector) {\n return null;\n }\n\n const dimensionTimeRange = dimension.inputs?.dateBounds;\n const dimensionGranularity = dimension.inputs?.granularity;\n\n return (\n <div\n className={clsx(\n styles.chartGranularitySelectFieldContainer,\n hasMarginTop && styles.marginTop,\n )}\n >\n <GranularitySelectField\n {...props}\n primaryTimeRange={dimensionTimeRange}\n granularity={dimensionGranularity}\n granularities={dimensionGranularities}\n variant=\"ghost\"\n side=\"bottom\"\n align=\"end\"\n />\n </div>\n );\n};\n","import { Dimension, Granularity } from '@embeddable.com/core';\n\nexport const getDimensionWithGranularity = (\n dimension: Dimension,\n granularity?: Granularity,\n): Dimension => {\n const currentGranularity = granularity ?? dimension.inputs?.granularity;\n\n return {\n ...dimension,\n inputs: {\n ...dimension.inputs,\n granularity: currentGranularity,\n },\n };\n};\n"],"names":["dimensionGranularities","ChartGranularitySelectField","dimension","hasMarginTop","props","_a","dimensionTimeRange","_b","dimensionGranularity","_c","jsx","clsx","styles","GranularitySelectField","getDimensionWithGranularity","granularity","currentGranularity"],"mappings":";;;;;GAaMA,IAAwC,CAAC,OAAO,QAAQ,SAAS,WAAW,MAAM,GAE3EC,IAA8B,CAAC;AAAA,EAC1C,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,GAAGC;AACL,MAAwC;;AAGtC,MAAI,GAF4BC,IAAAH,KAAA,gBAAAA,EAAW,WAAX,gBAAAG,EAAmB;AAGjD,WAAO;AAGT,QAAMC,KAAqBC,IAAAL,EAAU,WAAV,gBAAAK,EAAkB,YACvCC,KAAuBC,IAAAP,EAAU,WAAV,gBAAAO,EAAkB;AAE/C,SACEC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO;AAAA,QACPT,KAAgBS,EAAO;AAAA,MAAA;AAAA,MAGzB,UAAAF,gBAAAA,EAAAA;AAAAA,QAACG;AAAA,QAAA;AAAA,UACE,GAAGT;AAAA,UACJ,kBAAkBE;AAAA,UAClB,aAAaE;AAAA,UACb,eAAeR;AAAA,UACf,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IACR;AAAA,EAAA;AAGN,GC7Cac,IAA8B,CACzCZ,GACAa,MACc;;AACd,QAAMC,IAAqBD,OAAeV,IAAAH,EAAU,WAAV,gBAAAG,EAAkB;AAE5D,SAAO;AAAA,IACL,GAAGH;AAAA,IACH,QAAQ;AAAA,MACN,GAAGA,EAAU;AAAA,MACb,aAAac;AAAA,IAAA;AAAA,EACf;AAEJ;"}
1
+ {"version":3,"file":"granularity.utils-BXLMSveL.js","sources":["../src/components/charts/shared/ChartGranularitySelectField/ChartGranularitySelectField.tsx","../src/components/charts/utils/granularity.utils.ts"],"sourcesContent":["import { Dimension, Granularity } from '@embeddable.com/core';\nimport {\n GranularitySelectField,\n GranularitySelectFieldProps,\n} from '../../../editors/shared/GranularitySelectField/GranularitySelectField';\nimport styles from './ChartGranularitySelectField.module.css';\nimport clsx from 'clsx';\n\nexport type ChartGranularitySelectFieldProps = Pick<GranularitySelectFieldProps, 'onChange'> & {\n dimension: Dimension;\n hasMarginTop?: boolean;\n};\n\nconst dimensionGranularities: Granularity[] = ['day', 'week', 'month', 'quarter', 'year'];\n\nexport const ChartGranularitySelectField = ({\n dimension,\n hasMarginTop,\n ...props\n}: ChartGranularitySelectFieldProps) => {\n const showGranularitySelector = dimension?.inputs?.showGranularityDropdown;\n\n if (!showGranularitySelector) {\n return null;\n }\n\n const dimensionTimeRange = dimension.inputs?.dateBounds;\n const dimensionGranularity = dimension.inputs?.granularity;\n\n return (\n <div\n className={clsx(\n styles.chartGranularitySelectFieldContainer,\n hasMarginTop && styles.marginTop,\n )}\n >\n <GranularitySelectField\n {...props}\n primaryTimeRange={dimensionTimeRange}\n granularity={dimensionGranularity}\n granularities={dimensionGranularities}\n variant=\"ghost\"\n side=\"bottom\"\n align=\"end\"\n />\n </div>\n );\n};\n","import { Dimension, Granularity } from '@embeddable.com/core';\n\nexport const getDimensionWithGranularity = (\n dimension: Dimension,\n granularity?: Granularity,\n): Dimension => {\n const currentGranularity = granularity ?? dimension.inputs?.granularity;\n\n return {\n ...dimension,\n inputs: {\n ...dimension.inputs,\n granularity: currentGranularity,\n },\n };\n};\n"],"names":["dimensionGranularities","ChartGranularitySelectField","dimension","hasMarginTop","props","_a","dimensionTimeRange","_b","dimensionGranularity","_c","jsx","clsx","styles","GranularitySelectField","getDimensionWithGranularity","granularity","currentGranularity"],"mappings":";;;;;GAaMA,IAAwC,CAAC,OAAO,QAAQ,SAAS,WAAW,MAAM,GAE3EC,IAA8B,CAAC;AAAA,EAC1C,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,GAAGC;AACL,MAAwC;;AAGtC,MAAI,GAF4BC,IAAAH,KAAA,gBAAAA,EAAW,WAAX,gBAAAG,EAAmB;AAGjD,WAAO;AAGT,QAAMC,KAAqBC,IAAAL,EAAU,WAAV,gBAAAK,EAAkB,YACvCC,KAAuBC,IAAAP,EAAU,WAAV,gBAAAO,EAAkB;AAE/C,SACEC,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTC,EAAO;AAAA,QACPT,KAAgBS,EAAO;AAAA,MAAA;AAAA,MAGzB,UAAAF,gBAAAA,EAAAA;AAAAA,QAACG;AAAA,QAAA;AAAA,UACE,GAAGT;AAAA,UACJ,kBAAkBE;AAAA,UAClB,aAAaE;AAAA,UACb,eAAeR;AAAA,UACf,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IACR;AAAA,EAAA;AAGN,GC7Cac,IAA8B,CACzCZ,GACAa,MACc;;AACd,QAAMC,IAAqBD,OAAeV,IAAAH,EAAU,WAAV,gBAAAG,EAAkB;AAE5D,SAAO;AAAA,IACL,GAAGH;AAAA,IACH,QAAQ;AAAA,MACN,GAAGA,EAAU;AAAA,MACb,aAAac;AAAA,IAAA;AAAA,EACf;AAEJ;"}
package/dist/index.js CHANGED
@@ -1,64 +1,64 @@
1
1
  import { a as C, g as f, b, i as x } from "./styles.utils-C8CnV0SB.js";
2
2
  import { i as D, s as T } from "./color.utils-BSg_DFOh.js";
3
- import { c as y, a as k, b as L, g as R, i as O } from "./formatter.utils-CFf9W7Jq.js";
3
+ import { c as y, a as k, b as L, g as R, i as O } from "./formatter.utils-BaA4WFcv.js";
4
4
  import { b as G, c as A, a as B, g as M, l as H, d as v, u as w } from "./dates.utils-DbQ1olEB.js";
5
- import { d as I, a as j, b as K, c as N, e as _, f as z, g as W, r as V, h as q, i as U } from "./theme.constants-OTt5Bo-V.js";
5
+ import { d as I, a as j, b as K, c as N, e as _, f as z, g as W, r as V, h as q, i as U } from "./theme.constants-gny2xWxf.js";
6
6
  import { a as Y, i as Z, r as J, b as Q } from "./component.utils-oQMZT7TK.js";
7
- import { C as ae, a as re, E as te, G as oe, d as se, b as ie, c as ne, i as le, s as pe, t as me, e as de } from "./component.inputs.constants-WqUoEXZX.js";
7
+ import { C as ae, a as re, E as te, G as oe, d as se, b as ie, c as ne, i as le, s as pe, t as me, e as de } from "./component.inputs.constants-CJRHMXHA.js";
8
8
  import { g as ue, a as ge } from "./timeRange.utils-kK6r26ZO.js";
9
9
  import { p as he } from "./preview.data.constants-DyU7ur6g.js";
10
- import { i as fe, b as be } from "./definition-DTw_4bG-.js";
11
- import { i as Se, b as De } from "./definition-BNBB0_t9.js";
12
- import { i as Fe, b as ye } from "./definition-BE7dzWJf.js";
13
- import { i as Le, b as Re } from "./definition-B1mBn8UP.js";
14
- import { i as Ee, b as Ge } from "./definition-BWuUDcjc.js";
15
- import { i as Be, b as Me } from "./definition-CU5wU8GH.js";
16
- import { g as ve, a as we, b as $e, c as Ie } from "./bars.utils-BR7xdKJL.js";
17
- import { i as Ke, k as Ne } from "./definition-BxGoL7F_.js";
18
- import { i as ze, k as We } from "./definition-rVkVVeS6.js";
10
+ import { i as fe, b as be } from "./definition-WpA0B1mq.js";
11
+ import { i as Se, b as De } from "./definition-Bhq5zlSY.js";
12
+ import { i as Fe, b as ye } from "./definition-D5M0-YDz.js";
13
+ import { i as Le, b as Re } from "./definition-CzIq3snB.js";
14
+ import { i as Ee, b as Ge } from "./definition-BT_TJ2xu.js";
15
+ import { i as Be, b as Me } from "./definition-CKr3luD3.js";
16
+ import { g as ve, a as we, b as $e, c as Ie } from "./bars.utils-BGi2vvkU.js";
17
+ import { i as Ke, k as Ne } from "./definition-CB2yhrXd.js";
18
+ import { i as ze, k as We } from "./definition-3QpYOtAr.js";
19
19
  import { g as qe } from "./kpis.utils-DsZ2GzuB.js";
20
- import { i as Xe, a as Ye, c as Ze, g as Je, b as Qe } from "./definition-DFfB8LEv.js";
21
- import { i as aa, g as ra, a as ta, l as oa } from "./definition-7QqFZpBX.js";
22
- import { i as ia, g as na, a as la, l as pa } from "./definition-D8XbATlY.js";
23
- import { i as da, c as ca, g as ua, a as ga, l as Pa } from "./definition-oU2ZMz1V.js";
24
- import { i as Ca, l as fa } from "./definition-BKTuIe2e.js";
25
- import { i as xa, l as Sa } from "./definition-DqaokgFC.js";
26
- import { i as Ta, b as Fa, c as ya, g as ka, a as La } from "./definition-Df9xEGGh.js";
27
- import { i as Oa, s as Ea } from "./definition-D0Ofarri.js";
28
- import { i as Aa, b as Ba } from "./definition-DvNvLADK.js";
29
- import { i as Ha, d as va } from "./definition-H0k6JdIe.js";
30
- import { i as $a, p as Ia } from "./definition-DwxvVeU1.js";
31
- import { i as Ka, d as Na } from "./definition-DanyoB3T.js";
32
- import { c as za, g as Wa, a as Va } from "./pies.utils-DmDV0WY9.js";
33
- import { i as Ua, h as Xa } from "./definition-DwgGLIsi.js";
34
- import { i as Za, g as Ja, a as Qa, b as er, c as ar, p as rr } from "./definition-Djha-scF.js";
35
- import { i as or, d as sr, t as ir } from "./definition-C9JkxGxC.js";
36
- import { T as lr, i as pr, d as mr, t as dr } from "./definition-DtgG_A8G.js";
37
- import { b as ur, c as gr, g as Pr, a as hr } from "./tables.utils-2q0j8fQN.js";
20
+ import { i as Xe, a as Ye, c as Ze, g as Je, b as Qe } from "./definition-n2w2opqD.js";
21
+ import { i as aa, g as ra, a as ta, l as oa } from "./definition-Bumjg1Nc.js";
22
+ import { i as ia, g as na, a as la, l as pa } from "./definition-BObbBhcm.js";
23
+ import { i as da, c as ca, g as ua, a as ga, l as Pa } from "./definition-Cvmrf_Av.js";
24
+ import { i as Ca, l as fa } from "./definition-DYRmzQG8.js";
25
+ import { i as xa, l as Sa } from "./definition-BAb2u4mc.js";
26
+ import { i as Ta, b as Fa, c as ya, g as ka, a as La } from "./definition-DBm7UExP.js";
27
+ import { i as Oa, s as Ea } from "./definition-DCw41pB6.js";
28
+ import { i as Aa, b as Ba } from "./definition-BhJTfgLy.js";
29
+ import { i as Ha, d as va } from "./definition-BwAHlBSA.js";
30
+ import { i as $a, p as Ia } from "./definition-ViiZJXzp.js";
31
+ import { i as Ka, d as Na } from "./definition-BUb4WQQi.js";
32
+ import { c as za, g as Wa, a as Va } from "./pies.utils-vf7_pmdH.js";
33
+ import { i as Ua, h as Xa } from "./definition-DGm0gnDo.js";
34
+ import { i as Za, g as Ja, a as Qa, b as er, c as ar, p as rr } from "./definition-CI1F6BYS.js";
35
+ import { i as or, d as sr, t as ir } from "./definition-BhzssiIh.js";
36
+ import { T as lr, i as pr, d as mr, t as dr } from "./definition-C9J7qbst.js";
37
+ import { b as ur, c as gr, g as Pr, a as hr } from "./tables.utils-Be6yca9d.js";
38
38
  import { g as fr, u as br } from "./tables.hooks-fVC_4V5K.js";
39
39
  import { C as Sr, a as Dr } from "./ChartCard-jnVaCkEl.js";
40
- import { C as Fr, g as yr } from "./granularity.utils-Ck8am6YG.js";
40
+ import { C as Fr, g as yr } from "./granularity.utils-BXLMSveL.js";
41
41
  import { i as Lr, e as Rr } from "./definition-CZuJn-Re.js";
42
- import { i as Er, h as Gr } from "./definition-hq9u01ar.js";
43
- import { i as Br, m as Mr } from "./definition-DkgbKZS3.js";
42
+ import { i as Er, h as Gr } from "./definition-BLXhy0w7.js";
43
+ import { i as Br, m as Mr } from "./definition-CWC28cKE.js";
44
44
  import { d as vr, c as wr, a as $r, b as Ir, g as jr } from "./charts.utils-CM-dKk0n.js";
45
- import { u as Nr } from "./charts.fillGaps.hooks-tjjJ-L-X.js";
46
- import { i as zr, c as Wr, g as Vr, a as qr } from "./definition-BKo_lK59.js";
47
- import { i as Xr, d as Yr, g as Zr } from "./definition-_WRoLhz1.js";
48
- import { i as Qr, d as et } from "./definition-a4k4zu-S.js";
49
- import { i as rt, m as tt } from "./definition-o-5gD8vB.js";
50
- import { i as st, s as it } from "./definition-CvLRALjd.js";
51
- import { i as lt, d as pt } from "./definition-BrGnOErk.js";
52
- import { i as dt, m as ct } from "./definition-CUET0bC2.js";
53
- import { i as gt, d as Pt } from "./definition-B-ha7ip9.js";
54
- import { i as Ct, m as ft } from "./definition-DeAu3Owr.js";
55
- import { i as xt, g as St } from "./definition-CUhQEZ6r.js";
56
- import { i as Tt, t as Ft } from "./definition-Bq-44rMc.js";
57
- import { i as kt, f as Lt } from "./definition-BrCdk9h7.js";
45
+ import { u as Nr } from "./charts.fillGaps.hooks-ImD798b-.js";
46
+ import { i as zr, c as Wr, g as Vr, a as qr } from "./definition-BUjb1Q6D.js";
47
+ import { i as Xr, d as Yr, g as Zr } from "./definition-CUecLROw.js";
48
+ import { i as Qr, d as et } from "./definition-C7M49DO-.js";
49
+ import { i as rt, m as tt } from "./definition-BWMkkQfu.js";
50
+ import { i as st, s as it } from "./definition-DOgO1UO1.js";
51
+ import { i as lt, d as pt } from "./definition-QQGyselv.js";
52
+ import { i as dt, m as ct } from "./definition-81RJMlxU.js";
53
+ import { i as gt, d as Pt } from "./definition-Cc3GuVLL.js";
54
+ import { i as Ct, m as ft } from "./definition-BSCzplhq.js";
55
+ import { i as xt, g as St } from "./definition-BVKJiEOy.js";
56
+ import { i as Tt, t as Ft } from "./definition-v65ricVf.js";
57
+ import { i as kt, f as Lt } from "./definition-DA1NiTYd.js";
58
58
  import { E as Ot } from "./EditorCard-UMHyz0mi.js";
59
- import { D as Gt } from "./DimensionAndMeasureSingleSelectField-CC5BTau4.js";
60
- import { G as Bt, g as Mt, a as Ht, b as vt } from "./GranularitySelectField-D9mv6FF7.js";
61
- import { g as $t } from "./dimensionsAndMeasures.utils-Bkihe1T9.js";
59
+ import { D as Gt } from "./DimensionAndMeasureSingleSelectField-_jJAx5WA.js";
60
+ import { G as Bt, g as Mt, a as Ht, b as vt } from "./GranularitySelectField-DqIroVY8.js";
61
+ import { g as $t } from "./dimensionsAndMeasures.utils-6WmCMSx-.js";
62
62
  import { i as jt } from "./index-DiM1H-Lo.js";
63
63
  import { i as Nt } from "./index-BE2wAzsQ.js";
64
64
  const n = "remarkable-theme-fonts", i = "data-remarkable-preconnect", l = "data-remarkable-google-fonts", m = (e) => {
@@ -165,10 +165,20 @@
165
165
  "name": "dateBounds",
166
166
  "type": "timeRange",
167
167
  "label": "Date bounds",
168
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
168
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
169
169
  "supportedTypes": [
170
170
  "time"
171
171
  ]
172
+ },
173
+ {
174
+ "type": "boolean",
175
+ "name": "ignoreEmptyDate",
176
+ "label": "Ignore empty dates",
177
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
178
+ "supportedTypes": [
179
+ "time"
180
+ ],
181
+ "defaultValue": false
172
182
  }
173
183
  ]
174
184
  },
@@ -164,10 +164,20 @@
164
164
  "name": "dateBounds",
165
165
  "type": "timeRange",
166
166
  "label": "Date bounds",
167
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
167
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
168
168
  "supportedTypes": [
169
169
  "time"
170
170
  ]
171
+ },
172
+ {
173
+ "type": "boolean",
174
+ "name": "ignoreEmptyDate",
175
+ "label": "Ignore empty dates",
176
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
177
+ "supportedTypes": [
178
+ "time"
179
+ ],
180
+ "defaultValue": false
171
181
  }
172
182
  ]
173
183
  },
@@ -164,10 +164,20 @@
164
164
  "name": "dateBounds",
165
165
  "type": "timeRange",
166
166
  "label": "Date bounds",
167
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
167
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
168
168
  "supportedTypes": [
169
169
  "time"
170
170
  ]
171
+ },
172
+ {
173
+ "type": "boolean",
174
+ "name": "ignoreEmptyDate",
175
+ "label": "Ignore empty dates",
176
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
177
+ "supportedTypes": [
178
+ "time"
179
+ ],
180
+ "defaultValue": false
171
181
  }
172
182
  ]
173
183
  },
@@ -152,10 +152,20 @@
152
152
  "name": "dateBounds",
153
153
  "type": "timeRange",
154
154
  "label": "Date bounds",
155
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
155
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
156
156
  "supportedTypes": [
157
157
  "time"
158
158
  ]
159
+ },
160
+ {
161
+ "type": "boolean",
162
+ "name": "ignoreEmptyDate",
163
+ "label": "Ignore empty dates",
164
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
165
+ "supportedTypes": [
166
+ "time"
167
+ ],
168
+ "defaultValue": false
159
169
  }
160
170
  ]
161
171
  },
@@ -152,10 +152,20 @@
152
152
  "name": "dateBounds",
153
153
  "type": "timeRange",
154
154
  "label": "Date bounds",
155
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
155
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
156
156
  "supportedTypes": [
157
157
  "time"
158
158
  ]
159
+ },
160
+ {
161
+ "type": "boolean",
162
+ "name": "ignoreEmptyDate",
163
+ "label": "Ignore empty dates",
164
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
165
+ "supportedTypes": [
166
+ "time"
167
+ ],
168
+ "defaultValue": false
159
169
  }
160
170
  ]
161
171
  },
@@ -152,10 +152,20 @@
152
152
  "name": "dateBounds",
153
153
  "type": "timeRange",
154
154
  "label": "Date bounds",
155
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
155
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
156
156
  "supportedTypes": [
157
157
  "time"
158
158
  ]
159
+ },
160
+ {
161
+ "type": "boolean",
162
+ "name": "ignoreEmptyDate",
163
+ "label": "Ignore empty dates",
164
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
165
+ "supportedTypes": [
166
+ "time"
167
+ ],
168
+ "defaultValue": false
159
169
  }
160
170
  ]
161
171
  },
@@ -152,10 +152,20 @@
152
152
  "name": "dateBounds",
153
153
  "type": "timeRange",
154
154
  "label": "Date bounds",
155
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
155
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
156
156
  "supportedTypes": [
157
157
  "time"
158
158
  ]
159
+ },
160
+ {
161
+ "type": "boolean",
162
+ "name": "ignoreEmptyDate",
163
+ "label": "Ignore empty dates",
164
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
165
+ "supportedTypes": [
166
+ "time"
167
+ ],
168
+ "defaultValue": false
159
169
  }
160
170
  ]
161
171
  },
@@ -251,10 +251,20 @@
251
251
  "name": "dateBounds",
252
252
  "type": "timeRange",
253
253
  "label": "Date bounds",
254
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
254
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
255
255
  "supportedTypes": [
256
256
  "time"
257
257
  ]
258
+ },
259
+ {
260
+ "type": "boolean",
261
+ "name": "ignoreEmptyDate",
262
+ "label": "Ignore empty dates",
263
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
264
+ "supportedTypes": [
265
+ "time"
266
+ ],
267
+ "defaultValue": false
258
268
  }
259
269
  ]
260
270
  },
@@ -146,6 +146,16 @@
146
146
  "supportedTypes": [
147
147
  "time"
148
148
  ]
149
+ },
150
+ {
151
+ "type": "boolean",
152
+ "name": "ignoreEmptyDate",
153
+ "label": "Ignore empty dates",
154
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
155
+ "supportedTypes": [
156
+ "time"
157
+ ],
158
+ "defaultValue": false
149
159
  }
150
160
  ]
151
161
  },
@@ -224,6 +234,16 @@
224
234
  "supportedTypes": [
225
235
  "time"
226
236
  ]
237
+ },
238
+ {
239
+ "type": "boolean",
240
+ "name": "ignoreEmptyDate",
241
+ "label": "Ignore empty dates",
242
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
243
+ "supportedTypes": [
244
+ "time"
245
+ ],
246
+ "defaultValue": false
227
247
  }
228
248
  ]
229
249
  },
@@ -188,10 +188,20 @@
188
188
  "name": "dateBounds",
189
189
  "type": "timeRange",
190
190
  "label": "Date bounds",
191
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
191
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
192
192
  "supportedTypes": [
193
193
  "time"
194
194
  ]
195
+ },
196
+ {
197
+ "type": "boolean",
198
+ "name": "ignoreEmptyDate",
199
+ "label": "Ignore empty dates",
200
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
201
+ "supportedTypes": [
202
+ "time"
203
+ ],
204
+ "defaultValue": false
195
205
  }
196
206
  ]
197
207
  },
@@ -206,10 +206,20 @@
206
206
  "name": "dateBounds",
207
207
  "type": "timeRange",
208
208
  "label": "Date bounds",
209
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
209
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
210
210
  "supportedTypes": [
211
211
  "time"
212
212
  ]
213
+ },
214
+ {
215
+ "type": "boolean",
216
+ "name": "ignoreEmptyDate",
217
+ "label": "Ignore empty dates",
218
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
219
+ "supportedTypes": [
220
+ "time"
221
+ ],
222
+ "defaultValue": false
213
223
  }
214
224
  ]
215
225
  },
@@ -175,10 +175,20 @@
175
175
  "name": "dateBounds",
176
176
  "type": "timeRange",
177
177
  "label": "Date bounds",
178
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
178
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
179
179
  "supportedTypes": [
180
180
  "time"
181
181
  ]
182
+ },
183
+ {
184
+ "type": "boolean",
185
+ "name": "ignoreEmptyDate",
186
+ "label": "Ignore empty dates",
187
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
188
+ "supportedTypes": [
189
+ "time"
190
+ ],
191
+ "defaultValue": false
182
192
  }
183
193
  ]
184
194
  },
@@ -165,10 +165,20 @@
165
165
  "name": "dateBounds",
166
166
  "type": "timeRange",
167
167
  "label": "Date bounds",
168
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
168
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
169
169
  "supportedTypes": [
170
170
  "time"
171
171
  ]
172
+ },
173
+ {
174
+ "type": "boolean",
175
+ "name": "ignoreEmptyDate",
176
+ "label": "Ignore empty dates",
177
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
178
+ "supportedTypes": [
179
+ "time"
180
+ ],
181
+ "defaultValue": false
172
182
  }
173
183
  ]
174
184
  },
@@ -175,10 +175,20 @@
175
175
  "name": "dateBounds",
176
176
  "type": "timeRange",
177
177
  "label": "Date bounds",
178
- "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If Show granularity dropdown is enabled, this also enables auto-selection of the most appropriate granularity",
178
+ "description": "Set a date range or connect your primary date-range variable to define the x-axis min and max. If \"Show granularity dropdown\" is enabled, this also enables auto-selection of the most appropriate granularity",
179
179
  "supportedTypes": [
180
180
  "time"
181
181
  ]
182
+ },
183
+ {
184
+ "type": "boolean",
185
+ "name": "ignoreEmptyDate",
186
+ "label": "Ignore empty dates",
187
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
188
+ "supportedTypes": [
189
+ "time"
190
+ ],
191
+ "defaultValue": false
182
192
  }
183
193
  ]
184
194
  },
@@ -164,6 +164,16 @@
164
164
  "supportedTypes": [
165
165
  "time"
166
166
  ]
167
+ },
168
+ {
169
+ "type": "boolean",
170
+ "name": "ignoreEmptyDate",
171
+ "label": "Ignore empty dates",
172
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
173
+ "supportedTypes": [
174
+ "time"
175
+ ],
176
+ "defaultValue": false
167
177
  }
168
178
  ]
169
179
  },
@@ -242,6 +252,16 @@
242
252
  "supportedTypes": [
243
253
  "time"
244
254
  ]
255
+ },
256
+ {
257
+ "type": "boolean",
258
+ "name": "ignoreEmptyDate",
259
+ "label": "Ignore empty dates",
260
+ "description": "When enabled, dates with no data will be omitted instead of shown as empty.",
261
+ "supportedTypes": [
262
+ "time"
263
+ ],
264
+ "defaultValue": false
245
265
  }
246
266
  ]
247
267
  },
@@ -1,6 +1,6 @@
1
1
  import { g as $, b as h, a as f } from "./charts.utils-CM-dKk0n.js";
2
- import { r as C } from "./theme.constants-OTt5Bo-V.js";
3
- import { g as D } from "./formatter.utils-CFf9W7Jq.js";
2
+ import { r as C } from "./theme.constants-gny2xWxf.js";
3
+ import { g as D } from "./formatter.utils-BaA4WFcv.js";
4
4
  import { g as P } from "./styles.utils-C8CnV0SB.js";
5
5
  import { p as y } from "./index-BpJ2xsEV.js";
6
6
  import { g as V } from "./dimension.utils-CiM7fJ79.js";
@@ -114,4 +114,4 @@ export {
114
114
  A as c,
115
115
  L as g
116
116
  };
117
- //# sourceMappingURL=pies.utils-DmDV0WY9.js.map
117
+ //# sourceMappingURL=pies.utils-vf7_pmdH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pies.utils-DmDV0WY9.js","sources":["../src/components/charts/pies/pies.utils.ts"],"sourcesContent":["import { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { ChartData, ChartOptions } from 'chart.js';\nimport {\n getDatalabelPercentage,\n getDimensionWithoutTruncation,\n groupTailAsOther,\n} from '../charts.utils';\nimport { Theme } from '../../../theme/theme.types';\nimport { remarkableTheme } from '../../../theme/theme.constants';\nimport { getThemeFormatter } from '../../../theme/formatter/formatter.utils';\nimport { getDimensionMeasureColor } from '../../../theme/styles/styles.utils';\nimport { getChartColors, ChartClickArgs } from '@embeddable.com/remarkable-ui';\nimport { PieChartClickArg } from './pies.types';\nimport { getTimeRangeFromDimensionValue } from '../../utils/dimension.utils';\nimport { i18n } from '../../../theme/i18n/i18n';\n\nexport const createPieClickHandler = ({\n results,\n dimension,\n onClicked,\n}: {\n results: DataResponse;\n dimension: Dimension;\n onClicked?: (args: PieChartClickArg) => void;\n}): ((args: ChartClickArgs) => void) => {\n return ({ elementAtEvent }) => {\n const element = elementAtEvent[0];\n if (!element) return;\n const dimensionValue = results.data?.[element.index]?.[dimension.name] as string | undefined;\n const dimensionTimeRange = getTimeRangeFromDimensionValue({ value: dimensionValue, dimension });\n onClicked?.({ dimensionValue, dimensionTimeRange });\n };\n};\n\nexport const getPieChartProData = (\n props: {\n data: DataResponse['data'];\n dimension: Dimension;\n measure: Measure;\n maxLegendItems?: number;\n },\n theme: Theme = remarkableTheme,\n): ChartData<'pie'> => {\n if (!props.data)\n return {\n labels: [],\n datasets: [{ data: [] }],\n };\n\n const groupedData = groupTailAsOther(\n props.data,\n props.dimension,\n [props.measure],\n props.maxLegendItems,\n );\n\n const chartColors = getChartColors();\n const backgroundColor = groupedData.map((item, index) =>\n getDimensionMeasureColor({\n dimensionOrMeasure: props.dimension,\n theme,\n color: 'background',\n value: `${props.dimension.name}.${item[props.dimension.name]}`,\n chartColors,\n index,\n }),\n );\n\n const borderColor = groupedData.map((item, index) =>\n getDimensionMeasureColor({\n dimensionOrMeasure: props.dimension,\n theme,\n color: 'border',\n value: `${props.dimension.name}.${item[props.dimension.name]}`,\n chartColors,\n index,\n }),\n );\n\n const themeFormatter = getThemeFormatter(theme);\n\n return {\n labels: groupedData.map((item) => {\n const value = item[props.dimension.name];\n const formattedValue = themeFormatter.data(\n getDimensionWithoutTruncation(props.dimension),\n value,\n );\n\n // If formatter did not work, try i18n translation\n if (value === formattedValue) {\n return i18n.t(value);\n }\n return formattedValue;\n }),\n datasets: [\n {\n data: groupedData.map((item) => item[props.measure.name]),\n backgroundColor,\n borderColor,\n },\n ],\n };\n};\n\nexport const getPieChartProOptions = (\n props: { measure: Measure; dimension: Dimension },\n theme: Theme = remarkableTheme,\n): Partial<ChartOptions<'pie'>> => {\n const { dimension, measure } = props;\n const themeFormatter = getThemeFormatter(theme);\n const decimalPlaces = measure.inputs?.decimalPlaces;\n\n return {\n plugins: {\n legend: {\n position: theme.charts.legendPosition ?? 'bottom',\n labels: {\n generateLabels: (chart) => {\n const labels = chart.data.labels ?? [];\n const labelColor = chart.options.plugins?.legend?.labels?.color as string | undefined;\n return labels.map((label, i) => {\n const meta = chart.getDatasetMeta(0);\n const style = meta.controller.getStyle(i, false);\n return {\n text: themeFormatter.data(dimension, label as string),\n fillStyle: style.backgroundColor as string,\n strokeStyle: style.borderColor as string,\n lineWidth: style.borderWidth,\n hidden: !chart.getDataVisibility(i),\n index: i,\n fontColor: labelColor,\n };\n });\n },\n },\n },\n datalabels: {\n formatter: (value: string | number, context) => {\n if (measure.inputs?.showValueAsPercentage) {\n return getDatalabelPercentage(Number(value), context.dataset.data, decimalPlaces);\n }\n return themeFormatter.data(measure, value);\n },\n },\n tooltip: {\n callbacks: {\n title: (context) => {\n const label = context[0]?.label;\n return themeFormatter.data(getDimensionWithoutTruncation(dimension), label);\n },\n label(context) {\n const raw = context.raw as number;\n return `${themeFormatter.data(measure, raw)} (${getDatalabelPercentage(raw, context.dataset.data, decimalPlaces)})`;\n },\n },\n },\n },\n };\n};\n"],"names":["createPieClickHandler","results","dimension","onClicked","elementAtEvent","element","dimensionValue","_b","_a","dimensionTimeRange","getTimeRangeFromDimensionValue","getPieChartProData","props","theme","remarkableTheme","groupedData","groupTailAsOther","chartColors","getChartColors","backgroundColor","item","index","getDimensionMeasureColor","borderColor","themeFormatter","getThemeFormatter","value","formattedValue","getDimensionWithoutTruncation","i18n","getPieChartProOptions","measure","decimalPlaces","chart","labels","labelColor","_c","label","i","style","context","getDatalabelPercentage","raw"],"mappings":";;;;;;;AAgBO,MAAMA,IAAwB,CAAC;AAAA,EACpC,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AACF,MAKS,CAAC,EAAE,gBAAAC,QAAqB;;AAC7B,QAAMC,IAAUD,EAAe,CAAC;AAChC,MAAI,CAACC,EA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Y;AAAA,QACV,WAAW,CAACT,GAAwBc,MAAY;;AAC9C,kBAAIhC,IAAAuB,EAAQ,WAAR,QAAAvB,EAAgB,wBACXiC,EAAuB,OAAOf,CAAK,GAAGc,EAAQ,QAAQ,MAAMR,CAAa,IAE3ER,EAAe,KAAKO,GAASL,CAAK;AAAA,QAC3C;AAAA,MAAA;AAAA,MAEF,SAAS;AAAA,QACP,WAAW;AAAA,UACT,OAAO,CAACc,MAAY;;AAClB,kBAAMH,KAAQ7B,IAAAgC,EAAQ,CAAC,MAAT,gBAAAhC,EAAY;AAC1B,mBAAOgB,EAAe,KAAKI,EAA8B1B,CAAS,GAAGmC,CAAK;AAAA,UAC5E;AAAA,UACA,MAAMG,GAAS;AACb,kBAAME,IAAMF,EAAQ;AACpB,mBAAO,GAAGhB,EAAe,KAAKO,GAASW,CAAG,CAAC,KAAKD,EAAuBC,GAAKF,EAAQ,QAAQ,MAAMR,CAAa,CAAC;AAAA,UAClH;AAAA,QAAA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"pies.utils-vf7_pmdH.js","sources":["../src/components/charts/pies/pies.utils.ts"],"sourcesContent":["import { DataResponse, Dimension, Measure } from '@embeddable.com/core';\nimport { ChartData, ChartOptions } from 'chart.js';\nimport {\n getDatalabelPercentage,\n getDimensionWithoutTruncation,\n groupTailAsOther,\n} from '../charts.utils';\nimport { Theme } from '../../../theme/theme.types';\nimport { remarkableTheme } from '../../../theme/theme.constants';\nimport { getThemeFormatter } from '../../../theme/formatter/formatter.utils';\nimport { getDimensionMeasureColor } from '../../../theme/styles/styles.utils';\nimport { getChartColors, ChartClickArgs } from '@embeddable.com/remarkable-ui';\nimport { PieChartClickArg } from './pies.types';\nimport { getTimeRangeFromDimensionValue } from '../../utils/dimension.utils';\nimport { i18n } from '../../../theme/i18n/i18n';\n\nexport const createPieClickHandler = ({\n results,\n dimension,\n onClicked,\n}: {\n results: DataResponse;\n dimension: Dimension;\n onClicked?: (args: PieChartClickArg) => void;\n}): ((args: ChartClickArgs) => void) => {\n return ({ elementAtEvent }) => {\n const element = elementAtEvent[0];\n if (!element) return;\n const dimensionValue = results.data?.[element.index]?.[dimension.name] as string | undefined;\n const dimensionTimeRange = getTimeRangeFromDimensionValue({ value: dimensionValue, dimension });\n onClicked?.({ dimensionValue, dimensionTimeRange });\n };\n};\n\nexport const getPieChartProData = (\n props: {\n data: DataResponse['data'];\n dimension: Dimension;\n measure: Measure;\n maxLegendItems?: number;\n },\n theme: Theme = remarkableTheme,\n): ChartData<'pie'> => {\n if (!props.data)\n return {\n labels: [],\n datasets: [{ data: [] }],\n };\n\n const groupedData = groupTailAsOther(\n props.data,\n props.dimension,\n [props.measure],\n props.maxLegendItems,\n );\n\n const chartColors = getChartColors();\n const backgroundColor = groupedData.map((item, index) =>\n getDimensionMeasureColor({\n dimensionOrMeasure: props.dimension,\n theme,\n color: 'background',\n value: `${props.dimension.name}.${item[props.dimension.name]}`,\n chartColors,\n index,\n }),\n );\n\n const borderColor = groupedData.map((item, index) =>\n getDimensionMeasureColor({\n dimensionOrMeasure: props.dimension,\n theme,\n color: 'border',\n value: `${props.dimension.name}.${item[props.dimension.name]}`,\n chartColors,\n index,\n }),\n );\n\n const themeFormatter = getThemeFormatter(theme);\n\n return {\n labels: groupedData.map((item) => {\n const value = item[props.dimension.name];\n const formattedValue = themeFormatter.data(\n getDimensionWithoutTruncation(props.dimension),\n value,\n );\n\n // If formatter did not work, try i18n translation\n if (value === formattedValue) {\n return i18n.t(value);\n }\n return formattedValue;\n }),\n datasets: [\n {\n data: groupedData.map((item) => item[props.measure.name]),\n backgroundColor,\n borderColor,\n },\n ],\n };\n};\n\nexport const getPieChartProOptions = (\n props: { measure: Measure; dimension: Dimension },\n theme: Theme = remarkableTheme,\n): Partial<ChartOptions<'pie'>> => {\n const { dimension, measure } = props;\n const themeFormatter = getThemeFormatter(theme);\n const decimalPlaces = measure.inputs?.decimalPlaces;\n\n return {\n plugins: {\n legend: {\n position: theme.charts.legendPosition ?? 'bottom',\n labels: {\n generateLabels: (chart) => {\n const labels = chart.data.labels ?? [];\n const labelColor = chart.options.plugins?.legend?.labels?.color as string | undefined;\n return labels.map((label, i) => {\n const meta = chart.getDatasetMeta(0);\n const style = meta.controller.getStyle(i, false);\n return {\n text: themeFormatter.data(dimension, label as string),\n fillStyle: style.backgroundColor as string,\n strokeStyle: style.borderColor as string,\n lineWidth: style.borderWidth,\n hidden: !chart.getDataVisibility(i),\n index: i,\n fontColor: labelColor,\n };\n });\n },\n },\n },\n datalabels: {\n formatter: (value: string | number, context) => {\n if (measure.inputs?.showValueAsPercentage) {\n return getDatalabelPercentage(Number(value), context.dataset.data, decimalPlaces);\n }\n return themeFormatter.data(measure, value);\n },\n },\n tooltip: {\n callbacks: {\n title: (context) => {\n const label = context[0]?.label;\n return themeFormatter.data(getDimensionWithoutTruncation(dimension), label);\n },\n label(context) {\n const raw = context.raw as number;\n return `${themeFormatter.data(measure, raw)} (${getDatalabelPercentage(raw, context.dataset.data, decimalPlaces)})`;\n },\n },\n },\n },\n };\n};\n"],"names":["createPieClickHandler","results","dimension","onClicked","elementAtEvent","element","dimensionValue","_b","_a","dimensionTimeRange","getTimeRangeFromDimensionValue","getPieChartProData","props","theme","remarkableTheme","groupedData","groupTailAsOther","chartColors","getChartColors","backgroundColor","item","index","getDimensionMeasureColor","borderColor","themeFormatter","getThemeFormatter","value","formattedValue","getDimensionWithoutTruncation","i18n","getPieChartProOptions","measure","decimalPlaces","chart","labels","labelColor","_c","label","i","style","context","getDatalabelPercentage","raw"],"mappings":";;;;;;;AAgBO,MAAMA,IAAwB,CAAC;AAAA,EACpC,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AACF,MAKS,CAAC,EAAE,gBAAAC,QAAqB;;AAC7B,QAAMC,IAAUD,EAAe,CAAC;AAChC,MAAI,CAACC,EAAS;AACd,QAAMC,KAAiBC,KAAAC,IAAAP,EAAQ,SAAR,gBAAAO,EAAeH,EAAQ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,WAAR,QAAAvB,EAAgB,wBACXiC,EAAuB,OAAOf,CAAK,GAAGc,EAAQ,QAAQ,MAAMR,CAAa,IAE3ER,EAAe,KAAKO,GAASL,CAAK;AAAA,QAC3C;AAAA,MAAA;AAAA,MAEF,SAAS;AAAA,QACP,WAAW;AAAA,UACT,OAAO,CAACc,MAAY;;AAClB,kBAAMH,KAAQ7B,IAAAgC,EAAQ,CAAC,MAAT,gBAAAhC,EAAY;AAC1B,mBAAOgB,EAAe,KAAKI,EAA8B1B,CAAS,GAAGmC,CAAK;AAAA,UAC5E;AAAA,UACA,MAAMG,GAAS;AACb,kBAAME,IAAMF,EAAQ;AACpB,mBAAO,GAAGhB,EAAe,KAAKO,GAASW,CAAG,CAAC,KAAKD,EAAuBC,GAAKF,EAAQ,QAAQ,MAAMR,CAAa,CAAC;AAAA,UAClH;AAAA,QAAA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  import { j as i, X as p, Y as w, Z as h, u as o } from "./index-BpJ2xsEV.js";
2
- import { g as f } from "./formatter.utils-CFf9W7Jq.js";
3
- import { D as c } from "./component.inputs.constants-WqUoEXZX.js";
2
+ import { g as f } from "./formatter.utils-BaA4WFcv.js";
3
+ import { D as c } from "./component.inputs.constants-CJRHMXHA.js";
4
4
  const T = "_markdownCell_15al7_1", C = {
5
5
  markdownCell: T
6
6
  }, A = (e) => {
@@ -85,4 +85,4 @@ export {
85
85
  N as c,
86
86
  D as g
87
87
  };
88
- //# sourceMappingURL=tables.utils-2q0j8fQN.js.map
88
+ //# sourceMappingURL=tables.utils-Be6yca9d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tables.utils-2q0j8fQN.js","sources":["../src/components/charts/tables/tables.utils.tsx"],"sourcesContent":["import { DataResponse, Dimension, DimensionOrMeasure } from '@embeddable.com/core';\nimport { getThemeFormatter } from '../../../theme/formatter/formatter.utils';\nimport { CssSize, Markdown, TableBodyCellWithCopy } from '@embeddable.com/remarkable-ui';\nimport { Theme } from '../../../theme/theme.types';\nimport {\n getStyleNumber,\n TableHeaderAlign,\n TableHeaderItem,\n TableHeaderItemAlign,\n} from '@embeddable.com/remarkable-ui';\nimport { DisplayFormatTypeOptions } from '../../types/DisplayFormat.type.emb';\nimport styles from './tables.module.css';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const getTableHeaderAlign = (dimOrMeas: DimensionOrMeasure): TableHeaderItemAlign => {\n const subInputAlign = dimOrMeas.inputs?.align;\n\n if (subInputAlign) return subInputAlign;\n\n // Get width by native type\n switch (dimOrMeas.nativeType) {\n case 'boolean':\n case 'time':\n case 'number':\n return TableHeaderAlign.RIGHT;\n default:\n return TableHeaderAlign.LEFT;\n }\n};\n\nexport const getTableHeaderMinWidth = (dimOrMeas: DimensionOrMeasure): CssSize => {\n const subInputWidth = dimOrMeas.inputs?.width;\n\n if (subInputWidth) return subInputWidth;\n\n // Get width by native type\n switch (dimOrMeas.nativeType) {\n case 'string':\n return getStyleNumber('--em-tablechart-min-width--string' as any, '8.75rem') as number;\n case 'number':\n return getStyleNumber('--em-tablechart-min-width--number' as any, '5.625rem') as number;\n case 'time':\n return getStyleNumber('--em-tablechart-min-width--time' as any, '8.75rem') as number;\n case 'boolean':\n default:\n return getStyleNumber('--em-tablechart-min-width--boolean' as any, '5.625rem') as number;\n }\n};\n\nexport const getTableHeaders = (\n props: {\n dimensionsAndMeasures: DimensionOrMeasure[];\n displayNullAs?: string;\n },\n theme: Theme,\n): TableHeaderItem<any>[] => {\n const themeFormatter = getThemeFormatter(theme);\n return props.dimensionsAndMeasures.map((dimOrMeas) => {\n const displayFormat: string = dimOrMeas.inputs?.displayFormat;\n const hasCustomCellFormatter =\n displayFormat &&\n (displayFormat === DisplayFormatTypeOptions.JSON ||\n displayFormat === DisplayFormatTypeOptions.MARKDOWN);\n\n return {\n id: dimOrMeas.name,\n title: themeFormatter.dimensionOrMeasureTitle(dimOrMeas),\n minWidth: getTableHeaderMinWidth(dimOrMeas),\n align: getTableHeaderAlign(dimOrMeas),\n accessor: (row) => {\n const updatedDimOrMeas = {\n ...dimOrMeas,\n inputs: { ...dimOrMeas.inputs, displayNullAs: props.displayNullAs },\n };\n return themeFormatter.data(updatedDimOrMeas, row[dimOrMeas.name]);\n },\n cellStyle: (value) => {\n const tableCellStyle = dimOrMeas.inputs?.tableCellStyle;\n if (tableCellStyle) {\n const activeTableCellStyle = theme.defaults.tableCellStyleOptions?.find(\n (style) => style.value === tableCellStyle,\n );\n if (activeTableCellStyle) {\n return activeTableCellStyle.styles(value);\n }\n }\n return undefined;\n },\n cell: hasCustomCellFormatter\n ? ({ value }) => {\n let currentValue: string | undefined;\n if (typeof value === 'string') {\n currentValue = value;\n } else if (value !== undefined && value !== null) {\n currentValue = String(value);\n } else {\n currentValue = undefined;\n }\n\n return (\n <TableBodyCellWithCopy value={value}>\n {displayFormat === DisplayFormatTypeOptions.MARKDOWN ? (\n // Markdown\n <span className={styles.markdownCell}>\n <Markdown content={currentValue} />\n </span>\n ) : (\n // JSON\n <pre>{currentValue}</pre>\n )}\n </TableBodyCellWithCopy>\n );\n }\n : undefined,\n };\n });\n};\n\nexport const getTableRows = (props: { clickDimension?: Dimension; rows: DataResponse['data'] }) => {\n if (!props.rows || props.rows.length === 0) {\n return [];\n }\n\n const clickDimensionName = props.clickDimension?.name;\n\n if (!clickDimensionName || props.rows.some((row) => clickDimensionName in row)) {\n return props.rows;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n return props.rows.map(({ [clickDimensionName]: _, ...row }) => ({\n ...row,\n }));\n};\n"],"names":["getTableHeaderAlign","dimOrMeas","subInputAlign","_a","TableHeaderAlign","getTableHeaderMinWidth","subInputWidth","getStyleNumber","getTableHeaders","props","theme","themeFormatter","getThemeFormatter","displayFormat","hasCustomCellFormatter","DisplayFormatTypeOptions","row","updatedDimOrMeas","value","tableCellStyle","activeTableCellStyle","_b","style","currentValue","jsx","TableBodyCellWithCopy","styles","Markdown","getTableRows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-Be6yca9d.js","sources":["../src/components/charts/tables/tables.utils.tsx"],"sourcesContent":["import { DataResponse, Dimension, DimensionOrMeasure } from '@embeddable.com/core';\nimport { getThemeFormatter } from '../../../theme/formatter/formatter.utils';\nimport { CssSize, Markdown, TableBodyCellWithCopy } from '@embeddable.com/remarkable-ui';\nimport { Theme } from '../../../theme/theme.types';\nimport {\n getStyleNumber,\n TableHeaderAlign,\n TableHeaderItem,\n TableHeaderItemAlign,\n} from '@embeddable.com/remarkable-ui';\nimport { DisplayFormatTypeOptions } from '../../types/DisplayFormat.type.emb';\nimport styles from './tables.module.css';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const getTableHeaderAlign = (dimOrMeas: DimensionOrMeasure): TableHeaderItemAlign => {\n const subInputAlign = dimOrMeas.inputs?.align;\n\n if (subInputAlign) return subInputAlign;\n\n // Get width by native type\n switch (dimOrMeas.nativeType) {\n case 'boolean':\n case 'time':\n case 'number':\n return TableHeaderAlign.RIGHT;\n default:\n return TableHeaderAlign.LEFT;\n }\n};\n\nexport const getTableHeaderMinWidth = (dimOrMeas: DimensionOrMeasure): CssSize => {\n const subInputWidth = dimOrMeas.inputs?.width;\n\n if (subInputWidth) return subInputWidth;\n\n // Get width by native type\n switch (dimOrMeas.nativeType) {\n case 'string':\n return getStyleNumber('--em-tablechart-min-width--string' as any, '8.75rem') as number;\n case 'number':\n return getStyleNumber('--em-tablechart-min-width--number' as any, '5.625rem') as number;\n case 'time':\n return getStyleNumber('--em-tablechart-min-width--time' as any, '8.75rem') as number;\n case 'boolean':\n default:\n return getStyleNumber('--em-tablechart-min-width--boolean' as any, '5.625rem') as number;\n }\n};\n\nexport const getTableHeaders = (\n props: {\n dimensionsAndMeasures: DimensionOrMeasure[];\n displayNullAs?: string;\n },\n theme: Theme,\n): TableHeaderItem<any>[] => {\n const themeFormatter = getThemeFormatter(theme);\n return props.dimensionsAndMeasures.map((dimOrMeas) => {\n const displayFormat: string = dimOrMeas.inputs?.displayFormat;\n const hasCustomCellFormatter =\n displayFormat &&\n (displayFormat === DisplayFormatTypeOptions.JSON ||\n displayFormat === DisplayFormatTypeOptions.MARKDOWN);\n\n return {\n id: dimOrMeas.name,\n title: themeFormatter.dimensionOrMeasureTitle(dimOrMeas),\n minWidth: getTableHeaderMinWidth(dimOrMeas),\n align: getTableHeaderAlign(dimOrMeas),\n accessor: (row) => {\n const updatedDimOrMeas = {\n ...dimOrMeas,\n inputs: { ...dimOrMeas.inputs, displayNullAs: props.displayNullAs },\n };\n return themeFormatter.data(updatedDimOrMeas, row[dimOrMeas.name]);\n },\n cellStyle: (value) => {\n const tableCellStyle = dimOrMeas.inputs?.tableCellStyle;\n if (tableCellStyle) {\n const activeTableCellStyle = theme.defaults.tableCellStyleOptions?.find(\n (style) => style.value === tableCellStyle,\n );\n if (activeTableCellStyle) {\n return activeTableCellStyle.styles(value);\n }\n }\n return undefined;\n },\n cell: hasCustomCellFormatter\n ? ({ value }) => {\n let currentValue: string | undefined;\n if (typeof value === 'string') {\n currentValue = value;\n } else if (value !== undefined && value !== null) {\n currentValue = String(value);\n } else {\n currentValue = undefined;\n }\n\n return (\n <TableBodyCellWithCopy value={value}>\n {displayFormat === DisplayFormatTypeOptions.MARKDOWN ? (\n // Markdown\n <span className={styles.markdownCell}>\n <Markdown content={currentValue} />\n </span>\n ) : (\n // JSON\n <pre>{currentValue}</pre>\n )}\n </TableBodyCellWithCopy>\n );\n }\n : undefined,\n };\n });\n};\n\nexport const getTableRows = (props: { clickDimension?: Dimension; rows: DataResponse['data'] }) => {\n if (!props.rows || props.rows.length === 0) {\n return [];\n }\n\n const clickDimensionName = props.clickDimension?.name;\n\n if (!clickDimensionName || props.rows.some((row) => clickDimensionName in row)) {\n return props.rows;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n return props.rows.map(({ [clickDimensionName]: _, ...row }) => ({\n ...row,\n }));\n};\n"],"names":["getTableHeaderAlign","dimOrMeas","subInputAlign","_a","TableHeaderAlign","getTableHeaderMinWidth","subInputWidth","getStyleNumber","getTableHeaders","props","theme","themeFormatter","getThemeFormatter","displayFormat","hasCustomCellFormatter","DisplayFormatTypeOptions","row","updatedDimOrMeas","value","tableCellStyle","activeTableCellStyle","_b","style","currentValue","jsx","TableBodyCellWithCopy","styles","Markdown","getTableRows","clickDimensionName","_"],"mappings":";;;;;GAcaA,IAAsB,CAACC,MAAwD;;AAC1F,QAAMC,KAAgBC,IAAAF,EAAU,WAAV,gBAAAE,EAAkB;AAExC,MAAID,EAAe,QAAOA;AAG1B,UAAQD,EAAU,YAAA;AAAA,IAChB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOG,EAAiB;AAAA,IAC1B;AACE,aAAOA,EAAiB;AAAA,EAAA;AAE9B,GAEaC,IAAyB,CAACJ,MAA2C;;AAChF,QAAMK,KAAgBH,IAAAF,EAAU,WAAV,gBAAAE,EAAkB;AAExC,MAAIG,EAAe,QAAOA;AAG1B,UAAQL,EAAU,YAAA;AAAA,IAChB,KAAK;AACH,aAAOM,EAAe,qCAA4C,SAAS;AAAA,IAC7E,KAAK;AACH,aAAOA,EAAe,qCAA4C,UAAU;AAAA,IAC9E,KAAK;AACH,aAAOA,EAAe,mCAA0C,SAAS;AAAA,IAC3E,KAAK;AAAA,IACL;AACE,aAAOA,EAAe,sCAA6C,UAAU;AAAA,EAAA;AAEnF,GAEaC,IAAkB,CAC7BC,GAIAC,MAC2B;AAC3B,QAAMC,IAAiBC,EAAkBF,CAAK;AAC9C,SAAOD,EAAM,sBAAsB,IAAI,CAACR,MAAc;;AACpD,UAAMY,KAAwBV,IAAAF,EAAU,WAAV,gBAAAE,EAAkB,eAC1CW,IACJD,MACCA,MAAkBE,EAAyB,QAC1CF,MAAkBE,EAAyB;AAE/C,WAAO;AAAA,MACL,IAAId,EAAU;AAAA,MACd,OAAOU,EAAe,wBAAwBV,CAAS;AAAA,MACvD,UAAUI,EAAuBJ,CAAS;AAAA,MAC1C,OAAOD,EAAoBC,CAAS;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