@sis-cc/dotstatsuite-components 22.0.0 → 22.0.2

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 (686) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +35 -0
  2. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/dist/_virtual/_rollupPluginBabelHelpers.js +12 -0
  4. package/dist/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  5. package/dist/_virtual/colorManipulator.js +6 -0
  6. package/dist/_virtual/colorManipulator.js.map +1 -0
  7. package/dist/_virtual/colorManipulator2.js +4 -0
  8. package/dist/_virtual/colorManipulator2.js.map +1 -0
  9. package/dist/_virtual/index.js +8 -0
  10. package/dist/_virtual/index.js.map +1 -0
  11. package/dist/_virtual/index10.js +8 -0
  12. package/dist/_virtual/index10.js.map +1 -0
  13. package/dist/_virtual/index11.js +8 -0
  14. package/dist/_virtual/index11.js.map +1 -0
  15. package/dist/_virtual/index12.js +8 -0
  16. package/dist/_virtual/index12.js.map +1 -0
  17. package/dist/_virtual/index13.js +8 -0
  18. package/dist/_virtual/index13.js.map +1 -0
  19. package/dist/_virtual/index14.js +8 -0
  20. package/dist/_virtual/index14.js.map +1 -0
  21. package/dist/_virtual/index15.js +8 -0
  22. package/dist/_virtual/index15.js.map +1 -0
  23. package/dist/_virtual/index16.js +8 -0
  24. package/dist/_virtual/index16.js.map +1 -0
  25. package/dist/_virtual/index17.js +7 -0
  26. package/dist/_virtual/index17.js.map +1 -0
  27. package/dist/_virtual/index18.js +7 -0
  28. package/dist/_virtual/index18.js.map +1 -0
  29. package/dist/_virtual/index19.js +8 -0
  30. package/dist/_virtual/index19.js.map +1 -0
  31. package/dist/_virtual/index2.js +8 -0
  32. package/dist/_virtual/index2.js.map +1 -0
  33. package/dist/_virtual/index20.js +4 -0
  34. package/dist/_virtual/index20.js.map +1 -0
  35. package/dist/_virtual/index21.js +6 -0
  36. package/dist/_virtual/index21.js.map +1 -0
  37. package/dist/_virtual/index22.js +4 -0
  38. package/dist/_virtual/index22.js.map +1 -0
  39. package/dist/_virtual/index23.js +4 -0
  40. package/dist/_virtual/index23.js.map +1 -0
  41. package/dist/_virtual/index3.js +8 -0
  42. package/dist/_virtual/index3.js.map +1 -0
  43. package/dist/_virtual/index4.js +8 -0
  44. package/dist/_virtual/index4.js.map +1 -0
  45. package/dist/_virtual/index5.js +8 -0
  46. package/dist/_virtual/index5.js.map +1 -0
  47. package/dist/_virtual/index6.js +8 -0
  48. package/dist/_virtual/index6.js.map +1 -0
  49. package/dist/_virtual/index7.js +8 -0
  50. package/dist/_virtual/index7.js.map +1 -0
  51. package/dist/_virtual/index8.js +8 -0
  52. package/dist/_virtual/index8.js.map +1 -0
  53. package/dist/_virtual/index9.js +8 -0
  54. package/dist/_virtual/index9.js.map +1 -0
  55. package/dist/_virtual/interopRequireDefault.js +4 -0
  56. package/dist/_virtual/interopRequireDefault.js.map +1 -0
  57. package/dist/_virtual/jsx-runtime.js +4 -0
  58. package/dist/_virtual/jsx-runtime.js.map +1 -0
  59. package/dist/_virtual/jsx-runtime2.js +6 -0
  60. package/dist/_virtual/jsx-runtime2.js.map +1 -0
  61. package/dist/_virtual/react-is.development.js +4 -0
  62. package/dist/_virtual/react-is.development.js.map +1 -0
  63. package/dist/_virtual/react-is.development2.js +4 -0
  64. package/dist/_virtual/react-is.development2.js.map +1 -0
  65. package/dist/_virtual/react-is.production.js +4 -0
  66. package/dist/_virtual/react-is.production.js.map +1 -0
  67. package/dist/_virtual/react-is.production.min.js +4 -0
  68. package/dist/_virtual/react-is.production.min.js.map +1 -0
  69. package/dist/_virtual/react-jsx-runtime.development.js +4 -0
  70. package/dist/_virtual/react-jsx-runtime.development.js.map +1 -0
  71. package/dist/_virtual/react-jsx-runtime.production.min.js +4 -0
  72. package/dist/_virtual/react-jsx-runtime.production.min.js.map +1 -0
  73. package/dist/bridge-d3-react/src/index.js +18 -0
  74. package/dist/bridge-d3-react/src/index.js.map +1 -0
  75. package/dist/bridge-d3-react/src/react-chart-factory.js +44 -0
  76. package/dist/bridge-d3-react/src/react-chart-factory.js.map +1 -0
  77. package/dist/index.js +6 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +8 -0
  80. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +1 -0
  81. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +8 -0
  82. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js.map +1 -0
  83. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +7 -0
  84. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +1 -0
  85. package/dist/node_modules/@babel/runtime/helpers/esm/createClass.js +16 -0
  86. package/dist/node_modules/@babel/runtime/helpers/esm/createClass.js.map +1 -0
  87. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
  88. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
  89. package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +8 -0
  90. package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +1 -0
  91. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +6 -0
  92. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +1 -0
  93. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +6 -0
  94. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js.map +1 -0
  95. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
  96. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
  97. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
  98. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -0
  99. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +11 -0
  100. package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js.map +1 -0
  101. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +15 -0
  102. package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -0
  103. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +10 -0
  104. package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -0
  105. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +12 -0
  106. package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -0
  107. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +12 -0
  108. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +1 -0
  109. package/dist/node_modules/@babel/runtime/helpers/interopRequireDefault.js +20 -0
  110. package/dist/node_modules/@babel/runtime/helpers/interopRequireDefault.js.map +1 -0
  111. package/dist/node_modules/@mui/material/colors/blue.js +9 -0
  112. package/dist/node_modules/@mui/material/colors/blue.js.map +1 -0
  113. package/dist/node_modules/@mui/material/colors/common.js +7 -0
  114. package/dist/node_modules/@mui/material/colors/common.js.map +1 -0
  115. package/dist/node_modules/@mui/material/colors/green.js +10 -0
  116. package/dist/node_modules/@mui/material/colors/green.js.map +1 -0
  117. package/dist/node_modules/@mui/material/colors/grey.js +19 -0
  118. package/dist/node_modules/@mui/material/colors/grey.js.map +1 -0
  119. package/dist/node_modules/@mui/material/colors/lightBlue.js +9 -0
  120. package/dist/node_modules/@mui/material/colors/lightBlue.js.map +1 -0
  121. package/dist/node_modules/@mui/material/colors/orange.js +9 -0
  122. package/dist/node_modules/@mui/material/colors/orange.js.map +1 -0
  123. package/dist/node_modules/@mui/material/colors/purple.js +10 -0
  124. package/dist/node_modules/@mui/material/colors/purple.js.map +1 -0
  125. package/dist/node_modules/@mui/material/colors/red.js +9 -0
  126. package/dist/node_modules/@mui/material/colors/red.js.map +1 -0
  127. package/dist/node_modules/@mui/material/styles/createMixins.js +20 -0
  128. package/dist/node_modules/@mui/material/styles/createMixins.js.map +1 -0
  129. package/dist/node_modules/@mui/material/styles/createPalette.js +309 -0
  130. package/dist/node_modules/@mui/material/styles/createPalette.js.map +1 -0
  131. package/dist/node_modules/@mui/material/styles/createTheme.js +86 -0
  132. package/dist/node_modules/@mui/material/styles/createTheme.js.map +1 -0
  133. package/dist/node_modules/@mui/material/styles/createTransitions.js +92 -0
  134. package/dist/node_modules/@mui/material/styles/createTransitions.js.map +1 -0
  135. package/dist/node_modules/@mui/material/styles/createTypography.js +94 -0
  136. package/dist/node_modules/@mui/material/styles/createTypography.js.map +1 -0
  137. package/dist/node_modules/@mui/material/styles/defaultTheme.js +6 -0
  138. package/dist/node_modules/@mui/material/styles/defaultTheme.js.map +1 -0
  139. package/dist/node_modules/@mui/material/styles/identifier.js +4 -0
  140. package/dist/node_modules/@mui/material/styles/identifier.js.map +1 -0
  141. package/dist/node_modules/@mui/material/styles/shadows.js +12 -0
  142. package/dist/node_modules/@mui/material/styles/shadows.js.map +1 -0
  143. package/dist/node_modules/@mui/material/styles/useTheme.js +16 -0
  144. package/dist/node_modules/@mui/material/styles/useTheme.js.map +1 -0
  145. package/dist/node_modules/@mui/material/styles/zIndex.js +15 -0
  146. package/dist/node_modules/@mui/material/styles/zIndex.js.map +1 -0
  147. package/dist/node_modules/@mui/private-theming/ThemeProvider/nested.js +5 -0
  148. package/dist/node_modules/@mui/private-theming/ThemeProvider/nested.js.map +1 -0
  149. package/dist/node_modules/@mui/private-theming/useTheme/ThemeContext.js +9 -0
  150. package/dist/node_modules/@mui/private-theming/useTheme/ThemeContext.js.map +1 -0
  151. package/dist/node_modules/@mui/private-theming/useTheme/useTheme.js +14 -0
  152. package/dist/node_modules/@mui/private-theming/useTheme/useTheme.js.map +1 -0
  153. package/dist/node_modules/@mui/styles/StylesProvider/StylesProvider.js +151 -0
  154. package/dist/node_modules/@mui/styles/StylesProvider/StylesProvider.js.map +1 -0
  155. package/dist/node_modules/@mui/styles/createGenerateClassName/createGenerateClassName.js +66 -0
  156. package/dist/node_modules/@mui/styles/createGenerateClassName/createGenerateClassName.js.map +1 -0
  157. package/dist/node_modules/@mui/styles/getStylesCreator/getStylesCreator.js +52 -0
  158. package/dist/node_modules/@mui/styles/getStylesCreator/getStylesCreator.js.map +1 -0
  159. package/dist/node_modules/@mui/styles/getStylesCreator/noopTheme.js +5 -0
  160. package/dist/node_modules/@mui/styles/getStylesCreator/noopTheme.js.map +1 -0
  161. package/dist/node_modules/@mui/styles/jssPreset/jssPreset.js +21 -0
  162. package/dist/node_modules/@mui/styles/jssPreset/jssPreset.js.map +1 -0
  163. package/dist/node_modules/@mui/styles/makeStyles/indexCounter.js +22 -0
  164. package/dist/node_modules/@mui/styles/makeStyles/indexCounter.js.map +1 -0
  165. package/dist/node_modules/@mui/styles/makeStyles/makeStyles.js +230 -0
  166. package/dist/node_modules/@mui/styles/makeStyles/makeStyles.js.map +1 -0
  167. package/dist/node_modules/@mui/styles/makeStyles/multiKeyStore.js +23 -0
  168. package/dist/node_modules/@mui/styles/makeStyles/multiKeyStore.js.map +1 -0
  169. package/dist/node_modules/@mui/styles/mergeClasses/mergeClasses.js +37 -0
  170. package/dist/node_modules/@mui/styles/mergeClasses/mergeClasses.js.map +1 -0
  171. package/dist/node_modules/@mui/styles/propsToClassKey/propsToClassKey.js +31 -0
  172. package/dist/node_modules/@mui/styles/propsToClassKey/propsToClassKey.js.map +1 -0
  173. package/dist/node_modules/@mui/styles/useTheme/index.js +10 -0
  174. package/dist/node_modules/@mui/styles/useTheme/index.js.map +1 -0
  175. package/dist/node_modules/@mui/system/colorManipulator.js +386 -0
  176. package/dist/node_modules/@mui/system/colorManipulator.js.map +1 -0
  177. package/dist/node_modules/@mui/system/esm/borders.js +52 -0
  178. package/dist/node_modules/@mui/system/esm/borders.js.map +1 -0
  179. package/dist/node_modules/@mui/system/esm/breakpoints.js +67 -0
  180. package/dist/node_modules/@mui/system/esm/breakpoints.js.map +1 -0
  181. package/dist/node_modules/@mui/system/esm/compose.js +27 -0
  182. package/dist/node_modules/@mui/system/esm/compose.js.map +1 -0
  183. package/dist/node_modules/@mui/system/esm/createTheme/applyStyles.js +77 -0
  184. package/dist/node_modules/@mui/system/esm/createTheme/applyStyles.js.map +1 -0
  185. package/dist/node_modules/@mui/system/esm/createTheme/createBreakpoints.js +83 -0
  186. package/dist/node_modules/@mui/system/esm/createTheme/createBreakpoints.js.map +1 -0
  187. package/dist/node_modules/@mui/system/esm/createTheme/createSpacing.js +35 -0
  188. package/dist/node_modules/@mui/system/esm/createTheme/createSpacing.js.map +1 -0
  189. package/dist/node_modules/@mui/system/esm/createTheme/createTheme.js +46 -0
  190. package/dist/node_modules/@mui/system/esm/createTheme/createTheme.js.map +1 -0
  191. package/dist/node_modules/@mui/system/esm/createTheme/shape.js +6 -0
  192. package/dist/node_modules/@mui/system/esm/createTheme/shape.js.map +1 -0
  193. package/dist/node_modules/@mui/system/esm/cssGrid.js +87 -0
  194. package/dist/node_modules/@mui/system/esm/cssGrid.js.map +1 -0
  195. package/dist/node_modules/@mui/system/esm/memoize.js +12 -0
  196. package/dist/node_modules/@mui/system/esm/memoize.js.map +1 -0
  197. package/dist/node_modules/@mui/system/esm/merge.js +13 -0
  198. package/dist/node_modules/@mui/system/esm/merge.js.map +1 -0
  199. package/dist/node_modules/@mui/system/esm/palette.js +29 -0
  200. package/dist/node_modules/@mui/system/esm/palette.js.map +1 -0
  201. package/dist/node_modules/@mui/system/esm/responsivePropType.js +6 -0
  202. package/dist/node_modules/@mui/system/esm/responsivePropType.js.map +1 -0
  203. package/dist/node_modules/@mui/system/esm/sizing.js +68 -0
  204. package/dist/node_modules/@mui/system/esm/sizing.js.map +1 -0
  205. package/dist/node_modules/@mui/system/esm/spacing.js +145 -0
  206. package/dist/node_modules/@mui/system/esm/spacing.js.map +1 -0
  207. package/dist/node_modules/@mui/system/esm/style.js +78 -0
  208. package/dist/node_modules/@mui/system/esm/style.js.map +1 -0
  209. package/dist/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +294 -0
  210. package/dist/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js.map +1 -0
  211. package/dist/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +137 -0
  212. package/dist/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js.map +1 -0
  213. package/dist/node_modules/@mui/system/esm/useTheme.js +10 -0
  214. package/dist/node_modules/@mui/system/esm/useTheme.js.map +1 -0
  215. package/dist/node_modules/@mui/system/esm/useThemeWithoutDefault.js +13 -0
  216. package/dist/node_modules/@mui/system/esm/useThemeWithoutDefault.js.map +1 -0
  217. package/dist/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js +19 -0
  218. package/dist/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js.map +1 -0
  219. package/dist/node_modules/@mui/utils/esm/capitalize/capitalize.js +15 -0
  220. package/dist/node_modules/@mui/utils/esm/capitalize/capitalize.js.map +1 -0
  221. package/dist/node_modules/@mui/utils/esm/clamp/clamp.js +6 -0
  222. package/dist/node_modules/@mui/utils/esm/clamp/clamp.js.map +1 -0
  223. package/dist/node_modules/@mui/utils/esm/clamp/index.js +2 -0
  224. package/dist/node_modules/@mui/utils/esm/clamp/index.js.map +1 -0
  225. package/dist/node_modules/@mui/utils/esm/deepmerge/deepmerge.js +46 -0
  226. package/dist/node_modules/@mui/utils/esm/deepmerge/deepmerge.js.map +1 -0
  227. package/dist/node_modules/@mui/utils/esm/exactProp/exactProp.js +24 -0
  228. package/dist/node_modules/@mui/utils/esm/exactProp/exactProp.js.map +1 -0
  229. package/dist/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js +22 -0
  230. package/dist/node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js.map +1 -0
  231. package/dist/node_modules/@mui/utils/esm/formatMuiErrorMessage/index.js +2 -0
  232. package/dist/node_modules/@mui/utils/esm/formatMuiErrorMessage/index.js.map +1 -0
  233. package/dist/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js +23 -0
  234. package/dist/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js.map +1 -0
  235. package/dist/node_modules/@mui/utils/esm/getDisplayName/getDisplayName.js +50 -0
  236. package/dist/node_modules/@mui/utils/esm/getDisplayName/getDisplayName.js.map +1 -0
  237. package/dist/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.development.js +143 -0
  238. package/dist/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  239. package/dist/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.production.js +140 -0
  240. package/dist/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.production.js.map +1 -0
  241. package/dist/node_modules/@mui/utils/node_modules/react-is/index.js +20 -0
  242. package/dist/node_modules/@mui/utils/node_modules/react-is/index.js.map +1 -0
  243. package/dist/node_modules/css-vendor/dist/css-vendor.esm.js +574 -0
  244. package/dist/node_modules/css-vendor/dist/css-vendor.esm.js.map +1 -0
  245. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js +32 -0
  246. package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds/index.js.map +1 -0
  247. package/dist/node_modules/date-fns/get_iso_week/index.js +49 -0
  248. package/dist/node_modules/date-fns/get_iso_week/index.js.map +1 -0
  249. package/dist/node_modules/date-fns/get_iso_year/index.js +59 -0
  250. package/dist/node_modules/date-fns/get_iso_year/index.js.map +1 -0
  251. package/dist/node_modules/date-fns/is_date/index.js +32 -0
  252. package/dist/node_modules/date-fns/is_date/index.js.map +1 -0
  253. package/dist/node_modules/date-fns/is_friday/index.js +35 -0
  254. package/dist/node_modules/date-fns/is_friday/index.js.map +1 -0
  255. package/dist/node_modules/date-fns/is_monday/index.js +35 -0
  256. package/dist/node_modules/date-fns/is_monday/index.js.map +1 -0
  257. package/dist/node_modules/date-fns/is_saturday/index.js +35 -0
  258. package/dist/node_modules/date-fns/is_saturday/index.js.map +1 -0
  259. package/dist/node_modules/date-fns/is_sunday/index.js +35 -0
  260. package/dist/node_modules/date-fns/is_sunday/index.js.map +1 -0
  261. package/dist/node_modules/date-fns/is_thursday/index.js +35 -0
  262. package/dist/node_modules/date-fns/is_thursday/index.js.map +1 -0
  263. package/dist/node_modules/date-fns/is_tuesday/index.js +35 -0
  264. package/dist/node_modules/date-fns/is_tuesday/index.js.map +1 -0
  265. package/dist/node_modules/date-fns/is_wednesday/index.js +35 -0
  266. package/dist/node_modules/date-fns/is_wednesday/index.js.map +1 -0
  267. package/dist/node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js +39 -0
  268. package/dist/node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js.map +1 -0
  269. package/dist/node_modules/date-fns/locale/ar/build_distance_in_words_locale/index.js +110 -0
  270. package/dist/node_modules/date-fns/locale/ar/build_distance_in_words_locale/index.js.map +1 -0
  271. package/dist/node_modules/date-fns/locale/ar/build_format_locale/index.js +86 -0
  272. package/dist/node_modules/date-fns/locale/ar/build_format_locale/index.js.map +1 -0
  273. package/dist/node_modules/date-fns/locale/ar/index.js +26 -0
  274. package/dist/node_modules/date-fns/locale/ar/index.js.map +1 -0
  275. package/dist/node_modules/date-fns/locale/de/build_distance_in_words_locale/index.js +196 -0
  276. package/dist/node_modules/date-fns/locale/de/build_distance_in_words_locale/index.js.map +1 -0
  277. package/dist/node_modules/date-fns/locale/de/build_format_locale/index.js +90 -0
  278. package/dist/node_modules/date-fns/locale/de/build_format_locale/index.js.map +1 -0
  279. package/dist/node_modules/date-fns/locale/de/index.js +27 -0
  280. package/dist/node_modules/date-fns/locale/de/index.js.map +1 -0
  281. package/dist/node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js +110 -0
  282. package/dist/node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js.map +1 -0
  283. package/dist/node_modules/date-fns/locale/en/build_format_locale/index.js +101 -0
  284. package/dist/node_modules/date-fns/locale/en/build_format_locale/index.js.map +1 -0
  285. package/dist/node_modules/date-fns/locale/en/index.js +25 -0
  286. package/dist/node_modules/date-fns/locale/en/index.js.map +1 -0
  287. package/dist/node_modules/date-fns/locale/es/build_distance_in_words_locale/index.js +110 -0
  288. package/dist/node_modules/date-fns/locale/es/build_distance_in_words_locale/index.js.map +1 -0
  289. package/dist/node_modules/date-fns/locale/es/build_format_locale/index.js +86 -0
  290. package/dist/node_modules/date-fns/locale/es/build_format_locale/index.js.map +1 -0
  291. package/dist/node_modules/date-fns/locale/es/index.js +28 -0
  292. package/dist/node_modules/date-fns/locale/es/index.js.map +1 -0
  293. package/dist/node_modules/date-fns/locale/fr/build_distance_in_words_locale/index.js +110 -0
  294. package/dist/node_modules/date-fns/locale/fr/build_distance_in_words_locale/index.js.map +1 -0
  295. package/dist/node_modules/date-fns/locale/fr/build_format_locale/index.js +135 -0
  296. package/dist/node_modules/date-fns/locale/fr/build_format_locale/index.js.map +1 -0
  297. package/dist/node_modules/date-fns/locale/fr/index.js +27 -0
  298. package/dist/node_modules/date-fns/locale/fr/index.js.map +1 -0
  299. package/dist/node_modules/date-fns/locale/it/build_distance_in_words_locale/index.js +110 -0
  300. package/dist/node_modules/date-fns/locale/it/build_distance_in_words_locale/index.js.map +1 -0
  301. package/dist/node_modules/date-fns/locale/it/build_format_locale/index.js +86 -0
  302. package/dist/node_modules/date-fns/locale/it/build_format_locale/index.js.map +1 -0
  303. package/dist/node_modules/date-fns/locale/it/index.js +26 -0
  304. package/dist/node_modules/date-fns/locale/it/index.js.map +1 -0
  305. package/dist/node_modules/date-fns/locale/nl/build_distance_in_words_locale/index.js +110 -0
  306. package/dist/node_modules/date-fns/locale/nl/build_distance_in_words_locale/index.js.map +1 -0
  307. package/dist/node_modules/date-fns/locale/nl/build_format_locale/index.js +86 -0
  308. package/dist/node_modules/date-fns/locale/nl/build_format_locale/index.js.map +1 -0
  309. package/dist/node_modules/date-fns/locale/nl/index.js +27 -0
  310. package/dist/node_modules/date-fns/locale/nl/index.js.map +1 -0
  311. package/dist/node_modules/date-fns/locale/th/build_distance_in_words_locale/index.js +114 -0
  312. package/dist/node_modules/date-fns/locale/th/build_distance_in_words_locale/index.js.map +1 -0
  313. package/dist/node_modules/date-fns/locale/th/build_format_locale/index.js +74 -0
  314. package/dist/node_modules/date-fns/locale/th/build_format_locale/index.js.map +1 -0
  315. package/dist/node_modules/date-fns/locale/th/index.js +26 -0
  316. package/dist/node_modules/date-fns/locale/th/index.js.map +1 -0
  317. package/dist/node_modules/date-fns/parse/index.js +346 -0
  318. package/dist/node_modules/date-fns/parse/index.js.map +1 -0
  319. package/dist/node_modules/date-fns/start_of_iso_week/index.js +38 -0
  320. package/dist/node_modules/date-fns/start_of_iso_week/index.js.map +1 -0
  321. package/dist/node_modules/date-fns/start_of_iso_year/index.js +46 -0
  322. package/dist/node_modules/date-fns/start_of_iso_year/index.js.map +1 -0
  323. package/dist/node_modules/date-fns/start_of_week/index.js +51 -0
  324. package/dist/node_modules/date-fns/start_of_week/index.js.map +1 -0
  325. package/dist/node_modules/hyphenate-style-name/index.js +20 -0
  326. package/dist/node_modules/hyphenate-style-name/index.js.map +1 -0
  327. package/dist/node_modules/is-in-browser/dist/module.js +6 -0
  328. package/dist/node_modules/is-in-browser/dist/module.js.map +1 -0
  329. package/dist/node_modules/jss/dist/jss.esm.js +2220 -0
  330. package/dist/node_modules/jss/dist/jss.esm.js.map +1 -0
  331. package/dist/node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js +60 -0
  332. package/dist/node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js.map +1 -0
  333. package/dist/node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js +252 -0
  334. package/dist/node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js.map +1 -0
  335. package/dist/node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js +187 -0
  336. package/dist/node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js.map +1 -0
  337. package/dist/node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js +114 -0
  338. package/dist/node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js.map +1 -0
  339. package/dist/node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js +29 -0
  340. package/dist/node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js.map +1 -0
  341. package/dist/node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js +66 -0
  342. package/dist/node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js.map +1 -0
  343. package/dist/node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js +58 -0
  344. package/dist/node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js.map +1 -0
  345. package/dist/node_modules/object-assign/index.js +100 -0
  346. package/dist/node_modules/object-assign/index.js.map +1 -0
  347. package/dist/node_modules/prop-types/checkPropTypes.js +116 -0
  348. package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -0
  349. package/dist/node_modules/prop-types/factoryWithThrowingShims.js +75 -0
  350. package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
  351. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +626 -0
  352. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
  353. package/dist/node_modules/prop-types/index.js +34 -0
  354. package/dist/node_modules/prop-types/index.js.map +1 -0
  355. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +22 -0
  356. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
  357. package/dist/node_modules/prop-types/lib/has.js +12 -0
  358. package/dist/node_modules/prop-types/lib/has.js.map +1 -0
  359. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1326 -0
  360. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
  361. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +25 -0
  362. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +1 -0
  363. package/dist/node_modules/react/jsx-runtime.js +20 -0
  364. package/dist/node_modules/react/jsx-runtime.js.map +1 -0
  365. package/dist/node_modules/react-is/cjs/react-is.development.js +191 -0
  366. package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  367. package/dist/node_modules/react-is/cjs/react-is.production.min.js +27 -0
  368. package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
  369. package/dist/node_modules/react-is/index.js +20 -0
  370. package/dist/node_modules/react-is/index.js.map +1 -0
  371. package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js +18 -0
  372. package/dist/node_modules/tiny-warning/dist/tiny-warning.esm.js.map +1 -0
  373. package/dist/rules/src/chart/getAxisOptions.js +256 -0
  374. package/dist/rules/src/chart/getAxisOptions.js.map +1 -0
  375. package/dist/rules/src/chart/getBaseOptions.js +77 -0
  376. package/dist/rules/src/chart/getBaseOptions.js.map +1 -0
  377. package/dist/rules/src/chart/getChartOptions.js +120 -0
  378. package/dist/rules/src/chart/getChartOptions.js.map +1 -0
  379. package/dist/rules/src/chart/getGridOptions.js +46 -0
  380. package/dist/rules/src/chart/getGridOptions.js.map +1 -0
  381. package/dist/rules/src/chart/getTooltipOptions.js +223 -0
  382. package/dist/rules/src/chart/getTooltipOptions.js.map +1 -0
  383. package/dist/rules/src/constants.js +65 -0
  384. package/dist/rules/src/constants.js.map +1 -0
  385. package/dist/rules/src/date.js +121 -0
  386. package/dist/rules/src/date.js.map +1 -0
  387. package/dist/rules/src/dimension-utils.js +57 -0
  388. package/dist/rules/src/dimension-utils.js.map +1 -0
  389. package/dist/rules/src/factories/choro-series.js +68 -0
  390. package/dist/rules/src/factories/choro-series.js.map +1 -0
  391. package/dist/rules/src/factories/sample-focus.js +25 -0
  392. package/dist/rules/src/factories/sample-focus.js.map +1 -0
  393. package/dist/rules/src/factories/sample-series.js +53 -0
  394. package/dist/rules/src/factories/sample-series.js.map +1 -0
  395. package/dist/rules/src/factories/scatter-dimension.js +35 -0
  396. package/dist/rules/src/factories/scatter-dimension.js.map +1 -0
  397. package/dist/rules/src/factories/scatter-focus.js +42 -0
  398. package/dist/rules/src/factories/scatter-focus.js.map +1 -0
  399. package/dist/rules/src/factories/scatter-series.js +91 -0
  400. package/dist/rules/src/factories/scatter-series.js.map +1 -0
  401. package/dist/rules/src/factories/stacked-dimension.js +32 -0
  402. package/dist/rules/src/factories/stacked-dimension.js.map +1 -0
  403. package/dist/rules/src/factories/stacked-series.js +188 -0
  404. package/dist/rules/src/factories/stacked-series.js.map +1 -0
  405. package/dist/rules/src/factories/symbol-dimension.js +32 -0
  406. package/dist/rules/src/factories/symbol-dimension.js.map +1 -0
  407. package/dist/rules/src/factories/symbol-series.js +65 -0
  408. package/dist/rules/src/factories/symbol-series.js.map +1 -0
  409. package/dist/rules/src/factories/timeline-focus.js +21 -0
  410. package/dist/rules/src/factories/timeline-focus.js.map +1 -0
  411. package/dist/rules/src/factories/timeline-series.js +94 -0
  412. package/dist/rules/src/factories/timeline-series.js.map +1 -0
  413. package/dist/rules/src/get-values-enhanced.js +133 -0
  414. package/dist/rules/src/get-values-enhanced.js.map +1 -0
  415. package/dist/rules/src/header/getDefaultSubtitle.js +44 -0
  416. package/dist/rules/src/header/getDefaultSubtitle.js.map +1 -0
  417. package/dist/rules/src/header/getHeaderUnits.js +21 -0
  418. package/dist/rules/src/header/getHeaderUnits.js.map +1 -0
  419. package/dist/rules/src/header/getSubtitleFlags.js +47 -0
  420. package/dist/rules/src/header/getSubtitleFlags.js.map +1 -0
  421. package/dist/rules/src/header/getTitleFlags.js +12 -0
  422. package/dist/rules/src/header/getTitleFlags.js.map +1 -0
  423. package/dist/rules/src/index.js +378 -0
  424. package/dist/rules/src/index.js.map +1 -0
  425. package/dist/rules/src/layout.js +107 -0
  426. package/dist/rules/src/layout.js.map +1 -0
  427. package/dist/rules/src/observation-formater.js +86 -0
  428. package/dist/rules/src/observation-formater.js.map +1 -0
  429. package/dist/rules/src/preparators/formatValue.js +96 -0
  430. package/dist/rules/src/preparators/formatValue.js.map +1 -0
  431. package/dist/rules/src/preparators/getObservations.js +22 -0
  432. package/dist/rules/src/preparators/getObservations.js.map +1 -0
  433. package/dist/rules/src/preparators/getReportingYearStart.js +19 -0
  434. package/dist/rules/src/preparators/getReportingYearStart.js.map +1 -0
  435. package/dist/rules/src/properties/errors.js +22 -0
  436. package/dist/rules/src/properties/errors.js.map +1 -0
  437. package/dist/rules/src/properties/focus.js +72 -0
  438. package/dist/rules/src/properties/focus.js.map +1 -0
  439. package/dist/rules/src/properties/getAvailableChartTypes.js +31 -0
  440. package/dist/rules/src/properties/getAvailableChartTypes.js.map +1 -0
  441. package/dist/rules/src/properties/getHeaderProps.js +76 -0
  442. package/dist/rules/src/properties/getHeaderProps.js.map +1 -0
  443. package/dist/rules/src/properties/getInformationsStateFromNewProps.js +50 -0
  444. package/dist/rules/src/properties/getInformationsStateFromNewProps.js.map +1 -0
  445. package/dist/rules/src/properties/getObservationsType.js +28 -0
  446. package/dist/rules/src/properties/getObservationsType.js.map +1 -0
  447. package/dist/rules/src/properties/getStringifiedSubtitle.js +9 -0
  448. package/dist/rules/src/properties/getStringifiedSubtitle.js.map +1 -0
  449. package/dist/rules/src/properties/index.js +384 -0
  450. package/dist/rules/src/properties/index.js.map +1 -0
  451. package/dist/rules/src/properties/linear.js +123 -0
  452. package/dist/rules/src/properties/linear.js.map +1 -0
  453. package/dist/rules/src/properties/scatter.js +156 -0
  454. package/dist/rules/src/properties/scatter.js.map +1 -0
  455. package/dist/rules/src/properties/stacked.js +96 -0
  456. package/dist/rules/src/properties/stacked.js.map +1 -0
  457. package/dist/rules/src/properties/symbol.js +76 -0
  458. package/dist/rules/src/properties/symbol.js.map +1 -0
  459. package/dist/rules/src/properties/utils.js +86 -0
  460. package/dist/rules/src/properties/utils.js.map +1 -0
  461. package/dist/rules/src/sdmx-data/index.js +38 -0
  462. package/dist/rules/src/sdmx-data/index.js.map +1 -0
  463. package/dist/rules/src/table/factories/getCellValue.js +53 -0
  464. package/dist/rules/src/table/factories/getCellValue.js.map +1 -0
  465. package/dist/rules/src/v8-transformer.js +174 -0
  466. package/dist/rules/src/v8-transformer.js.map +1 -0
  467. package/dist/rules2/src/applyHierarchicalCodesToDim.js +126 -0
  468. package/dist/rules2/src/applyHierarchicalCodesToDim.js.map +1 -0
  469. package/dist/rules2/src/combinedValuesDisplay.js +77 -0
  470. package/dist/rules2/src/combinedValuesDisplay.js.map +1 -0
  471. package/dist/rules2/src/constants.js +9 -0
  472. package/dist/rules2/src/constants.js.map +1 -0
  473. package/dist/rules2/src/duplicateObservations.js +38 -0
  474. package/dist/rules2/src/duplicateObservations.js.map +1 -0
  475. package/dist/rules2/src/enhanceObservations.js +98 -0
  476. package/dist/rules2/src/enhanceObservations.js.map +1 -0
  477. package/dist/rules2/src/getAttributesSeries.js +39 -0
  478. package/dist/rules2/src/getAttributesSeries.js.map +1 -0
  479. package/dist/rules2/src/getCombinationDefinitions.js +50 -0
  480. package/dist/rules2/src/getCombinationDefinitions.js.map +1 -0
  481. package/dist/rules2/src/getDataflowAttributes.js +25 -0
  482. package/dist/rules2/src/getDataflowAttributes.js.map +1 -0
  483. package/dist/rules2/src/getDataflowTooltipAttributesIds.js +33 -0
  484. package/dist/rules2/src/getDataflowTooltipAttributesIds.js.map +1 -0
  485. package/dist/rules2/src/getDimensionValuesIndexes.js +16 -0
  486. package/dist/rules2/src/getDimensionValuesIndexes.js.map +1 -0
  487. package/dist/rules2/src/getHCodelistsRefsInData.js +35 -0
  488. package/dist/rules2/src/getHCodelistsRefsInData.js.map +1 -0
  489. package/dist/rules2/src/getHeaderCombinations.js +51 -0
  490. package/dist/rules2/src/getHeaderCombinations.js.map +1 -0
  491. package/dist/rules2/src/getHeaderCoordinates.js +10 -0
  492. package/dist/rules2/src/getHeaderCoordinates.js.map +1 -0
  493. package/dist/rules2/src/getHeaderSubtitle.js +37 -0
  494. package/dist/rules2/src/getHeaderSubtitle.js.map +1 -0
  495. package/dist/rules2/src/getHeaderTitle.js +18 -0
  496. package/dist/rules2/src/getHeaderTitle.js.map +1 -0
  497. package/dist/rules2/src/getMSDInformations.js +26 -0
  498. package/dist/rules2/src/getMSDInformations.js.map +1 -0
  499. package/dist/rules2/src/getManyValuesDimensions.js +37 -0
  500. package/dist/rules2/src/getManyValuesDimensions.js.map +1 -0
  501. package/dist/rules2/src/getMetadataCoordinates.js +40 -0
  502. package/dist/rules2/src/getMetadataCoordinates.js.map +1 -0
  503. package/dist/rules2/src/getNotDisplayedIds.js +56 -0
  504. package/dist/rules2/src/getNotDisplayedIds.js.map +1 -0
  505. package/dist/rules2/src/getOneValueDimensions.js +37 -0
  506. package/dist/rules2/src/getOneValueDimensions.js.map +1 -0
  507. package/dist/rules2/src/getSeriesCombinations.js +27 -0
  508. package/dist/rules2/src/getSeriesCombinations.js.map +1 -0
  509. package/dist/rules2/src/hasCellMetadata.js +17 -0
  510. package/dist/rules2/src/hasCellMetadata.js.map +1 -0
  511. package/dist/rules2/src/hierarchiseDimensionWithAdvancedHierarchy2.js +60 -0
  512. package/dist/rules2/src/hierarchiseDimensionWithAdvancedHierarchy2.js.map +1 -0
  513. package/dist/rules2/src/hierarchiseDimensionWithNativeHierarchy2.js +38 -0
  514. package/dist/rules2/src/hierarchiseDimensionWithNativeHierarchy2.js.map +1 -0
  515. package/dist/rules2/src/index.js +47 -0
  516. package/dist/rules2/src/index.js.map +1 -0
  517. package/dist/rules2/src/parseAttributes.js +44 -0
  518. package/dist/rules2/src/parseAttributes.js.map +1 -0
  519. package/dist/rules2/src/parseCombinations.js +105 -0
  520. package/dist/rules2/src/parseCombinations.js.map +1 -0
  521. package/dist/rules2/src/parseHierarchicalCodelist.js +34 -0
  522. package/dist/rules2/src/parseHierarchicalCodelist.js.map +1 -0
  523. package/dist/rules2/src/parseMetadataSeries.js +124 -0
  524. package/dist/rules2/src/parseMetadataSeries.js.map +1 -0
  525. package/dist/rules2/src/prepareData.js +78 -0
  526. package/dist/rules2/src/prepareData.js.map +1 -0
  527. package/dist/rules2/src/refineAttributes.js +19 -0
  528. package/dist/rules2/src/refineAttributes.js.map +1 -0
  529. package/dist/rules2/src/refineDimensions.js +21 -0
  530. package/dist/rules2/src/refineDimensions.js.map +1 -0
  531. package/dist/rules2/src/refineTimePeriod.js +130 -0
  532. package/dist/rules2/src/refineTimePeriod.js.map +1 -0
  533. package/dist/rules2/src/sdmx3.0DataFormatPatch.js +12 -0
  534. package/dist/rules2/src/sdmx3.0DataFormatPatch.js.map +1 -0
  535. package/dist/rules2/src/table/declineObservationsOverAttributes.js +35 -0
  536. package/dist/rules2/src/table/declineObservationsOverAttributes.js.map +1 -0
  537. package/dist/rules2/src/table/getCells.js +96 -0
  538. package/dist/rules2/src/table/getCells.js.map +1 -0
  539. package/dist/rules2/src/table/getCellsAttributesIds.js +41 -0
  540. package/dist/rules2/src/table/getCellsAttributesIds.js.map +1 -0
  541. package/dist/rules2/src/table/getCellsMetadataCoordinates.js +16 -0
  542. package/dist/rules2/src/table/getCellsMetadataCoordinates.js.map +1 -0
  543. package/dist/rules2/src/table/getCuratedCells.js +36 -0
  544. package/dist/rules2/src/table/getCuratedCells.js.map +1 -0
  545. package/dist/rules2/src/table/getFlagsAndNotes.js +26 -0
  546. package/dist/rules2/src/table/getFlagsAndNotes.js.map +1 -0
  547. package/dist/rules2/src/table/getIndexedCombinationsByDisplay.js +19 -0
  548. package/dist/rules2/src/table/getIndexedCombinationsByDisplay.js.map +1 -0
  549. package/dist/rules2/src/table/getLayout.js +87 -0
  550. package/dist/rules2/src/table/getLayout.js.map +1 -0
  551. package/dist/rules2/src/table/getLayoutData2.js +205 -0
  552. package/dist/rules2/src/table/getLayoutData2.js.map +1 -0
  553. package/dist/rules2/src/table/getSortedLayoutIndexes.js +141 -0
  554. package/dist/rules2/src/table/getSortedLayoutIndexes.js.map +1 -0
  555. package/dist/rules2/src/table/getTableLabelAccessor.js +11 -0
  556. package/dist/rules2/src/table/getTableLabelAccessor.js.map +1 -0
  557. package/dist/rules2/src/table/getTableLayoutIds.js +317 -0
  558. package/dist/rules2/src/table/getTableLayoutIds.js.map +1 -0
  559. package/dist/rules2/src/table/getTableProps.js +85 -0
  560. package/dist/rules2/src/table/getTableProps.js.map +1 -0
  561. package/dist/rules2/src/table/parseSeriesIndexesHierarchies.js +82 -0
  562. package/dist/rules2/src/table/parseSeriesIndexesHierarchies.js.map +1 -0
  563. package/dist/rules2/src/table/parseValueHierarchy.js +29 -0
  564. package/dist/rules2/src/table/parseValueHierarchy.js.map +1 -0
  565. package/dist/rules2/src/table/refineLayoutSize2.js +324 -0
  566. package/dist/rules2/src/table/refineLayoutSize2.js.map +1 -0
  567. package/dist/rules2/src/utils.js +29 -0
  568. package/dist/rules2/src/utils.js.map +1 -0
  569. package/dist/viewer/src/chart.js +50 -0
  570. package/dist/viewer/src/chart.js.map +1 -0
  571. package/dist/viewer/src/chartUtils/options.js +33 -0
  572. package/dist/viewer/src/chartUtils/options.js.map +1 -0
  573. package/dist/viewer/src/chartUtils/series.js +54 -0
  574. package/dist/viewer/src/chartUtils/series.js.map +1 -0
  575. package/dist/viewer/src/footer.js +39 -0
  576. package/dist/viewer/src/footer.js.map +1 -0
  577. package/dist/viewer/src/header.js +12 -0
  578. package/dist/viewer/src/header.js.map +1 -0
  579. package/dist/viewer/src/index.js +160 -0
  580. package/dist/viewer/src/index.js.map +1 -0
  581. package/dist/viewer/src/legends/AxisLegend.js +42 -0
  582. package/dist/viewer/src/legends/AxisLegend.js.map +1 -0
  583. package/dist/viewer/src/legends/ChartLegends.js +80 -0
  584. package/dist/viewer/src/legends/ChartLegends.js.map +1 -0
  585. package/dist/viewer/src/legends/FocusLegend.js +67 -0
  586. package/dist/viewer/src/legends/FocusLegend.js.map +1 -0
  587. package/dist/viewer/src/legends/Legend.js +51 -0
  588. package/dist/viewer/src/legends/Legend.js.map +1 -0
  589. package/dist/viewer/src/legends/SeriesLegend.js +77 -0
  590. package/dist/viewer/src/legends/SeriesLegend.js.map +1 -0
  591. package/dist/viewer/src/utils.js +24 -0
  592. package/dist/viewer/src/utils.js.map +1 -0
  593. package/package.json +1 -1
  594. package/.editorconfig +0 -19
  595. package/.gitlab-ci.yml +0 -48
  596. package/prettier.config.js +0 -13
  597. package/rollup.config.mjs +0 -28
  598. package/src/rules/test/extractSdmxArtefacts.js +0 -26
  599. package/src/rules/test/get-values-enhanced.test.js +0 -127
  600. package/src/rules/test/oecd-HEALTH_PROT-no-freq.json +0 -2903
  601. package/src/rules/test/oecd-HEALTH_PROT-parsed.js +0 -398
  602. package/src/rules/test/oecd-HEALTH_PROT-wrong-freq.json +0 -2913
  603. package/src/rules/test/oecd-HEALTH_PROT.json +0 -2913
  604. package/src/rules/test/oecd-KEI.json +0 -372
  605. package/src/rules/test/scatter-property.js +0 -455
  606. package/src/rules/test/stacked-property.js +0 -273
  607. package/src/rules/test/symbol-property.js +0 -262
  608. package/src/rules/test/v8-transformer.test.js +0 -90
  609. package/test/applyHierarchicalCodesToDim.test.js +0 -643
  610. package/test/combinedValuesDisplay.test.js +0 -66
  611. package/test/duplicateObs.test.js +0 -118
  612. package/test/enhanceObservations2.test.js +0 -257
  613. package/test/getAttributesSeries.test.js +0 -66
  614. package/test/getAxisOptions.test.js +0 -309
  615. package/test/getBaseOptions.test.js +0 -77
  616. package/test/getCellValue.test.js +0 -32
  617. package/test/getCells.test.js +0 -178
  618. package/test/getCellsMetadataCoordinates.test.js +0 -40
  619. package/test/getCombinationDefinitions.test.js +0 -104
  620. package/test/getCombinationDimensionsData.test.js +0 -99
  621. package/test/getDataflowAttributes.test.js +0 -23
  622. package/test/getDataflowTooltipAttributesIds.test.js +0 -146
  623. package/test/getDimensionValuesIndexes.test.js +0 -33
  624. package/test/getGridOptions.test.js +0 -65
  625. package/test/getHCodelistsRefs.test.js +0 -23
  626. package/test/getHeaderCombinations.test.js +0 -62
  627. package/test/getHeaderTitle.test.js +0 -25
  628. package/test/getLayout.test.js +0 -54
  629. package/test/getLayoutData2.test.js +0 -540
  630. package/test/getMSDInformations.test.js +0 -35
  631. package/test/getMetadataCoordinates.test.js +0 -0
  632. package/test/getNotDisplayedIds.test.js +0 -47
  633. package/test/getObservationsType.test.js +0 -55
  634. package/test/getOneValueDimensions.test.js +0 -35
  635. package/test/getReportingYearStart.test.js +0 -59
  636. package/test/getSeriesCombinations.test.js +0 -29
  637. package/test/getSortedLayoutIndexes.test.js +0 -1248
  638. package/test/getTableLabelAccessor.test.js +0 -50
  639. package/test/getTableLayoutIds.test.js +0 -356
  640. package/test/hierarchiseDimensionWithNativeHierarchy2.test.js +0 -109
  641. package/test/isTableLayoutCompatible.test.js +0 -102
  642. package/test/metadata-parsing-perf.test.js +0 -509
  643. package/test/mocks/MSD_TEST.json +0 -490
  644. package/test/mocks/OECD_SNA_TABLE1_1.0_-_AUS_V_metadata.json +0 -152
  645. package/test/mocks/h-codelist.json +0 -2095
  646. package/test/mocks/large_metadata_series.json +0 -701
  647. package/test/mocks/observations-advanced-attributes.json +0 -55382
  648. package/test/mocks/table-invert-time--data.json +0 -80211
  649. package/test/mocks/table-invert-time--inverted.json +0 -80076
  650. package/test/mocks/table-layout-multi-hierarchies--layout.json +0 -621
  651. package/test/mocks/table-layout-multi-hierarchies--layoutData.json +0 -32411
  652. package/test/mocks/table-layout-multi-hierarchies--layoutIndexes.json +0 -2760
  653. package/test/mocks/table-layout-multi-hierarchies--observations.json +0 -30688
  654. package/test/mocks/table-layout-multi-hierarchies--sizedIndexes.json +0 -2762
  655. package/test/mocks/table-layout-truncation1--layout.json +0 -27469
  656. package/test/mocks/table-layout-truncation1--layoutData.json +0 -20358
  657. package/test/mocks/table-layout-truncation1--layoutIndexes.json +0 -7512
  658. package/test/mocks/table-layout-truncation1--observations.json +0 -70002
  659. package/test/mocks/table-layout-truncation1--sizedIndexes.json +0 -3011
  660. package/test/mocks/table-prep-multi-hierarchies--attributes.json +0 -46
  661. package/test/mocks/table-prep-multi-hierarchies--dimensions.json +0 -688
  662. package/test/mocks/table-prep-multi-hierarchies--enhancedObservations.json +0 -19696
  663. package/test/mocks/table-prep-multi-hierarchies--observations.json +0 -8246
  664. package/test/mocks/table-prep-multi-hierarchies--sdmxJson.json +0 -2985
  665. package/test/mocks/table-prep-simple-duplicate--dimensions2.json +0 -858
  666. package/test/mocks/table-prep-simple-duplicate--duplicated2.json +0 -77502
  667. package/test/mocks/table-prep-simple-duplicate--observations2.json +0 -60002
  668. package/test/mocks/table-prep-truncation1--dimensions.json +0 -35057
  669. package/test/mocks/table-prep-truncation1--enhancedObservations.json +0 -70002
  670. package/test/mocks/table-prep-truncation1--observations.json +0 -27502
  671. package/test/mocks/table-prep-truncation1--sdmxJson.json +0 -55103
  672. package/test/mocks/table-prep-units--observations.json +0 -284286
  673. package/test/mocks/table-prep-units--unitsSeries.json +0 -41042
  674. package/test/parseAttributes.test.js +0 -36
  675. package/test/parseCombinations.test.js +0 -172
  676. package/test/parseHierarchicalCodelist.test.js +0 -140
  677. package/test/parseMetadataSeries.test.js +0 -126
  678. package/test/parseSeriesIndexesHierarchies.test.js +0 -345
  679. package/test/parseValueHierarchy.test.js +0 -138
  680. package/test/refineAttributes.test.js +0 -29
  681. package/test/refineLayoutSize2.test.js +0 -3410
  682. package/test/refineMetadataCoordinates.test.js +0 -86
  683. package/test/refineTimePeriod.test.js +0 -580
  684. package/test/refinedDimensions.test.js +0 -35
  685. package/test/scatter-dimension.test.js +0 -79
  686. package/test/scatter-series.test.js +0 -67
@@ -0,0 +1,317 @@
1
+ import * as R from 'ramda';
2
+ import { isTimePeriodDimension, isRefAreaDimension } from '@sis-cc/dotstatsuite-sdmxjs';
3
+
4
+ const getCombinationsNotInLayout = (combinations, layoutIds) => {
5
+ const { header=[], sections=[], rows=[] } = layoutIds;
6
+ const idsInLayout = new Set([...header, ...sections, ...rows]);
7
+ return R.reject(comb => idsInLayout.has(comb.id), combinations);
8
+ };
9
+
10
+ const indexCombsRelationships = (combinations) => R.reduce((acc, comb) => {
11
+ const { id, relationship=[] } = comb;
12
+ return R.assoc(id, relationship, acc);
13
+ }, {}, combinations);
14
+
15
+ const getLayoutLevelRelationship = indexedRelationships => ids => R.reduce((acc, id) => {
16
+ if (R.has(id, indexedRelationships)) {
17
+ return R.concat(acc, R.prop(id, indexedRelationships));
18
+ }
19
+ return R.append(id, acc);
20
+ }, [], ids);
21
+
22
+ const getLayoutRelationships = (indexedRelationships, layoutIds) => R.map(
23
+ getLayoutLevelRelationship(indexedRelationships),
24
+ layoutIds
25
+ );
26
+
27
+ const injectCombination = combination => ids => {
28
+ const { id, concepts=[] } = combination;
29
+ const conceptsSet = new Set(concepts);
30
+ let inject = true;
31
+ const refined = R.reduce((acc, i) => {
32
+ if (!conceptsSet.has(i)) {
33
+ return R.append(i, acc);
34
+ }
35
+ if (inject) {
36
+ inject = false;
37
+ return R.append(id, acc);
38
+ }
39
+ return acc;
40
+ }, [], ids);
41
+ return inject ? R.append(id, refined) : refined;
42
+ };
43
+
44
+ const getCombinationLevelCompatibility = (layoutRelationships, combination) => {
45
+ const { relationship=[] } = combination;
46
+ const idsInHeaderSet = new Set(layoutRelationships.header);
47
+ const idsInSectionsSet = new Set(layoutRelationships.sections);
48
+ const idsInRowsSet = new Set(layoutRelationships.rows);
49
+ const [idsInHeader, rest] = R.partition(
50
+ i => idsInHeaderSet.has(i),
51
+ relationship
52
+ );
53
+ const [idsInSections, idsInRows] = R.reduce((_acc, id) => {
54
+ if (idsInSectionsSet.has(id))
55
+ return R.over(R.lensIndex(0), R.append(id), _acc);
56
+ if (idsInRowsSet.has(id))
57
+ return R.over(R.lensIndex(1), R.append(id), _acc);
58
+ return R.over(R.lensIndex(2), R.append(id), _acc);
59
+ }, [[], [], []], rest);
60
+ if (!R.isEmpty(idsInHeader) && R.isEmpty(idsInSections) && R.isEmpty(idsInRows)) {
61
+ return 'header';
62
+ }
63
+ if (!R.isEmpty(idsInHeader)) {
64
+ return null;
65
+ }
66
+ if (!R.isEmpty(idsInSections) && R.isEmpty(idsInRows)) {
67
+ return 'sections';
68
+ }
69
+ if (!R.isEmpty(idsInRows)) {
70
+ return 'rows';
71
+ }
72
+ return 'blank';
73
+ };
74
+
75
+ const filterLayoutIds = (indexedCombinations, layoutDimsIds, obsAttributes) => (layoutIds) => {
76
+ const layoutConcepts = R.map(
77
+ R.reduce((acc, id) => {
78
+ if (R.has(id, indexedCombinations)) {
79
+ return R.concat(acc, R.path([id, 'concepts'], indexedCombinations));
80
+ }
81
+ return R.append(id, acc);
82
+ }, []),
83
+ layoutIds
84
+ );
85
+
86
+ return R.mapObjIndexed(
87
+ (ids, level) => R.filter(id => {
88
+ if (id === 'OBS_ATTRIBUTES') {
89
+ return !R.isEmpty(obsAttributes);
90
+ }
91
+ if (R.has(id, indexedCombinations)) {
92
+ const comb = R.prop(id, indexedCombinations);
93
+ const dims = R.filter(i => layoutDimsIds.has(i), comb.concepts);
94
+ if (!R.isEmpty(dims)) {
95
+ return true;
96
+ }
97
+ const oppositeIds = level === 'header'
98
+ ? R.concat(R.prop('sections', layoutConcepts), R.prop('rows', layoutConcepts))
99
+ : R.prop('header', layoutConcepts);
100
+ return R.isEmpty(R.intersection(comb.relationship, oppositeIds));
101
+ }
102
+ return layoutDimsIds.has(id);
103
+ }, ids),
104
+ layoutIds
105
+ );
106
+ };
107
+
108
+ const injectCombinationsInLayout = (combinations, layoutIds, defaultLayoutIds = {}) => {
109
+ const notInLayoutCombs = getCombinationsNotInLayout(combinations, layoutIds);
110
+ if (R.isEmpty(notInLayoutCombs)) {
111
+ return layoutIds;
112
+ }
113
+ const indexedCombsRelationships = indexCombsRelationships(combinations);
114
+ let layoutRelationships = getLayoutRelationships(indexedCombsRelationships, layoutIds);
115
+ const defaultLayoutRelationships = getLayoutRelationships(indexedCombsRelationships, defaultLayoutIds);
116
+ return R.reduce((acc, comb) => {
117
+ let levelCompatibility = getCombinationLevelCompatibility(layoutRelationships, comb);
118
+ if (R.isNil(levelCompatibility)) {
119
+ return acc;
120
+ }
121
+ if (R.equals('blank', levelCompatibility)) {
122
+ levelCompatibility = getCombinationLevelCompatibility(defaultLayoutRelationships, comb);
123
+ if (R.isNil(levelCompatibility)) {
124
+ return acc;
125
+ }
126
+ levelCompatibility = R.equals('blank', levelCompatibility) ? 'rows' : levelCompatibility;
127
+ }
128
+
129
+ layoutRelationships[levelCompatibility] = R.concat(layoutRelationships[levelCompatibility], comb.relationship);
130
+ const ids = injectCombination(comb)(acc[levelCompatibility]);
131
+ return R.assoc(levelCompatibility, ids)(acc);
132
+ }, layoutIds, notInLayoutCombs);
133
+ };
134
+
135
+ const getLayoutDimsIds = dimensions => R.reduce(
136
+ (acc, d) => (d.header ? acc : acc.add(d.id)),
137
+ new Set([]),
138
+ dimensions,
139
+ );
140
+
141
+ const getLayoutCombinations = (combinations, layoutDimsIds, attributes) => {
142
+ const indexedAttributes = R.indexBy(R.prop('id'), attributes);
143
+ return R.reduce(
144
+ (acc, comb) => {
145
+ const { layoutConcepts, relationship } = R.reduce(
146
+ (_acc, concept) => {
147
+ if (layoutDimsIds.has(concept)) {
148
+ return R.map(R.append(concept), _acc);
149
+ }
150
+ if (R.has(concept, indexedAttributes)) {
151
+ const attr = R.prop(concept, indexedAttributes);
152
+ return attr.series
153
+ ? {
154
+ ..._acc,
155
+ relationship: R.concat(_acc.relationship, attr.relationship),
156
+ }
157
+ : _acc;
158
+ }
159
+ return _acc;
160
+ },
161
+ { layoutConcepts: [], relationship: [] },
162
+ comb.concepts || [],
163
+ );
164
+ if (R.isEmpty(relationship)) {
165
+ return acc;
166
+ }
167
+ return R.append({ ...comb, relationship, concepts: layoutConcepts }, acc);
168
+ },
169
+ [],
170
+ combinations,
171
+ );
172
+ };
173
+
174
+ const extractConcepts = (ids, indexedCombinations, layoutDimsIds) => {
175
+ const entry = R.find(id => {
176
+ if (R.has(id, indexedCombinations)) {
177
+ const dimId = R.find(i => layoutDimsIds.has(i), R.pathOr([], [id, 'concepts'], indexedCombinations));
178
+ return !R.isNil(dimId);
179
+ }
180
+ return true;
181
+ }, ids);
182
+
183
+ const getRelationship = id => {
184
+ if (R.has(id, indexedCombinations)) {
185
+ return R.append(id, R.path([id, 'relationship'], indexedCombinations));
186
+ }
187
+ return [id];
188
+ };
189
+ let indexedRels = R.reduce((acc, id) =>
190
+ R.assoc(id, getRelationship(id), acc)
191
+ , {}, ids);
192
+
193
+ let relationship = [entry];
194
+ while (!R.isEmpty(indexedRels)) {
195
+ const related = R.pickBy(rels => !R.isEmpty(R.intersection(relationship, rels)), indexedRels);
196
+ if (R.isEmpty(related)) {
197
+ break;
198
+ }
199
+ indexedRels = R.omit(R.keys(related), indexedRels);
200
+ relationship = R.concat(relationship, R.unnest(R.values(related)));
201
+ }
202
+ const set = new Set(relationship);
203
+ return R.partition(id => set.has(id), ids);
204
+ };
205
+
206
+ const injectRemainingDimensionsInLayout = (layoutIds, remainingDims, indexedCombinations, layoutDimsIds) => {
207
+ let _layout = layoutIds;
208
+ let _remaining = remainingDims;
209
+
210
+ const dimInRows = R.find(id => {
211
+ if (layoutDimsIds.has(id)) {
212
+ return true;
213
+ }
214
+ const dimId = R.find(i => layoutDimsIds.has(i), R.pathOr([], [id, 'concepts'], indexedCombinations));
215
+ return !R.isNil(dimId);
216
+ }, _layout.rows);
217
+
218
+ if (R.isNil(dimInRows)) {
219
+ if (R.isEmpty(_remaining)) {
220
+ const toTakeIn = R.isEmpty(_layout.sections) ? 'header' : 'sections';
221
+ const [extracted, remains] = extractConcepts(R.prop(toTakeIn, _layout), indexedCombinations, layoutDimsIds);
222
+ _layout = ({ ..._layout, rows: R.concat(_layout.rows, extracted), [toTakeIn]: remains });
223
+ }
224
+ else {
225
+ _layout = R.over(R.lensProp('rows'), R.append(R.head(_remaining)))(_layout);
226
+ _remaining = R.tail(_remaining);
227
+ }
228
+ }
229
+ if (!R.isEmpty(_remaining)) {
230
+ const hasNoHeader = R.isEmpty(_layout.header);
231
+ const firstRemaining = R.head(_remaining);
232
+ _remaining = hasNoHeader ? R.tail(_remaining) : _remaining;
233
+ _layout = {
234
+ ..._layout,
235
+ sections: R.concat(_layout.sections, _remaining),
236
+ header: hasNoHeader ? [firstRemaining] : _layout.header,
237
+ };
238
+ }
239
+ return _layout;
240
+ };
241
+
242
+ const getTableLayoutIds = (
243
+ defaultLayoutIds,
244
+ currentLayoutIds,
245
+ dimensions,
246
+ attributes,
247
+ combinations
248
+ ) => {
249
+ const layoutDimsIds = getLayoutDimsIds(dimensions);
250
+ const layoutCombinations = getLayoutCombinations(
251
+ combinations,
252
+ layoutDimsIds,
253
+ attributes,
254
+ );
255
+ const isBlank = R.pipe(R.values, R.all(R.isEmpty))(currentLayoutIds);
256
+
257
+ const combinationsConcepts = R.pipe(R.pluck('_concepts'), R.unnest, ids => new Set(ids))(combinations);
258
+ const obsAttributes = R.filter(a =>
259
+ a.series && R.isEmpty(a.relationship || []) && a.display && !combinationsConcepts.has(a)
260
+ , attributes);
261
+ const indexedCombinations = R.indexBy(R.prop('id'), layoutCombinations);
262
+ const filteredLayoutIds = filterLayoutIds(indexedCombinations, layoutDimsIds, obsAttributes)
263
+ (isBlank ? defaultLayoutIds : currentLayoutIds);
264
+
265
+ const layoutWithCombs = injectCombinationsInLayout(layoutCombinations, filteredLayoutIds, defaultLayoutIds);
266
+ const layoutRelationshipsSets = R.map(R.pipe(
267
+ ids => R.pick(ids, indexedCombinations),
268
+ R.values,
269
+ R.pluck('relationship'),
270
+ R.unnest,
271
+ i => new Set(i)
272
+ ), layoutWithCombs);
273
+ const layoutConceptsSets = R.pipe(
274
+ R.map(
275
+ R.reduce((acc, id) => {
276
+ if (R.has(id, indexedCombinations)) {
277
+ return R.concat(acc, R.path([id, 'concepts'], indexedCombinations));
278
+ }
279
+ return R.append(id, acc);
280
+ }, []),
281
+ ),
282
+ R.values,
283
+ R.unnest,
284
+ ids => new Set(ids)
285
+ )(layoutWithCombs);
286
+ const defaultLayoutConceptsSets = R.map(
287
+ ids => new Set(ids),
288
+ defaultLayoutIds
289
+ );
290
+
291
+ const { nextLayout, remaining } = R.reduce((acc, dim) => {
292
+ if (layoutConceptsSets.has(dim.id) || dim.header) {
293
+ return acc;
294
+ }
295
+ if (layoutRelationshipsSets.header.has(dim.id) || defaultLayoutConceptsSets.header.has(dim.id)) {
296
+ return R.over(R.lensPath(['nextLayout', 'header']), R.append(dim.id))(acc);
297
+ }
298
+ if (layoutRelationshipsSets.sections.has(dim.id) || defaultLayoutConceptsSets.sections.has(dim.id)) {
299
+ return R.over(R.lensPath(['nextLayout', 'sections']), R.append(dim.id))(acc);
300
+ }
301
+ if (layoutRelationshipsSets.rows.has(dim.id) || defaultLayoutConceptsSets.rows.has(dim.id)) {
302
+ return R.over(R.lensPath(['nextLayout','rows']), R.append(dim.id))(acc);
303
+ }
304
+ if (isTimePeriodDimension(dim)) {
305
+ return R.over(R.lensPath(['nextLayout','header']), R.append(dim.id))(acc);
306
+ }
307
+ if (isRefAreaDimension(dim)) {
308
+ return R.over(R.lensPath(['nextLayout','rows']), R.append(dim.id))(acc);
309
+ }
310
+ return R.over(R.lensProp('remaining'), R.append(dim.id))(acc);
311
+ }, { nextLayout: layoutWithCombs, remaining: [] }, dimensions);
312
+
313
+ return injectRemainingDimensionsInLayout(nextLayout, remaining, indexedCombinations, layoutDimsIds);
314
+ };
315
+
316
+ export { getCombinationLevelCompatibility, getCombinationsNotInLayout, getLayoutCombinations, getLayoutDimsIds, getLayoutLevelRelationship, getLayoutRelationships, getTableLayoutIds, indexCombsRelationships, injectCombination, injectCombinationsInLayout, injectRemainingDimensionsInLayout };
317
+ //# sourceMappingURL=getTableLayoutIds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTableLayoutIds.js","sources":["../../../../src/rules2/src/table/getTableLayoutIds.js"],"sourcesContent":["import * as R from 'ramda';\nimport { isTimePeriodDimension, isRefAreaDimension } from '@sis-cc/dotstatsuite-sdmxjs';\n\nexport const getCombinationsNotInLayout = (combinations, layoutIds) => {\n const { header=[], sections=[], rows=[] } = layoutIds;\n const idsInLayout = new Set([...header, ...sections, ...rows]);\n return R.reject(comb => idsInLayout.has(comb.id), combinations);\n};\n\nexport const indexCombsRelationships = (combinations) => R.reduce((acc, comb) => {\n const { id, relationship=[] } = comb;\n return R.assoc(id, relationship, acc);\n}, {}, combinations);\n\nexport const getLayoutLevelRelationship = indexedRelationships => ids => R.reduce((acc, id) => {\n if (R.has(id, indexedRelationships)) {\n return R.concat(acc, R.prop(id, indexedRelationships));\n }\n return R.append(id, acc);\n}, [], ids);\n\nexport const getLayoutRelationships = (indexedRelationships, layoutIds) => R.map(\n getLayoutLevelRelationship(indexedRelationships),\n layoutIds\n);\n\nexport const injectCombination = combination => ids => {\n const { id, concepts=[] } = combination;\n const conceptsSet = new Set(concepts);\n let inject = true;\n const refined = R.reduce((acc, i) => {\n if (!conceptsSet.has(i)) {\n return R.append(i, acc);\n }\n if (inject) {\n inject = false;\n return R.append(id, acc);\n }\n return acc;\n }, [], ids);\n return inject ? R.append(id, refined) : refined;\n};\n\nexport const getCombinationLevelCompatibility = (layoutRelationships, combination) => {\n const { relationship=[] } = combination;\n const idsInHeaderSet = new Set(layoutRelationships.header);\n const idsInSectionsSet = new Set(layoutRelationships.sections);\n const idsInRowsSet = new Set(layoutRelationships.rows);\n const [idsInHeader, rest] = R.partition(\n i => idsInHeaderSet.has(i),\n relationship\n );\n const [idsInSections, idsInRows] = R.reduce((_acc, id) => {\n if (idsInSectionsSet.has(id))\n return R.over(R.lensIndex(0), R.append(id), _acc);\n if (idsInRowsSet.has(id))\n return R.over(R.lensIndex(1), R.append(id), _acc);\n return R.over(R.lensIndex(2), R.append(id), _acc);\n }, [[], [], []], rest);\n if (!R.isEmpty(idsInHeader) && R.isEmpty(idsInSections) && R.isEmpty(idsInRows)) {\n return 'header';\n }\n if (!R.isEmpty(idsInHeader)) {\n return null;\n }\n if (!R.isEmpty(idsInSections) && R.isEmpty(idsInRows)) {\n return 'sections';\n }\n if (!R.isEmpty(idsInRows)) {\n return 'rows';\n }\n return 'blank';\n}\n\nconst filterLayoutIds = (indexedCombinations, layoutDimsIds, obsAttributes) => (layoutIds) => {\n const layoutConcepts = R.map(\n R.reduce((acc, id) => {\n if (R.has(id, indexedCombinations)) {\n return R.concat(acc, R.path([id, 'concepts'], indexedCombinations));\n }\n return R.append(id, acc);\n }, []),\n layoutIds\n );\n\n return R.mapObjIndexed(\n (ids, level) => R.filter(id => {\n if (id === 'OBS_ATTRIBUTES') {\n return !R.isEmpty(obsAttributes);\n }\n if (R.has(id, indexedCombinations)) {\n const comb = R.prop(id, indexedCombinations);\n const dims = R.filter(i => layoutDimsIds.has(i), comb.concepts);\n if (!R.isEmpty(dims)) {\n return true;\n }\n const oppositeIds = level === 'header'\n ? R.concat(R.prop('sections', layoutConcepts), R.prop('rows', layoutConcepts))\n : R.prop('header', layoutConcepts);\n return R.isEmpty(R.intersection(comb.relationship, oppositeIds));\n }\n return layoutDimsIds.has(id);\n }, ids),\n layoutIds\n );\n};\n\nexport const injectCombinationsInLayout = (combinations, layoutIds, defaultLayoutIds = {}) => {\n const notInLayoutCombs = getCombinationsNotInLayout(combinations, layoutIds);\n if (R.isEmpty(notInLayoutCombs)) {\n return layoutIds;\n }\n const indexedCombsRelationships = indexCombsRelationships(combinations);\n let layoutRelationships = getLayoutRelationships(indexedCombsRelationships, layoutIds);\n const defaultLayoutRelationships = getLayoutRelationships(indexedCombsRelationships, defaultLayoutIds);\n return R.reduce((acc, comb) => {\n let levelCompatibility = getCombinationLevelCompatibility(layoutRelationships, comb);\n if (R.isNil(levelCompatibility)) {\n return acc;\n }\n if (R.equals('blank', levelCompatibility)) {\n levelCompatibility = getCombinationLevelCompatibility(defaultLayoutRelationships, comb);\n if (R.isNil(levelCompatibility)) {\n return acc;\n }\n levelCompatibility = R.equals('blank', levelCompatibility) ? 'rows' : levelCompatibility;\n }\n\n layoutRelationships[levelCompatibility] = R.concat(layoutRelationships[levelCompatibility], comb.relationship);\n const ids = injectCombination(comb)(acc[levelCompatibility]);\n return R.assoc(levelCompatibility, ids)(acc);\n }, layoutIds, notInLayoutCombs);\n};\n\nexport const getLayoutDimsIds = dimensions => R.reduce(\n (acc, d) => (d.header ? acc : acc.add(d.id)),\n new Set([]),\n dimensions,\n);\n\nexport const getLayoutCombinations = (combinations, layoutDimsIds, attributes) => {\n const indexedAttributes = R.indexBy(R.prop('id'), attributes);\n return R.reduce(\n (acc, comb) => {\n const { layoutConcepts, relationship } = R.reduce(\n (_acc, concept) => {\n if (layoutDimsIds.has(concept)) {\n return R.map(R.append(concept), _acc);\n }\n if (R.has(concept, indexedAttributes)) {\n const attr = R.prop(concept, indexedAttributes);\n return attr.series\n ? {\n ..._acc,\n relationship: R.concat(_acc.relationship, attr.relationship),\n }\n : _acc;\n }\n return _acc;\n },\n { layoutConcepts: [], relationship: [] },\n comb.concepts || [],\n );\n if (R.isEmpty(relationship)) {\n return acc;\n }\n return R.append({ ...comb, relationship, concepts: layoutConcepts }, acc);\n },\n [],\n combinations,\n );\n};\n\nconst extractConcepts = (ids, indexedCombinations, layoutDimsIds) => {\n const entry = R.find(id => {\n if (R.has(id, indexedCombinations)) {\n const dimId = R.find(i => layoutDimsIds.has(i), R.pathOr([], [id, 'concepts'], indexedCombinations));\n return !R.isNil(dimId);\n }\n return true;\n }, ids);\n\n const getRelationship = id => {\n if (R.has(id, indexedCombinations)) {\n return R.append(id, R.path([id, 'relationship'], indexedCombinations));\n }\n return [id];\n };\n let indexedRels = R.reduce((acc, id) =>\n R.assoc(id, getRelationship(id), acc)\n , {}, ids);\n \n let relationship = [entry];\n while (!R.isEmpty(indexedRels)) {\n const related = R.pickBy(rels => !R.isEmpty(R.intersection(relationship, rels)), indexedRels);\n if (R.isEmpty(related)) {\n break;\n }\n indexedRels = R.omit(R.keys(related), indexedRels);\n relationship = R.concat(relationship, R.unnest(R.values(related)));\n }\n const set = new Set(relationship);\n return R.partition(id => set.has(id), ids);\n}\n\nexport const injectRemainingDimensionsInLayout = (layoutIds, remainingDims, indexedCombinations, layoutDimsIds) => {\n let _layout = layoutIds;\n let _remaining = remainingDims;\n\n const dimInRows = R.find(id => {\n if (layoutDimsIds.has(id)) {\n return true;\n }\n const dimId = R.find(i => layoutDimsIds.has(i), R.pathOr([], [id, 'concepts'], indexedCombinations));\n return !R.isNil(dimId);\n }, _layout.rows);\n\n if (R.isNil(dimInRows)) {\n if (R.isEmpty(_remaining)) {\n const toTakeIn = R.isEmpty(_layout.sections) ? 'header' : 'sections';\n const [extracted, remains] = extractConcepts(R.prop(toTakeIn, _layout), indexedCombinations, layoutDimsIds);\n _layout = ({ ..._layout, rows: R.concat(_layout.rows, extracted), [toTakeIn]: remains });\n }\n else {\n _layout = R.over(R.lensProp('rows'), R.append(R.head(_remaining)))(_layout);\n _remaining = R.tail(_remaining)\n }\n }\n if (!R.isEmpty(_remaining)) {\n const hasNoHeader = R.isEmpty(_layout.header);\n const firstRemaining = R.head(_remaining);\n _remaining = hasNoHeader ? R.tail(_remaining) : _remaining;\n _layout = {\n ..._layout,\n sections: R.concat(_layout.sections, _remaining),\n header: hasNoHeader ? [firstRemaining] : _layout.header,\n };\n }\n return _layout;\n};\n\nexport const getTableLayoutIds = (\n defaultLayoutIds,\n currentLayoutIds,\n dimensions,\n attributes,\n combinations\n) => {\n const layoutDimsIds = getLayoutDimsIds(dimensions);\n const layoutCombinations = getLayoutCombinations(\n combinations,\n layoutDimsIds,\n attributes,\n );\n const isBlank = R.pipe(R.values, R.all(R.isEmpty))(currentLayoutIds);\n\n const combinationsConcepts = R.pipe(R.pluck('_concepts'), R.unnest, ids => new Set(ids))(combinations);\n const obsAttributes = R.filter(a => \n a.series && R.isEmpty(a.relationship || []) && a.display && !combinationsConcepts.has(a)\n , attributes);\n const indexedCombinations = R.indexBy(R.prop('id'), layoutCombinations);\n const filteredLayoutIds = filterLayoutIds(indexedCombinations, layoutDimsIds, obsAttributes)\n (isBlank ? defaultLayoutIds : currentLayoutIds);\n\n const layoutWithCombs = injectCombinationsInLayout(layoutCombinations, filteredLayoutIds, defaultLayoutIds);\n const layoutRelationshipsSets = R.map(R.pipe(\n ids => R.pick(ids, indexedCombinations),\n R.values,\n R.pluck('relationship'),\n R.unnest,\n i => new Set(i)\n ), layoutWithCombs);\n const layoutConceptsSets = R.pipe(\n R.map(\n R.reduce((acc, id) => {\n if (R.has(id, indexedCombinations)) {\n return R.concat(acc, R.path([id, 'concepts'], indexedCombinations));\n }\n return R.append(id, acc);\n }, []),\n ),\n R.values,\n R.unnest,\n ids => new Set(ids)\n )(layoutWithCombs);\n const defaultLayoutConceptsSets = R.map(\n ids => new Set(ids),\n defaultLayoutIds\n );\n\n const { nextLayout, remaining } = R.reduce((acc, dim) => {\n if (layoutConceptsSets.has(dim.id) || dim.header) {\n return acc;\n }\n if (layoutRelationshipsSets.header.has(dim.id) || defaultLayoutConceptsSets.header.has(dim.id)) {\n return R.over(R.lensPath(['nextLayout', 'header']), R.append(dim.id))(acc);\n }\n if (layoutRelationshipsSets.sections.has(dim.id) || defaultLayoutConceptsSets.sections.has(dim.id)) {\n return R.over(R.lensPath(['nextLayout', 'sections']), R.append(dim.id))(acc);\n }\n if (layoutRelationshipsSets.rows.has(dim.id) || defaultLayoutConceptsSets.rows.has(dim.id)) {\n return R.over(R.lensPath(['nextLayout','rows']), R.append(dim.id))(acc);\n }\n if (isTimePeriodDimension(dim)) {\n return R.over(R.lensPath(['nextLayout','header']), R.append(dim.id))(acc);\n }\n if (isRefAreaDimension(dim)) {\n return R.over(R.lensPath(['nextLayout','rows']), R.append(dim.id))(acc);\n }\n return R.over(R.lensProp('remaining'), R.append(dim.id))(acc);\n }, { nextLayout: layoutWithCombs, remaining: [] }, dimensions);\n\n return injectRemainingDimensionsInLayout(nextLayout, remaining, indexedCombinations, layoutDimsIds);\n};\n"],"names":[],"mappings":";;;AAGY,MAAC,0BAA0B,GAAG,CAAC,YAAY,EAAE,SAAS,KAAK;AACvE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,QAAQ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AAY,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AAC/E,IAAI;AACJ,IAAI,IAAI,kBAAkB,CAAC,GAAG,CAAC,EAAE;AACjC,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AAC7E,IAAI;AACJ,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AACjE,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,UAAU,CAAC;;AAEhE,EAAE,OAAO,iCAAiC,CAAC,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,aAAa,CAAC;AACrG;;;;"}
@@ -0,0 +1,85 @@
1
+ import * as R from 'ramda';
2
+ import { declineObservationsOverAttributes } from './declineObservationsOverAttributes.js';
3
+ import { getLayout } from './getLayout.js';
4
+ import { getSortedLayoutIndexes } from './getSortedLayoutIndexes.js';
5
+ import { parseLayoutIndexesHierarchies } from './parseSeriesIndexesHierarchies.js';
6
+ import { refineLayoutSize } from './refineLayoutSize2.js';
7
+ import { getLayoutData } from './getLayoutData2.js';
8
+ import { getCellsAttributesIds } from './getCellsAttributesIds.js';
9
+ import { getIndexedCombinationsByDisplay } from './getIndexedCombinationsByDisplay.js';
10
+ import { getCells } from './getCells.js';
11
+ import { getCuratedCells } from './getCuratedCells.js';
12
+ import { getSeriesCombinations } from '../getSeriesCombinations.js';
13
+ import { getCellsMetadataCoordinates } from './getCellsMetadataCoordinates.js';
14
+
15
+ const getTableProps = ({ data, layoutIds, customAttributes, limit, isTimeInverted }) => {
16
+ const {
17
+ observations,
18
+ dimensions,
19
+ combinations,
20
+ oneValueDimensions,
21
+ attributesSeries,
22
+ metadataCoordinates,
23
+ attributes,
24
+ header,
25
+ rejectedDimensions=[]
26
+ } = data;
27
+
28
+ const obsAttributes = R.filter(
29
+ a => a.series && R.isEmpty(a.relationship) && a.display && !a.combined,
30
+ attributes
31
+ );
32
+ let dupObs = observations;
33
+ const hasDuplicatedCells = R.pipe(
34
+ R.values,
35
+ R.unnest,
36
+ R.find(R.equals('OBS_ATTRIBUTES')),
37
+ )(layoutIds);
38
+ if (hasDuplicatedCells) {
39
+ const attrsIds = R.pluck('id', obsAttributes);
40
+ dupObs = declineObservationsOverAttributes(attrsIds, observations);
41
+ }
42
+ const seriesCombinations = getSeriesCombinations(combinations, oneValueDimensions);
43
+ const _dims = R.append(
44
+ {
45
+ id: 'OBS_ATTRIBUTES',
46
+ values: R.prepend({ id: 'OBS_VALUE' }, obsAttributes),
47
+ },
48
+ dimensions,
49
+ );
50
+ const layout = getLayout(layoutIds, _dims, seriesCombinations, isTimeInverted);
51
+ const layoutDimsIds = R.map(R.reduce((acc, entry) => {
52
+ if (R.has('dimensions', entry)) {
53
+ return R.concat(acc, R.pluck('id', entry.dimensions));
54
+ }
55
+ return R.append(entry.id, acc);
56
+ }, []), layout);
57
+ const layoutIndexes = getSortedLayoutIndexes(layout, dupObs, rejectedDimensions);
58
+ const enhancedLayoutIndexes = parseLayoutIndexesHierarchies(
59
+ layoutIndexes,
60
+ layout,
61
+ );
62
+ const refinedLayoutIndexes = refineLayoutSize({ layout, observations: dupObs, limit })(enhancedLayoutIndexes);
63
+ const layoutData = getLayoutData(refinedLayoutIndexes, layout, {
64
+ metadataCoordinates,
65
+ attributesSeries,
66
+ customAttributes,
67
+ topCoordinates: header.coordinates,
68
+ rejectedDimensions
69
+ });
70
+
71
+ const cellsAttributesIds = getCellsAttributesIds(layoutDimsIds, attributes);
72
+ const indexedCombinations = getIndexedCombinationsByDisplay(layout, seriesCombinations);
73
+ const cellsMetadataCoordinates = getCellsMetadataCoordinates(metadataCoordinates, oneValueDimensions, layoutDimsIds);
74
+ const cells = getCells(customAttributes, cellsAttributesIds, indexedCombinations, attributesSeries, cellsMetadataCoordinates)(dupObs);
75
+
76
+ return ({
77
+ ...layoutData,
78
+ cells: getCuratedCells(cells, layout),
79
+ layout,
80
+ combinations: seriesCombinations
81
+ });
82
+ };
83
+
84
+ export { getTableProps };
85
+ //# sourceMappingURL=getTableProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTableProps.js","sources":["../../../../src/rules2/src/table/getTableProps.js"],"sourcesContent":["import * as R from 'ramda';\nimport { declineObservationsOverAttributes } from './declineObservationsOverAttributes';\nimport { getLayout } from './getLayout';\nimport { getSortedLayoutIndexes } from './getSortedLayoutIndexes';\nimport { parseLayoutIndexesHierarchies } from './parseSeriesIndexesHierarchies';\nimport { refineLayoutSize } from './refineLayoutSize2';\nimport { getLayoutData } from './getLayoutData2';\nimport { getCellsAttributesIds } from './getCellsAttributesIds';\nimport { getIndexedCombinationsByDisplay } from './getIndexedCombinationsByDisplay';\nimport { getCells } from './getCells';\nimport { getCuratedCells } from './getCuratedCells';\nimport { getSeriesCombinations } from '../getSeriesCombinations';\nimport { getCellsMetadataCoordinates } from './getCellsMetadataCoordinates';\n\nexport const getTableProps = ({ data, layoutIds, customAttributes, limit, isTimeInverted }) => {\n const {\n observations,\n dimensions,\n combinations,\n oneValueDimensions,\n attributesSeries,\n metadataCoordinates,\n attributes,\n header,\n rejectedDimensions=[]\n } = data;\n\n const obsAttributes = R.filter(\n a => a.series && R.isEmpty(a.relationship) && a.display && !a.combined,\n attributes\n );\n let dupObs = observations;\n const hasDuplicatedCells = R.pipe(\n R.values,\n R.unnest,\n R.find(R.equals('OBS_ATTRIBUTES')),\n )(layoutIds);\n if (hasDuplicatedCells) {\n const attrsIds = R.pluck('id', obsAttributes);\n dupObs = declineObservationsOverAttributes(attrsIds, observations);\n }\n const seriesCombinations = getSeriesCombinations(combinations, oneValueDimensions);\n const _dims = R.append(\n {\n id: 'OBS_ATTRIBUTES',\n values: R.prepend({ id: 'OBS_VALUE' }, obsAttributes),\n },\n dimensions,\n );\n const layout = getLayout(layoutIds, _dims, seriesCombinations, isTimeInverted);\n const layoutDimsIds = R.map(R.reduce((acc, entry) => {\n if (R.has('dimensions', entry)) {\n return R.concat(acc, R.pluck('id', entry.dimensions));\n }\n return R.append(entry.id, acc);\n }, []), layout);\n const layoutIndexes = getSortedLayoutIndexes(layout, dupObs, rejectedDimensions);\n const enhancedLayoutIndexes = parseLayoutIndexesHierarchies(\n layoutIndexes,\n layout,\n );\n const refinedLayoutIndexes = refineLayoutSize({ layout, observations: dupObs, limit })(enhancedLayoutIndexes);\n const layoutData = getLayoutData(refinedLayoutIndexes, layout, {\n metadataCoordinates,\n attributesSeries,\n customAttributes,\n topCoordinates: header.coordinates,\n rejectedDimensions\n });\n\n const cellsAttributesIds = getCellsAttributesIds(layoutDimsIds, attributes);\n const indexedCombinations = getIndexedCombinationsByDisplay(layout, seriesCombinations);\n const cellsMetadataCoordinates = getCellsMetadataCoordinates(metadataCoordinates, oneValueDimensions, layoutDimsIds);\n const cells = getCells(customAttributes, cellsAttributesIds, indexedCombinations, attributesSeries, cellsMetadataCoordinates)(dupObs);\n\n return ({\n ...layoutData,\n cells: getCuratedCells(cells, layout),\n layout,\n combinations: seriesCombinations\n });\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAcY,MAAC,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK;AAC/F,EAAE,MAAM;AACR,IAAI,YAAY;AAChB,IAAI,UAAU;AACd,IAAI,YAAY;AAChB,IAAI,kBAAkB;AACtB,IAAI,gBAAgB;AACpB,IAAI,mBAAmB;AACvB,IAAI,UAAU;AACd,IAAI,MAAM;AACV,IAAI,k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;AACjB,IAAI,KAAK,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC;AACzC,IAAI,MAAM;AACV,IAAI,YAAY,EAAE;AAClB,GAAG;AACH;;;;"}
@@ -0,0 +1,82 @@
1
+ import * as R from 'ramda';
2
+
3
+ const registerParsedIndexes = ({ isSameSerie, ...parsed }, register) => {
4
+ const merged = R.mergeWith((a, b) => R.append(a || [], b), parsed, register);
5
+ return ({ ...merged, isSameSerie });
6
+ };
7
+
8
+ const parseParentsIndexesWithPrevious = (parentsIndexes, previousParentsIndexes) => {
9
+ const previousParentsSet = new Set(previousParentsIndexes);
10
+ const lastParentIndexInPrevious = R.findLastIndex(i => previousParentsSet.has(i), parentsIndexes);
11
+ const [rawPresentParentsIndexes, missingParentsIndexes] = lastParentIndexInPrevious !== -1
12
+ ? R.splitAt(lastParentIndexInPrevious + 1, parentsIndexes)
13
+ : [[], parentsIndexes];
14
+ const presentParentsIndexes = R.filter(i => previousParentsSet.has(i), rawPresentParentsIndexes);
15
+ return ({ presentParentsIndexes, missingParentsIndexes });
16
+ };
17
+
18
+ const parseSerieIndexesHierarchies = (serieIndexes, previousSerie, dimensions, isSameSerie, replicate) => {
19
+ return R.addIndex(R.reduce)((acc, _valueIndex, dimensionIndex) => {
20
+ if (R.is(Array, _valueIndex)) {
21
+ const previous = R.isEmpty(previousSerie) ? {} : R.map(R.nth(dimensionIndex), previousSerie);
22
+ const parsed = parseSerieIndexesHierarchies(
23
+ _valueIndex,
24
+ previous,
25
+ R.pathOr([], [dimensionIndex, 'dimensions'], dimensions),
26
+ acc.isSameSerie,
27
+ replicate
28
+ );
29
+ return registerParsedIndexes(parsed, acc);
30
+ }
31
+ const valueIndex = Math.abs(_valueIndex);
32
+ const parents = R.pathOr([], [dimensionIndex, 'values', valueIndex, 'parents'], dimensions);
33
+ const previousIndex = R.pipe(R.path(['indexes', dimensionIndex]), i => R.isNil(i) ? -1 : Math.abs(i))(previousSerie);
34
+ const previousParentsIndexes = acc.isSameSerie
35
+ ? R.pipe(R.pathOr([], ['parentsIndexes', dimensionIndex]), R.append(previousIndex))(previousSerie) : [];
36
+ const previousMissingIndexes = acc.isSameSerie
37
+ ? R.pathOr([], ['missingIndexes', dimensionIndex], previousSerie) : [];
38
+ /*
39
+ if replicate = true (sections), missing parents insdexes are replicated on each brother nodes not just the first (as empty lines)
40
+ thats why passing previous missing as previous parents in case replicate = false
41
+ */
42
+ const { presentParentsIndexes, missingParentsIndexes } = parseParentsIndexesWithPrevious(
43
+ parents,
44
+ replicate ? previousParentsIndexes : R.concat(previousParentsIndexes, previousMissingIndexes),
45
+ );
46
+ return registerParsedIndexes({
47
+ parentsIndexes: presentParentsIndexes,
48
+ missingIndexes: missingParentsIndexes,
49
+ isSameSerie: acc.isSameSerie && valueIndex === previousIndex
50
+ }, acc);
51
+ }, { parentsIndexes: [], missingIndexes: [], isSameSerie }, serieIndexes);
52
+ };
53
+
54
+ const parseSeriesIndexesHierarchies = (seriesIndexes, dimensions, replicateMissing = false) => {
55
+ return R.reduce((acc, { indexes, ...rest }) => {
56
+ const previousSerie = R.last(acc) || {};
57
+ const { isSameSerie, ...parsed } = parseSerieIndexesHierarchies(indexes, previousSerie, dimensions, true, replicateMissing);
58
+ return R.append({ indexes, ...parsed, ...rest }, acc);
59
+ }, [], seriesIndexes);
60
+ };
61
+
62
+ const parseLayoutIndexesHierarchies = (layoutIndexes, layout) => {
63
+ const header = parseSeriesIndexesHierarchies(layoutIndexes.header, layout.header);
64
+ const sections = R.pipe(
65
+ R.transpose,
66
+ ([_sections, _sectionsRows]) => {
67
+ if (R.isNil(_sections)) {
68
+ return [];
69
+ }
70
+ // replicate = true on sections
71
+ const sections = parseSeriesIndexesHierarchies(_sections, layout.sections, true);
72
+ const sectionsRows = R.map(rows => parseSeriesIndexesHierarchies(rows, layout.rows), _sectionsRows);
73
+ return R.transpose([sections, sectionsRows]);
74
+ }
75
+ )(layoutIndexes.sections);
76
+
77
+
78
+ return ({ header, sections });
79
+ };
80
+
81
+ export { parseLayoutIndexesHierarchies, parseSeriesIndexesHierarchies };
82
+ //# sourceMappingURL=parseSeriesIndexesHierarchies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseSeriesIndexesHierarchies.js","sources":["../../../../src/rules2/src/table/parseSeriesIndexesHierarchies.js"],"sourcesContent":["import * as R from 'ramda';\n\nconst registerParsedIndexes = ({ isSameSerie, ...parsed }, register) => {\n const merged = R.mergeWith((a, b) => R.append(a || [], b), parsed, register);\n return ({ ...merged, isSameSerie });\n};\n\nconst parseParentsIndexesWithPrevious = (parentsIndexes, previousParentsIndexes) => {\n const previousParentsSet = new Set(previousParentsIndexes);\n const lastParentIndexInPrevious = R.findLastIndex(i => previousParentsSet.has(i), parentsIndexes);\n const [rawPresentParentsIndexes, missingParentsIndexes] = lastParentIndexInPrevious !== -1\n ? R.splitAt(lastParentIndexInPrevious + 1, parentsIndexes)\n : [[], parentsIndexes];\n const presentParentsIndexes = R.filter(i => previousParentsSet.has(i), rawPresentParentsIndexes);\n return ({ presentParentsIndexes, missingParentsIndexes });\n};\n\nconst parseSerieIndexesHierarchies = (serieIndexes, previousSerie, dimensions, isSameSerie, replicate) => {\n\treturn R.addIndex(R.reduce)((acc, _valueIndex, dimensionIndex) => {\n\t\tif (R.is(Array, _valueIndex)) {\n const previous = R.isEmpty(previousSerie) ? {} : R.map(R.nth(dimensionIndex), previousSerie);\n\t\t\tconst parsed = parseSerieIndexesHierarchies(\n _valueIndex,\n previous,\n R.pathOr([], [dimensionIndex, 'dimensions'], dimensions),\n acc.isSameSerie,\n replicate\n );\n return registerParsedIndexes(parsed, acc);\n\t\t}\n const valueIndex = Math.abs(_valueIndex);\n const parents = R.pathOr([], [dimensionIndex, 'values', valueIndex, 'parents'], dimensions);\n const previousIndex = R.pipe(R.path(['indexes', dimensionIndex]), i => R.isNil(i) ? -1 : Math.abs(i))(previousSerie)\n const previousParentsIndexes = acc.isSameSerie\n ? R.pipe(R.pathOr([], ['parentsIndexes', dimensionIndex]), R.append(previousIndex))(previousSerie) : [];\n const previousMissingIndexes = acc.isSameSerie\n ? R.pathOr([], ['missingIndexes', dimensionIndex], previousSerie) : [];\n /*\n if replicate = true (sections), missing parents insdexes are replicated on each brother nodes not just the first (as empty lines)\n thats why passing previous missing as previous parents in case replicate = false\n */\n const { presentParentsIndexes, missingParentsIndexes } = parseParentsIndexesWithPrevious(\n parents,\n replicate ? previousParentsIndexes : R.concat(previousParentsIndexes, previousMissingIndexes),\n );\n return registerParsedIndexes({\n parentsIndexes: presentParentsIndexes,\n missingIndexes: missingParentsIndexes,\n isSameSerie: acc.isSameSerie && valueIndex === previousIndex\n }, acc);\n }, { parentsIndexes: [], missingIndexes: [], isSameSerie }, serieIndexes);\n};\n\nexport const parseSeriesIndexesHierarchies = (seriesIndexes, dimensions, replicateMissing = false) => {\n return R.reduce((acc, { indexes, ...rest }) => {\n const previousSerie = R.last(acc) || {};\n const { isSameSerie, ...parsed } = parseSerieIndexesHierarchies(indexes, previousSerie, dimensions, true, replicateMissing);\n return R.append({ indexes, ...parsed, ...rest }, acc);\n }, [], seriesIndexes);\n};\n\nexport const parseLayoutIndexesHierarchies = (layoutIndexes, layout) => {\n const header = parseSeriesIndexesHierarchies(layoutIndexes.header, layout.header);\n const sections = R.pipe(\n R.transpose,\n ([_sections, _sectionsRows]) => {\n if (R.isNil(_sections)) {\n return [];\n }\n // replicate = true on sections\n const sections = parseSeriesIndexesHierarchies(_sections, layout.sections, true);\n const sectionsRows = R.map(rows => parseSeriesIndexesHierarchies(rows, layout.rows), _sectionsRows);\n return R.transpose([sections, sectionsRows]);\n }\n )(layoutIndexes.sections);\n\n\n return ({ header, sections });\n};\n"],"names":[],"mappings":";;AAEA,MAAM,qBAAqB,GAAG,CAAC,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,EAAE,QAAQ,KAAK;AACxE,EAAE,MAAM,MAAM,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CA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IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,CAAC,KAAK;AACpC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;AAC9B,QAAQ,OAAO,EAAE;AACjB,MAAM;AACN;AACA,MAAM,MAAM,QAAQ,GAAG,6BAA6B,CAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC;AACtF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,6BAA6B,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC;AACzG,MAAM,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AAClD,IAAI;AACJ,GAAG,CAAC,aAAa,CAAC,QAAQ,CAAC;;;AAG3B,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE;AAC9B;;;;"}
@@ -0,0 +1,29 @@
1
+ import * as R from 'ramda';
2
+
3
+ const parseValueHierarchy = (value, previousValue, indexedValues) => {
4
+ const parentsIds = R.propOr([], 'parents', value);
5
+ if (R.isEmpty(parentsIds)) {
6
+ return value;
7
+ }
8
+ const _previousParentsIds = R.propOr([], 'parentsIds', previousValue);
9
+ const previousParentsIds = R.isNil(previousValue) ? [] : R.append(R.prop('id', previousValue), _previousParentsIds);
10
+ const [presentIds, _missingIds] = R.addIndex(R.splitWhen)((val, ind) => R.nth(ind, previousParentsIds) !== val, parentsIds);
11
+ const __previousParentsIds = R.pipe(R.propOr([], 'parents'), R.pluck('id'))(previousValue);
12
+ const missingIds = R.pipe(
13
+ R.takeLastWhile(id => !R.includes(id, __previousParentsIds) && id !== R.prop('id', previousValue)),
14
+ ids => R.concat(ids, _missingIds)
15
+ )(presentIds);
16
+ const _previousParents = R.propOr([], 'parents', previousValue);
17
+ const previousParents = R.isNil(previousValue) ? [] : R.append(R.pick(['id', 'name'], previousValue), _previousParents);
18
+ const parents = R.takeWhile(p => R.includes(p.id, presentIds), previousParents);
19
+ const missingParents = R.props(missingIds, indexedValues);
20
+ return ({
21
+ ...value,
22
+ parents,
23
+ parentsIds,
24
+ missingParents
25
+ });
26
+ };
27
+
28
+ export { parseValueHierarchy };
29
+ //# sourceMappingURL=parseValueHierarchy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseValueHierarchy.js","sources":["../../../../src/rules2/src/table/parseValueHierarchy.js"],"sourcesContent":["import * as R from 'ramda';\r\n\r\nexport const isSameValueAsPrevious = (value, previousValue) => {\r\n const valueHierarchicalPath = R.append(value.id, R.propOr([], 'parents', value));\r\n const previousValueHierarchicalPath = R.append(previousValue.id, R.propOr([], 'parents', previousValue));\r\n\r\n return R.equals(valueHierarchicalPath, previousValueHierarchicalPath);\r\n}\r\n\r\nexport const parseValueHierarchy = (value, previousValue, indexedValues) => {\r\n const parentsIds = R.propOr([], 'parents', value);\r\n if (R.isEmpty(parentsIds)) {\r\n return value;\r\n }\r\n const _previousParentsIds = R.propOr([], 'parentsIds', previousValue);\r\n const previousParentsIds = R.isNil(previousValue) ? [] : R.append(R.prop('id', previousValue), _previousParentsIds);\r\n const [presentIds, _missingIds] = R.addIndex(R.splitWhen)((val, ind) => R.nth(ind, previousParentsIds) !== val, parentsIds);\r\n const __previousParentsIds = R.pipe(R.propOr([], 'parents'), R.pluck('id'))(previousValue);\r\n const missingIds = R.pipe(\r\n R.takeLastWhile(id => !R.includes(id, __previousParentsIds) && id !== R.prop('id', previousValue)),\r\n ids => R.concat(ids, _missingIds)\r\n )(presentIds);\r\n const _previousParents = R.propOr([], 'parents', previousValue);\r\n const previousParents = R.isNil(previousValue) ? [] : R.append(R.pick(['id', 'name'], previousValue), _previousParents);\r\n const parents = R.takeWhile(p => R.includes(p.id, presentIds), previousParents);\r\n const missingParents = R.props(missingIds, indexedValues);\r\n return ({\r\n ...value,\r\n parents,\r\n parentsIds,\r\n missingParents\r\n });\r\n};\r\n"],"names":[],"mappings":";;AASY,MAAC,m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