@gooddata/sdk-ui-metric-component 0.0.0-stage → 11.65.0-alpha.4

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 (762) hide show
  1. package/LICENSE +29 -0
  2. package/NOTICE +71721 -0
  3. package/README.md +13 -2
  4. package/esm/MaqlEditor/components/ExpandableTooltip.d.ts +50 -0
  5. package/esm/MaqlEditor/components/ExpandableTooltip.d.ts.map +1 -0
  6. package/esm/MaqlEditor/components/ExpandableTooltip.js +150 -0
  7. package/esm/MaqlEditor/components/ExpandableTooltipContext.d.ts +10 -0
  8. package/esm/MaqlEditor/components/ExpandableTooltipContext.d.ts.map +1 -0
  9. package/esm/MaqlEditor/components/ExpandableTooltipContext.js +17 -0
  10. package/esm/MaqlEditor/components/hooks/useExpandableTooltip.d.ts +3 -0
  11. package/esm/MaqlEditor/components/hooks/useExpandableTooltip.d.ts.map +1 -0
  12. package/esm/MaqlEditor/components/hooks/useExpandableTooltip.js +10 -0
  13. package/esm/MaqlEditor/components/hooks/useOutsideEvents.d.ts +10 -0
  14. package/esm/MaqlEditor/components/hooks/useOutsideEvents.d.ts.map +1 -0
  15. package/esm/MaqlEditor/components/hooks/useOutsideEvents.js +43 -0
  16. package/esm/MaqlEditor/components/hooks/useRePosition.d.ts +20 -0
  17. package/esm/MaqlEditor/components/hooks/useRePosition.d.ts.map +1 -0
  18. package/esm/MaqlEditor/components/hooks/useRePosition.js +108 -0
  19. package/esm/MaqlEditor/components/hooks/utils.d.ts +4 -0
  20. package/esm/MaqlEditor/components/hooks/utils.d.ts.map +1 -0
  21. package/esm/MaqlEditor/components/hooks/utils.js +18 -0
  22. package/esm/MaqlEditor/hooks/useAutoformat.d.ts +3 -0
  23. package/esm/MaqlEditor/hooks/useAutoformat.d.ts.map +1 -0
  24. package/esm/MaqlEditor/hooks/useAutoformat.js +15 -0
  25. package/esm/MaqlEditor/hooks/useCleanCallback.d.ts +4 -0
  26. package/esm/MaqlEditor/hooks/useCleanCallback.d.ts.map +1 -0
  27. package/esm/MaqlEditor/hooks/useCleanCallback.js +12 -0
  28. package/esm/MaqlEditor/hooks/useCodeTheme.d.ts +3 -0
  29. package/esm/MaqlEditor/hooks/useCodeTheme.d.ts.map +1 -0
  30. package/esm/MaqlEditor/hooks/useCodeTheme.js +48 -0
  31. package/esm/MaqlEditor/hooks/useCopyToClipboard.d.ts +3 -0
  32. package/esm/MaqlEditor/hooks/useCopyToClipboard.d.ts.map +1 -0
  33. package/esm/MaqlEditor/hooks/useCopyToClipboard.js +16 -0
  34. package/esm/MaqlEditor/hooks/useMountCallback.d.ts +13 -0
  35. package/esm/MaqlEditor/hooks/useMountCallback.d.ts.map +1 -0
  36. package/esm/MaqlEditor/hooks/useMountCallback.js +26 -0
  37. package/esm/MaqlEditor/hooks/useUpdateCallback.d.ts +19 -0
  38. package/esm/MaqlEditor/hooks/useUpdateCallback.d.ts.map +1 -0
  39. package/esm/MaqlEditor/hooks/useUpdateCallback.js +63 -0
  40. package/esm/MaqlEditor/hooks/useValueCallbacks.d.ts +6 -0
  41. package/esm/MaqlEditor/hooks/useValueCallbacks.d.ts.map +1 -0
  42. package/esm/MaqlEditor/hooks/useValueCallbacks.js +14 -0
  43. package/esm/MaqlEditor/languageService/LanguageServiceContext.d.ts +13 -0
  44. package/esm/MaqlEditor/languageService/LanguageServiceContext.d.ts.map +1 -0
  45. package/esm/MaqlEditor/languageService/LanguageServiceContext.js +20 -0
  46. package/esm/MaqlEditor/maql/MaqlEditor.d.ts +30 -0
  47. package/esm/MaqlEditor/maql/MaqlEditor.d.ts.map +1 -0
  48. package/esm/MaqlEditor/maql/MaqlEditor.js +42 -0
  49. package/esm/MaqlEditor/maql/MaqlEditor.styles.d.ts +8 -0
  50. package/esm/MaqlEditor/maql/MaqlEditor.styles.d.ts.map +1 -0
  51. package/esm/MaqlEditor/maql/MaqlEditor.styles.js +154 -0
  52. package/esm/MaqlEditor/maql/MaqlEditor.tooltip.d.ts +36 -0
  53. package/esm/MaqlEditor/maql/MaqlEditor.tooltip.d.ts.map +1 -0
  54. package/esm/MaqlEditor/maql/MaqlEditor.tooltip.js +187 -0
  55. package/esm/MaqlEditor/maql/constants.d.ts +2 -0
  56. package/esm/MaqlEditor/maql/constants.d.ts.map +1 -0
  57. package/esm/MaqlEditor/maql/constants.js +2 -0
  58. package/esm/MaqlEditor/maql/formatter.d.ts +6 -0
  59. package/esm/MaqlEditor/maql/formatter.d.ts.map +1 -0
  60. package/esm/MaqlEditor/maql/formatter.js +14 -0
  61. package/esm/MaqlEditor/maql/hooks/hover/doHover.d.ts +12 -0
  62. package/esm/MaqlEditor/maql/hooks/hover/doHover.d.ts.map +1 -0
  63. package/esm/MaqlEditor/maql/hooks/hover/doHover.js +126 -0
  64. package/esm/MaqlEditor/maql/hooks/hover/useHoverEvent.d.ts +4 -0
  65. package/esm/MaqlEditor/maql/hooks/hover/useHoverEvent.d.ts.map +1 -0
  66. package/esm/MaqlEditor/maql/hooks/hover/useHoverEvent.js +32 -0
  67. package/esm/MaqlEditor/maql/hooks/useAutocomplete.d.ts +4 -0
  68. package/esm/MaqlEditor/maql/hooks/useAutocomplete.d.ts.map +1 -0
  69. package/esm/MaqlEditor/maql/hooks/useAutocomplete.js +60 -0
  70. package/esm/MaqlEditor/maql/hooks/useDecoration.d.ts +4 -0
  71. package/esm/MaqlEditor/maql/hooks/useDecoration.d.ts.map +1 -0
  72. package/esm/MaqlEditor/maql/hooks/useDecoration.js +73 -0
  73. package/esm/MaqlEditor/maql/hooks/useDocumentFormatting.d.ts +3 -0
  74. package/esm/MaqlEditor/maql/hooks/useDocumentFormatting.d.ts.map +1 -0
  75. package/esm/MaqlEditor/maql/hooks/useDocumentFormatting.js +29 -0
  76. package/esm/MaqlEditor/maql/hooks/useHover.d.ts +6 -0
  77. package/esm/MaqlEditor/maql/hooks/useHover.d.ts.map +1 -0
  78. package/esm/MaqlEditor/maql/hooks/useHover.js +77 -0
  79. package/esm/MaqlEditor/maql/hooks/useLanguageConfiguration.d.ts +4 -0
  80. package/esm/MaqlEditor/maql/hooks/useLanguageConfiguration.d.ts.map +1 -0
  81. package/esm/MaqlEditor/maql/hooks/useLanguageConfiguration.js +21 -0
  82. package/esm/MaqlEditor/maql/hooks/useLanguageService.d.ts +3 -0
  83. package/esm/MaqlEditor/maql/hooks/useLanguageService.d.ts.map +1 -0
  84. package/esm/MaqlEditor/maql/hooks/useLanguageService.js +21 -0
  85. package/esm/MaqlEditor/maql/hooks/useLanguageServiceInitializer.d.ts +4 -0
  86. package/esm/MaqlEditor/maql/hooks/useLanguageServiceInitializer.d.ts.map +1 -0
  87. package/esm/MaqlEditor/maql/hooks/useLanguageServiceInitializer.js +11 -0
  88. package/esm/MaqlEditor/maql/hooks/useMonaco.d.ts +21 -0
  89. package/esm/MaqlEditor/maql/hooks/useMonaco.d.ts.map +1 -0
  90. package/esm/MaqlEditor/maql/hooks/useMonaco.js +75 -0
  91. package/esm/MaqlEditor/maql/hooks/useSemanticHighlight.d.ts +4 -0
  92. package/esm/MaqlEditor/maql/hooks/useSemanticHighlight.d.ts.map +1 -0
  93. package/esm/MaqlEditor/maql/hooks/useSemanticHighlight.js +33 -0
  94. package/esm/MaqlEditor/maql/hooks/useSyntaxHighlight.d.ts +2 -0
  95. package/esm/MaqlEditor/maql/hooks/useSyntaxHighlight.d.ts.map +1 -0
  96. package/esm/MaqlEditor/maql/hooks/useSyntaxHighlight.js +28 -0
  97. package/esm/MaqlEditor/maql/hooks/useValidation.d.ts +4 -0
  98. package/esm/MaqlEditor/maql/hooks/useValidation.d.ts.map +1 -0
  99. package/esm/MaqlEditor/maql/hooks/useValidation.js +56 -0
  100. package/esm/MaqlEditor/maql/utils.d.ts +4 -0
  101. package/esm/MaqlEditor/maql/utils.d.ts.map +1 -0
  102. package/esm/MaqlEditor/maql/utils.js +6 -0
  103. package/esm/MaqlEditor/mock/monaco-shim.d.ts +2 -0
  104. package/esm/MaqlEditor/mock/monaco-shim.d.ts.map +1 -0
  105. package/esm/MaqlEditor/mock/monaco-shim.js +36 -0
  106. package/esm/MaqlEditor/monaco/MonacoEditor.d.ts +49 -0
  107. package/esm/MaqlEditor/monaco/MonacoEditor.d.ts.map +1 -0
  108. package/esm/MaqlEditor/monaco/MonacoEditor.js +71 -0
  109. package/esm/MaqlEditor/monaco/MonacoEditor.styles.d.ts +47 -0
  110. package/esm/MaqlEditor/monaco/MonacoEditor.styles.d.ts.map +1 -0
  111. package/esm/MaqlEditor/monaco/MonacoEditor.styles.js +427 -0
  112. package/esm/MaqlEditor/monaco/hooks/useAutofocus.d.ts +3 -0
  113. package/esm/MaqlEditor/monaco/hooks/useAutofocus.d.ts.map +1 -0
  114. package/esm/MaqlEditor/monaco/hooks/useAutofocus.js +33 -0
  115. package/esm/MaqlEditor/monaco/hooks/useDefaultValue.d.ts +3 -0
  116. package/esm/MaqlEditor/monaco/hooks/useDefaultValue.d.ts.map +1 -0
  117. package/esm/MaqlEditor/monaco/hooks/useDefaultValue.js +14 -0
  118. package/esm/MaqlEditor/monaco/hooks/useEditorInit.d.ts +3 -0
  119. package/esm/MaqlEditor/monaco/hooks/useEditorInit.d.ts.map +1 -0
  120. package/esm/MaqlEditor/monaco/hooks/useEditorInit.js +84 -0
  121. package/esm/MaqlEditor/monaco/hooks/useEditorOptions.d.ts +3 -0
  122. package/esm/MaqlEditor/monaco/hooks/useEditorOptions.d.ts.map +1 -0
  123. package/esm/MaqlEditor/monaco/hooks/useEditorOptions.js +51 -0
  124. package/esm/MaqlEditor/monaco/hooks/useMonaco.d.ts +3 -0
  125. package/esm/MaqlEditor/monaco/hooks/useMonaco.d.ts.map +1 -0
  126. package/esm/MaqlEditor/monaco/hooks/useMonaco.js +24 -0
  127. package/esm/MaqlEditor/monaco/monacoContributions.d.ts +74 -0
  128. package/esm/MaqlEditor/monaco/monacoContributions.d.ts.map +1 -0
  129. package/esm/MaqlEditor/monaco/monacoContributions.js +88 -0
  130. package/esm/MaqlEditor/monaco/monacoWorkers.d.ts +12 -0
  131. package/esm/MaqlEditor/monaco/monacoWorkers.d.ts.map +1 -0
  132. package/esm/MaqlEditor/monaco/monacoWorkers.js +63 -0
  133. package/esm/MaqlEditor/sql/SqlEditor.d.ts +21 -0
  134. package/esm/MaqlEditor/sql/SqlEditor.d.ts.map +1 -0
  135. package/esm/MaqlEditor/sql/SqlEditor.js +45 -0
  136. package/esm/MaqlEditor/sql/SqlEditor.styles.d.ts +3 -0
  137. package/esm/MaqlEditor/sql/SqlEditor.styles.d.ts.map +1 -0
  138. package/esm/MaqlEditor/sql/SqlEditor.styles.js +3 -0
  139. package/esm/MaqlEditor/sql/constants.d.ts +2 -0
  140. package/esm/MaqlEditor/sql/constants.d.ts.map +1 -0
  141. package/esm/MaqlEditor/sql/constants.js +2 -0
  142. package/esm/MaqlEditor/sql/formatter.d.ts +6 -0
  143. package/esm/MaqlEditor/sql/formatter.d.ts.map +1 -0
  144. package/esm/MaqlEditor/sql/formatter.js +17 -0
  145. package/esm/MaqlEditor/sql/hooks/useDocumentFormatting.d.ts +2 -0
  146. package/esm/MaqlEditor/sql/hooks/useDocumentFormatting.d.ts.map +1 -0
  147. package/esm/MaqlEditor/sql/hooks/useDocumentFormatting.js +26 -0
  148. package/esm/MaqlEditor/sql/hooks/useLanguageConfiguration.d.ts +4 -0
  149. package/esm/MaqlEditor/sql/hooks/useLanguageConfiguration.d.ts.map +1 -0
  150. package/esm/MaqlEditor/sql/hooks/useLanguageConfiguration.js +29 -0
  151. package/esm/MaqlEditor/sql/hooks/useMonaco.d.ts +14 -0
  152. package/esm/MaqlEditor/sql/hooks/useMonaco.d.ts.map +1 -0
  153. package/esm/MaqlEditor/sql/hooks/useMonaco.js +26 -0
  154. package/esm/MaqlEditor/sql/hooks/useSyntaxHighlight.d.ts +2 -0
  155. package/esm/MaqlEditor/sql/hooks/useSyntaxHighlight.d.ts.map +1 -0
  156. package/esm/MaqlEditor/sql/hooks/useSyntaxHighlight.js +796 -0
  157. package/esm/MaqlEditor/sql/utils.d.ts +4 -0
  158. package/esm/MaqlEditor/sql/utils.d.ts.map +1 -0
  159. package/esm/MaqlEditor/sql/utils.js +6 -0
  160. package/esm/MaqlEditor/statusBar/SuggestionStatusBar.d.ts +9 -0
  161. package/esm/MaqlEditor/statusBar/SuggestionStatusBar.d.ts.map +1 -0
  162. package/esm/MaqlEditor/statusBar/SuggestionStatusBar.js +38 -0
  163. package/esm/MaqlEditor/theme/default.d.ts +204 -0
  164. package/esm/MaqlEditor/theme/default.d.ts.map +1 -0
  165. package/esm/MaqlEditor/theme/default.js +223 -0
  166. package/esm/MaqlEditor/theme/styles.d.ts +411 -0
  167. package/esm/MaqlEditor/theme/styles.d.ts.map +1 -0
  168. package/esm/MaqlEditor/theme/styles.js +5 -0
  169. package/esm/MaqlEditor/theme/theme.d.ts +206 -0
  170. package/esm/MaqlEditor/theme/theme.d.ts.map +1 -0
  171. package/esm/MaqlEditor/theme/theme.js +9 -0
  172. package/esm/MetricComponent/ConflictContext/ConflictContext.d.ts +9 -0
  173. package/esm/MetricComponent/ConflictContext/ConflictContext.d.ts.map +1 -0
  174. package/esm/MetricComponent/ConflictContext/ConflictContext.js +9 -0
  175. package/esm/MetricComponent/ConflictContext/useConflictDetection.d.ts +8 -0
  176. package/esm/MetricComponent/ConflictContext/useConflictDetection.d.ts.map +1 -0
  177. package/esm/MetricComponent/ConflictContext/useConflictDetection.js +48 -0
  178. package/esm/MetricComponent/Content/EditMetricContent.d.ts +3 -0
  179. package/esm/MetricComponent/Content/EditMetricContent.d.ts.map +1 -0
  180. package/esm/MetricComponent/Content/EditMetricContent.data.d.ts +52 -0
  181. package/esm/MetricComponent/Content/EditMetricContent.data.d.ts.map +1 -0
  182. package/esm/MetricComponent/Content/EditMetricContent.data.js +12 -0
  183. package/esm/MetricComponent/Content/EditMetricContent.events.d.ts +9 -0
  184. package/esm/MetricComponent/Content/EditMetricContent.events.d.ts.map +1 -0
  185. package/esm/MetricComponent/Content/EditMetricContent.events.js +21 -0
  186. package/esm/MetricComponent/Content/EditMetricContent.js +27 -0
  187. package/esm/MetricComponent/DeleteMetric.d.ts +12 -0
  188. package/esm/MetricComponent/DeleteMetric.d.ts.map +1 -0
  189. package/esm/MetricComponent/DeleteMetric.events.d.ts +10 -0
  190. package/esm/MetricComponent/DeleteMetric.events.d.ts.map +1 -0
  191. package/esm/MetricComponent/DeleteMetric.events.js +24 -0
  192. package/esm/MetricComponent/DeleteMetric.js +8 -0
  193. package/esm/MetricComponent/DeleteMetricConfirmDialog/DeleteMetricConfirmDialog.d.ts +6 -0
  194. package/esm/MetricComponent/DeleteMetricConfirmDialog/DeleteMetricConfirmDialog.d.ts.map +1 -0
  195. package/esm/MetricComponent/DeleteMetricConfirmDialog/DeleteMetricConfirmDialog.js +19 -0
  196. package/esm/MetricComponent/EditMetric.d.ts +48 -0
  197. package/esm/MetricComponent/EditMetric.d.ts.map +1 -0
  198. package/esm/MetricComponent/EditMetric.events.d.ts +16 -0
  199. package/esm/MetricComponent/EditMetric.events.d.ts.map +1 -0
  200. package/esm/MetricComponent/EditMetric.events.js +55 -0
  201. package/esm/MetricComponent/EditMetric.js +30 -0
  202. package/esm/MetricComponent/FeaturesAndSettings/index.d.ts +18 -0
  203. package/esm/MetricComponent/FeaturesAndSettings/index.d.ts.map +1 -0
  204. package/esm/MetricComponent/FeaturesAndSettings/index.js +25 -0
  205. package/esm/MetricComponent/Form/CloseButton/CloseButton.d.ts +6 -0
  206. package/esm/MetricComponent/Form/CloseButton/CloseButton.d.ts.map +1 -0
  207. package/esm/MetricComponent/Form/CloseButton/CloseButton.js +14 -0
  208. package/esm/MetricComponent/Form/EditMetricCenterForm.d.ts +15 -0
  209. package/esm/MetricComponent/Form/EditMetricCenterForm.d.ts.map +1 -0
  210. package/esm/MetricComponent/Form/EditMetricCenterForm.js +157 -0
  211. package/esm/MetricComponent/Form/EditMetricContentForm.d.ts +45 -0
  212. package/esm/MetricComponent/Form/EditMetricContentForm.d.ts.map +1 -0
  213. package/esm/MetricComponent/Form/EditMetricContentForm.events.d.ts +13 -0
  214. package/esm/MetricComponent/Form/EditMetricContentForm.events.d.ts.map +1 -0
  215. package/esm/MetricComponent/Form/EditMetricContentForm.events.js +32 -0
  216. package/esm/MetricComponent/Form/EditMetricContentForm.js +106 -0
  217. package/esm/MetricComponent/Form/EditableRow/EditableRow.d.ts +16 -0
  218. package/esm/MetricComponent/Form/EditableRow/EditableRow.d.ts.map +1 -0
  219. package/esm/MetricComponent/Form/EditableRow/EditableRow.js +82 -0
  220. package/esm/MetricComponent/Form/EditableRow/EditableRowError.d.ts +13 -0
  221. package/esm/MetricComponent/Form/EditableRow/EditableRowError.d.ts.map +1 -0
  222. package/esm/MetricComponent/Form/EditableRow/EditableRowError.js +5 -0
  223. package/esm/MetricComponent/Form/EditableRow/InlineEditableValue.d.ts +27 -0
  224. package/esm/MetricComponent/Form/EditableRow/InlineEditableValue.d.ts.map +1 -0
  225. package/esm/MetricComponent/Form/EditableRow/InlineEditableValue.js +125 -0
  226. package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.d.ts +9 -0
  227. package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.d.ts.map +1 -0
  228. package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.events.d.ts +7 -0
  229. package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.events.d.ts.map +1 -0
  230. package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.events.js +11 -0
  231. package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.js +63 -0
  232. package/esm/MetricComponent/Form/Footer/EditMetricSaveMessage.d.ts +8 -0
  233. package/esm/MetricComponent/Form/Footer/EditMetricSaveMessage.d.ts.map +1 -0
  234. package/esm/MetricComponent/Form/Footer/EditMetricSaveMessage.js +22 -0
  235. package/esm/MetricComponent/Form/Header/EditMetricContentHeader.d.ts +28 -0
  236. package/esm/MetricComponent/Form/Header/EditMetricContentHeader.d.ts.map +1 -0
  237. package/esm/MetricComponent/Form/Header/EditMetricContentHeader.events.d.ts +7 -0
  238. package/esm/MetricComponent/Form/Header/EditMetricContentHeader.events.d.ts.map +1 -0
  239. package/esm/MetricComponent/Form/Header/EditMetricContentHeader.events.js +11 -0
  240. package/esm/MetricComponent/Form/Header/EditMetricContentHeader.js +48 -0
  241. package/esm/MetricComponent/Form/Header/LockedBubble.d.ts +3 -0
  242. package/esm/MetricComponent/Form/Header/LockedBubble.d.ts.map +1 -0
  243. package/esm/MetricComponent/Form/Header/LockedBubble.js +14 -0
  244. package/esm/MetricComponent/Form/Header/MetricDescriptionField.d.ts +10 -0
  245. package/esm/MetricComponent/Form/Header/MetricDescriptionField.d.ts.map +1 -0
  246. package/esm/MetricComponent/Form/Header/MetricDescriptionField.js +24 -0
  247. package/esm/MetricComponent/Form/Header/MetricIdField.d.ts +9 -0
  248. package/esm/MetricComponent/Form/Header/MetricIdField.d.ts.map +1 -0
  249. package/esm/MetricComponent/Form/Header/MetricIdField.js +80 -0
  250. package/esm/MetricComponent/Form/Header/MetricTagsField.d.ts +8 -0
  251. package/esm/MetricComponent/Form/Header/MetricTagsField.d.ts.map +1 -0
  252. package/esm/MetricComponent/Form/Header/MetricTagsField.js +61 -0
  253. package/esm/MetricComponent/Form/Header/MetricTitleField.d.ts +8 -0
  254. package/esm/MetricComponent/Form/Header/MetricTitleField.d.ts.map +1 -0
  255. package/esm/MetricComponent/Form/Header/MetricTitleField.js +40 -0
  256. package/esm/MetricComponent/Form/Header/MetricTypeField.d.ts +8 -0
  257. package/esm/MetricComponent/Form/Header/MetricTypeField.d.ts.map +1 -0
  258. package/esm/MetricComponent/Form/Header/MetricTypeField.js +42 -0
  259. package/esm/MetricComponent/Form/Header/Usage/Usage.d.ts +13 -0
  260. package/esm/MetricComponent/Form/Header/Usage/Usage.d.ts.map +1 -0
  261. package/esm/MetricComponent/Form/Header/Usage/Usage.js +68 -0
  262. package/esm/MetricComponent/Form/Header/Usage/UsageItems.d.ts +11 -0
  263. package/esm/MetricComponent/Form/Header/Usage/UsageItems.d.ts.map +1 -0
  264. package/esm/MetricComponent/Form/Header/Usage/UsageItems.js +88 -0
  265. package/esm/MetricComponent/Form/Header/Usage/UsagesOverlay.d.ts +17 -0
  266. package/esm/MetricComponent/Form/Header/Usage/UsagesOverlay.d.ts.map +1 -0
  267. package/esm/MetricComponent/Form/Header/Usage/UsagesOverlay.js +119 -0
  268. package/esm/MetricComponent/Form/Header/share/MetricAccessChip.d.ts +9 -0
  269. package/esm/MetricComponent/Form/Header/share/MetricAccessChip.d.ts.map +1 -0
  270. package/esm/MetricComponent/Form/Header/share/MetricAccessChip.js +39 -0
  271. package/esm/MetricComponent/Form/Header/share/MetricShare.d.ts +17 -0
  272. package/esm/MetricComponent/Form/Header/share/MetricShare.d.ts.map +1 -0
  273. package/esm/MetricComponent/Form/Header/share/MetricShare.js +36 -0
  274. package/esm/MetricComponent/Form/Header/share/useApplyMetricAccess.d.ts +10 -0
  275. package/esm/MetricComponent/Form/Header/share/useApplyMetricAccess.d.ts.map +1 -0
  276. package/esm/MetricComponent/Form/Header/share/useApplyMetricAccess.js +39 -0
  277. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorEditor.d.ts +11 -0
  278. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorEditor.d.ts.map +1 -0
  279. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorEditor.js +128 -0
  280. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.d.ts +9 -0
  281. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.d.ts.map +1 -0
  282. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.events.d.ts +11 -0
  283. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.events.d.ts.map +1 -0
  284. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.events.js +25 -0
  285. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.js +68 -0
  286. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorHeader.d.ts +14 -0
  287. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorHeader.d.ts.map +1 -0
  288. package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorHeader.js +84 -0
  289. package/esm/MetricComponent/Form/MaqlEditorField/suggestionDetailsFunctions.d.ts +3 -0
  290. package/esm/MetricComponent/Form/MaqlEditorField/suggestionDetailsFunctions.d.ts.map +1 -0
  291. package/esm/MetricComponent/Form/MaqlEditorField/suggestionDetailsFunctions.js +57 -0
  292. package/esm/MetricComponent/Form/MaqlEditorUtils/Placeholder.d.ts +8 -0
  293. package/esm/MetricComponent/Form/MaqlEditorUtils/Placeholder.d.ts.map +1 -0
  294. package/esm/MetricComponent/Form/MaqlEditorUtils/Placeholder.js +72 -0
  295. package/esm/MetricComponent/Form/MaqlResult/MaqlResult.d.ts +19 -0
  296. package/esm/MetricComponent/Form/MaqlResult/MaqlResult.d.ts.map +1 -0
  297. package/esm/MetricComponent/Form/MaqlResult/MaqlResult.js +144 -0
  298. package/esm/MetricComponent/Form/MaqlResult/MaqlResultHeader.d.ts +23 -0
  299. package/esm/MetricComponent/Form/MaqlResult/MaqlResultHeader.d.ts.map +1 -0
  300. package/esm/MetricComponent/Form/MaqlResult/MaqlResultHeader.js +54 -0
  301. package/esm/MetricComponent/Form/MaqlResult/MaqlSql.d.ts +8 -0
  302. package/esm/MetricComponent/Form/MaqlResult/MaqlSql.d.ts.map +1 -0
  303. package/esm/MetricComponent/Form/MaqlResult/MaqlSql.js +54 -0
  304. package/esm/MetricComponent/Form/MaqlResult/MaqlSqlHeader.d.ts +10 -0
  305. package/esm/MetricComponent/Form/MaqlResult/MaqlSqlHeader.d.ts.map +1 -0
  306. package/esm/MetricComponent/Form/MaqlResult/MaqlSqlHeader.js +46 -0
  307. package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelect.d.ts +15 -0
  308. package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelect.d.ts.map +1 -0
  309. package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelect.js +171 -0
  310. package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelectItem.d.ts +10 -0
  311. package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelectItem.d.ts.map +1 -0
  312. package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelectItem.js +23 -0
  313. package/esm/MetricComponent/Form/MaqlResult/components/LimitSelect.d.ts +11 -0
  314. package/esm/MetricComponent/Form/MaqlResult/components/LimitSelect.d.ts.map +1 -0
  315. package/esm/MetricComponent/Form/MaqlResult/components/LimitSelect.js +134 -0
  316. package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.d.ts +10 -0
  317. package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.d.ts.map +1 -0
  318. package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.events.d.ts +7 -0
  319. package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.events.d.ts.map +1 -0
  320. package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.events.js +12 -0
  321. package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.js +83 -0
  322. package/esm/MetricComponent/Form/OtherMetrics/OtherMetricsContext.d.ts +13 -0
  323. package/esm/MetricComponent/Form/OtherMetrics/OtherMetricsContext.d.ts.map +1 -0
  324. package/esm/MetricComponent/Form/OtherMetrics/OtherMetricsContext.js +23 -0
  325. package/esm/MetricComponent/Form/OtherMetrics/useOtherMetrics.d.ts +3 -0
  326. package/esm/MetricComponent/Form/OtherMetrics/useOtherMetrics.d.ts.map +1 -0
  327. package/esm/MetricComponent/Form/OtherMetrics/useOtherMetrics.js +6 -0
  328. package/esm/MetricComponent/Form/PartHeader/PartHeader.d.ts +20 -0
  329. package/esm/MetricComponent/Form/PartHeader/PartHeader.d.ts.map +1 -0
  330. package/esm/MetricComponent/Form/PartHeader/PartHeader.js +90 -0
  331. package/esm/MetricComponent/Form/PartHeader/PartHeaderButton.d.ts +16 -0
  332. package/esm/MetricComponent/Form/PartHeader/PartHeaderButton.d.ts.map +1 -0
  333. package/esm/MetricComponent/Form/PartHeader/PartHeaderButton.js +29 -0
  334. package/esm/MetricComponent/Form/Prefixes/PrefixesContext.d.ts +12 -0
  335. package/esm/MetricComponent/Form/Prefixes/PrefixesContext.d.ts.map +1 -0
  336. package/esm/MetricComponent/Form/Prefixes/PrefixesContext.js +10 -0
  337. package/esm/MetricComponent/Form/Prefixes/usePrefixes.d.ts +3 -0
  338. package/esm/MetricComponent/Form/Prefixes/usePrefixes.d.ts.map +1 -0
  339. package/esm/MetricComponent/Form/Prefixes/usePrefixes.js +6 -0
  340. package/esm/MetricComponent/Form/TestingFormProvider.d.ts +10 -0
  341. package/esm/MetricComponent/Form/TestingFormProvider.d.ts.map +1 -0
  342. package/esm/MetricComponent/Form/TestingFormProvider.js +7 -0
  343. package/esm/MetricComponent/Form/attribute.d.ts +3 -0
  344. package/esm/MetricComponent/Form/attribute.d.ts.map +1 -0
  345. package/esm/MetricComponent/Form/attribute.js +9 -0
  346. package/esm/MetricComponent/Form/data.d.ts +23 -0
  347. package/esm/MetricComponent/Form/data.d.ts.map +1 -0
  348. package/esm/MetricComponent/Form/data.js +12 -0
  349. package/esm/MetricComponent/Form/hooks/useCatalog.d.ts +9 -0
  350. package/esm/MetricComponent/Form/hooks/useCatalog.d.ts.map +1 -0
  351. package/esm/MetricComponent/Form/hooks/useCatalog.js +72 -0
  352. package/esm/MetricComponent/Form/hooks/useExecute.d.ts +14 -0
  353. package/esm/MetricComponent/Form/hooks/useExecute.d.ts.map +1 -0
  354. package/esm/MetricComponent/Form/hooks/useExecute.js +26 -0
  355. package/esm/MetricComponent/Form/hooks/useExplain.d.ts +10 -0
  356. package/esm/MetricComponent/Form/hooks/useExplain.d.ts.map +1 -0
  357. package/esm/MetricComponent/Form/hooks/useExplain.js +50 -0
  358. package/esm/MetricComponent/Form/hooks/useInvalidFocus.d.ts +5 -0
  359. package/esm/MetricComponent/Form/hooks/useInvalidFocus.d.ts.map +1 -0
  360. package/esm/MetricComponent/Form/hooks/useInvalidFocus.js +20 -0
  361. package/esm/MetricComponent/Form/hooks/useMetricFormField.d.ts +10 -0
  362. package/esm/MetricComponent/Form/hooks/useMetricFormField.d.ts.map +1 -0
  363. package/esm/MetricComponent/Form/hooks/useMetricFormField.js +16 -0
  364. package/esm/MetricComponent/Form/hooks/useMetricFormStatus.d.ts +5 -0
  365. package/esm/MetricComponent/Form/hooks/useMetricFormStatus.d.ts.map +1 -0
  366. package/esm/MetricComponent/Form/hooks/useMetricFormStatus.js +5 -0
  367. package/esm/MetricComponent/Form/hooks/useMetricFormatState.d.ts +41 -0
  368. package/esm/MetricComponent/Form/hooks/useMetricFormatState.d.ts.map +1 -0
  369. package/esm/MetricComponent/Form/hooks/useMetricFormatState.js +50 -0
  370. package/esm/MetricComponent/Form/hooks/useMetricValidation.d.ts +11 -0
  371. package/esm/MetricComponent/Form/hooks/useMetricValidation.d.ts.map +1 -0
  372. package/esm/MetricComponent/Form/hooks/useMetricValidation.js +53 -0
  373. package/esm/MetricComponent/Form/hooks/useTitleExistsCheck.d.ts +2 -0
  374. package/esm/MetricComponent/Form/hooks/useTitleExistsCheck.d.ts.map +1 -0
  375. package/esm/MetricComponent/Form/hooks/useTitleExistsCheck.js +19 -0
  376. package/esm/MetricComponent/Form/hooks/useToggleWithCollapse.d.ts +4 -0
  377. package/esm/MetricComponent/Form/hooks/useToggleWithCollapse.d.ts.map +1 -0
  378. package/esm/MetricComponent/Form/hooks/useToggleWithCollapse.js +16 -0
  379. package/esm/MetricComponent/Form/hooks/useUniqIdGenerator.d.ts +2 -0
  380. package/esm/MetricComponent/Form/hooks/useUniqIdGenerator.d.ts.map +1 -0
  381. package/esm/MetricComponent/Form/hooks/useUniqIdGenerator.js +48 -0
  382. package/esm/MetricComponent/Form/hooks/useValidationScheme.d.ts +10 -0
  383. package/esm/MetricComponent/Form/hooks/useValidationScheme.d.ts.map +1 -0
  384. package/esm/MetricComponent/Form/hooks/useValidationScheme.js +17 -0
  385. package/esm/MetricComponent/Form/inlineMeasure.d.ts +3 -0
  386. package/esm/MetricComponent/Form/inlineMeasure.d.ts.map +1 -0
  387. package/esm/MetricComponent/Form/inlineMeasure.js +11 -0
  388. package/esm/MetricComponent/Form/maqlFieldFunctions.d.ts +17 -0
  389. package/esm/MetricComponent/Form/maqlFieldFunctions.d.ts.map +1 -0
  390. package/esm/MetricComponent/Form/maqlFieldFunctions.js +43 -0
  391. package/esm/MetricComponent/Form/validationSchema.d.ts +12 -0
  392. package/esm/MetricComponent/Form/validationSchema.d.ts.map +1 -0
  393. package/esm/MetricComponent/Form/validationSchema.js +123 -0
  394. package/esm/MetricComponent/IdChangeConfirmDialog/IdChangeConfirmDialog.d.ts +15 -0
  395. package/esm/MetricComponent/IdChangeConfirmDialog/IdChangeConfirmDialog.d.ts.map +1 -0
  396. package/esm/MetricComponent/IdChangeConfirmDialog/IdChangeConfirmDialog.js +75 -0
  397. package/esm/MetricComponent/ManageMetric.d.ts +38 -0
  398. package/esm/MetricComponent/ManageMetric.d.ts.map +1 -0
  399. package/esm/MetricComponent/ManageMetric.js +29 -0
  400. package/esm/MetricComponent/ManageMetrics.d.ts +23 -0
  401. package/esm/MetricComponent/ManageMetrics.d.ts.map +1 -0
  402. package/esm/MetricComponent/ManageMetrics.js +32 -0
  403. package/esm/MetricComponent/MetricService.d.ts +7 -0
  404. package/esm/MetricComponent/MetricService.d.ts.map +1 -0
  405. package/esm/MetricComponent/MetricService.js +7 -0
  406. package/esm/MetricComponent/MetricState/TabContent.d.ts +37 -0
  407. package/esm/MetricComponent/MetricState/TabContent.d.ts.map +1 -0
  408. package/esm/MetricComponent/MetricState/TabContent.js +21 -0
  409. package/esm/MetricComponent/MetricState/hooks/useChangeIdDialog.d.ts +23 -0
  410. package/esm/MetricComponent/MetricState/hooks/useChangeIdDialog.d.ts.map +1 -0
  411. package/esm/MetricComponent/MetricState/hooks/useChangeIdDialog.js +68 -0
  412. package/esm/MetricComponent/MetricState/hooks/useDirtyChanged.d.ts +4 -0
  413. package/esm/MetricComponent/MetricState/hooks/useDirtyChanged.d.ts.map +1 -0
  414. package/esm/MetricComponent/MetricState/hooks/useDirtyChanged.js +16 -0
  415. package/esm/MetricComponent/MetricState/hooks/useOnChangeCallback.d.ts +17 -0
  416. package/esm/MetricComponent/MetricState/hooks/useOnChangeCallback.d.ts.map +1 -0
  417. package/esm/MetricComponent/MetricState/hooks/useOnChangeCallback.js +41 -0
  418. package/esm/MetricComponent/MetricState/hooks/useOnDeleteCallback.d.ts +5 -0
  419. package/esm/MetricComponent/MetricState/hooks/useOnDeleteCallback.d.ts.map +1 -0
  420. package/esm/MetricComponent/MetricState/hooks/useOnDeleteCallback.js +9 -0
  421. package/esm/MetricComponent/MetricState/hooks/useOnSaveCallback.d.ts +6 -0
  422. package/esm/MetricComponent/MetricState/hooks/useOnSaveCallback.d.ts.map +1 -0
  423. package/esm/MetricComponent/MetricState/hooks/useOnSaveCallback.js +9 -0
  424. package/esm/MetricComponent/MetricState/hooks/useSaveTab.d.ts +9 -0
  425. package/esm/MetricComponent/MetricState/hooks/useSaveTab.d.ts.map +1 -0
  426. package/esm/MetricComponent/MetricState/hooks/useSaveTab.js +93 -0
  427. package/esm/MetricComponent/MetricState/hooks/useTabsData.d.ts +16 -0
  428. package/esm/MetricComponent/MetricState/hooks/useTabsData.d.ts.map +1 -0
  429. package/esm/MetricComponent/MetricState/hooks/useTabsData.js +62 -0
  430. package/esm/MetricComponent/MetricState/hooks/useUnsavedChanges.d.ts +17 -0
  431. package/esm/MetricComponent/MetricState/hooks/useUnsavedChanges.d.ts.map +1 -0
  432. package/esm/MetricComponent/MetricState/hooks/useUnsavedChanges.js +86 -0
  433. package/esm/MetricComponent/MetricState/hooks/useUpdateMetricData.d.ts +5 -0
  434. package/esm/MetricComponent/MetricState/hooks/useUpdateMetricData.d.ts.map +1 -0
  435. package/esm/MetricComponent/MetricState/hooks/useUpdateMetricData.js +10 -0
  436. package/esm/MetricComponent/MetricState/hooks/useUpdateMetricTab.d.ts +6 -0
  437. package/esm/MetricComponent/MetricState/hooks/useUpdateMetricTab.d.ts.map +1 -0
  438. package/esm/MetricComponent/MetricState/hooks/useUpdateMetricTab.js +17 -0
  439. package/esm/MetricComponent/MetricState/metricState.data.d.ts +37 -0
  440. package/esm/MetricComponent/MetricState/metricState.data.d.ts.map +1 -0
  441. package/esm/MetricComponent/MetricState/metricState.data.js +13 -0
  442. package/esm/MetricComponent/MetricState/useMetricState.d.ts +27 -0
  443. package/esm/MetricComponent/MetricState/useMetricState.d.ts.map +1 -0
  444. package/esm/MetricComponent/MetricState/useMetricState.js +127 -0
  445. package/esm/MetricComponent/MetricsContext/MetricsContext.d.ts +11 -0
  446. package/esm/MetricComponent/MetricsContext/MetricsContext.d.ts.map +1 -0
  447. package/esm/MetricComponent/MetricsContext/MetricsContext.js +14 -0
  448. package/esm/MetricComponent/MetricsContext/useMetricsContext.d.ts +3 -0
  449. package/esm/MetricComponent/MetricsContext/useMetricsContext.d.ts.map +1 -0
  450. package/esm/MetricComponent/MetricsContext/useMetricsContext.js +6 -0
  451. package/esm/MetricComponent/MetricsState.d.ts +39 -0
  452. package/esm/MetricComponent/MetricsState.d.ts.map +1 -0
  453. package/esm/MetricComponent/MetricsState.js +73 -0
  454. package/esm/MetricComponent/MinimizedMetricComponent/MinimizedMetricComponent.d.ts +12 -0
  455. package/esm/MetricComponent/MinimizedMetricComponent/MinimizedMetricComponent.d.ts.map +1 -0
  456. package/esm/MetricComponent/MinimizedMetricComponent/MinimizedMetricComponent.js +110 -0
  457. package/esm/MetricComponent/MinimizedMetrics.d.ts +10 -0
  458. package/esm/MetricComponent/MinimizedMetrics.d.ts.map +1 -0
  459. package/esm/MetricComponent/MinimizedMetrics.js +19 -0
  460. package/esm/MetricComponent/MultipleMetricsState.d.ts +61 -0
  461. package/esm/MetricComponent/MultipleMetricsState.d.ts.map +1 -0
  462. package/esm/MetricComponent/MultipleMetricsState.js +53 -0
  463. package/esm/MetricComponent/UnsavedChangesConfirmDialog/UnsavedChangesConfirmDialog.d.ts +14 -0
  464. package/esm/MetricComponent/UnsavedChangesConfirmDialog/UnsavedChangesConfirmDialog.d.ts.map +1 -0
  465. package/esm/MetricComponent/UnsavedChangesConfirmDialog/UnsavedChangesConfirmDialog.js +52 -0
  466. package/esm/MetricComponent/hooks/useDeleteCallbacks.d.ts +7 -0
  467. package/esm/MetricComponent/hooks/useDeleteCallbacks.d.ts.map +1 -0
  468. package/esm/MetricComponent/hooks/useDeleteCallbacks.js +52 -0
  469. package/esm/MetricComponent/hooks/useDirtyChanged.d.ts +2 -0
  470. package/esm/MetricComponent/hooks/useDirtyChanged.d.ts.map +1 -0
  471. package/esm/MetricComponent/hooks/useDirtyChanged.js +10 -0
  472. package/esm/MetricComponent/hooks/useEditCallbacks.d.ts +23 -0
  473. package/esm/MetricComponent/hooks/useEditCallbacks.d.ts.map +1 -0
  474. package/esm/MetricComponent/hooks/useEditCallbacks.js +107 -0
  475. package/esm/MetricComponent/hooks/useFocusedField.d.ts +4 -0
  476. package/esm/MetricComponent/hooks/useFocusedField.d.ts.map +1 -0
  477. package/esm/MetricComponent/hooks/useFocusedField.js +9 -0
  478. package/esm/MetricComponent/hooks/useIdCallbacks.d.ts +22 -0
  479. package/esm/MetricComponent/hooks/useIdCallbacks.d.ts.map +1 -0
  480. package/esm/MetricComponent/hooks/useIdCallbacks.js +46 -0
  481. package/esm/MetricComponent/hooks/useInitialValueMetric.d.ts +4 -0
  482. package/esm/MetricComponent/hooks/useInitialValueMetric.d.ts.map +1 -0
  483. package/esm/MetricComponent/hooks/useInitialValueMetric.js +12 -0
  484. package/esm/MetricComponent/hooks/useInitialValues.d.ts +3 -0
  485. package/esm/MetricComponent/hooks/useInitialValues.d.ts.map +1 -0
  486. package/esm/MetricComponent/hooks/useInitialValues.js +13 -0
  487. package/esm/MetricComponent/hooks/useMetricContentState.d.ts +38 -0
  488. package/esm/MetricComponent/hooks/useMetricContentState.d.ts.map +1 -0
  489. package/esm/MetricComponent/hooks/useMetricContentState.js +73 -0
  490. package/esm/MetricComponent/hooks/useMetricDelete.d.ts +3 -0
  491. package/esm/MetricComponent/hooks/useMetricDelete.d.ts.map +1 -0
  492. package/esm/MetricComponent/hooks/useMetricDelete.js +14 -0
  493. package/esm/MetricComponent/hooks/useMetricSave.d.ts +4 -0
  494. package/esm/MetricComponent/hooks/useMetricSave.d.ts.map +1 -0
  495. package/esm/MetricComponent/hooks/useMetricSave.js +52 -0
  496. package/esm/MetricComponent/hooks/useMetricUsage.d.ts +8 -0
  497. package/esm/MetricComponent/hooks/useMetricUsage.d.ts.map +1 -0
  498. package/esm/MetricComponent/hooks/useMetricUsage.js +21 -0
  499. package/esm/MetricComponent/hooks/useOnCloseOrCancel.d.ts +7 -0
  500. package/esm/MetricComponent/hooks/useOnCloseOrCancel.d.ts.map +1 -0
  501. package/esm/MetricComponent/hooks/useOnCloseOrCancel.js +26 -0
  502. package/esm/MetricComponent/hooks/useOnSaveUnchanged.d.ts +12 -0
  503. package/esm/MetricComponent/hooks/useOnSaveUnchanged.d.ts.map +1 -0
  504. package/esm/MetricComponent/hooks/useOnSaveUnchanged.js +30 -0
  505. package/esm/MetricComponent/hooks/useSaveAsClick.d.ts +6 -0
  506. package/esm/MetricComponent/hooks/useSaveAsClick.d.ts.map +1 -0
  507. package/esm/MetricComponent/hooks/useSaveAsClick.js +62 -0
  508. package/esm/MetricComponent/hooks/useSaveClick.d.ts +11 -0
  509. package/esm/MetricComponent/hooks/useSaveClick.d.ts.map +1 -0
  510. package/esm/MetricComponent/hooks/useSaveClick.js +47 -0
  511. package/esm/MetricComponent/metric/deleteInfo.d.ts +6 -0
  512. package/esm/MetricComponent/metric/deleteInfo.d.ts.map +1 -0
  513. package/esm/MetricComponent/metric/deleteInfo.js +6 -0
  514. package/esm/MetricComponent/metric/emptyMetric.d.ts +8 -0
  515. package/esm/MetricComponent/metric/emptyMetric.d.ts.map +1 -0
  516. package/esm/MetricComponent/metric/emptyMetric.js +13 -0
  517. package/esm/MetricComponent/metric/idChangeHelper.d.ts +5 -0
  518. package/esm/MetricComponent/metric/idChangeHelper.d.ts.map +1 -0
  519. package/esm/MetricComponent/metric/idChangeHelper.js +11 -0
  520. package/esm/MetricComponent/metric/idValidator.d.ts +3 -0
  521. package/esm/MetricComponent/metric/idValidator.d.ts.map +1 -0
  522. package/esm/MetricComponent/metric/idValidator.js +5 -0
  523. package/esm/MetricComponent/metric/metricHelpers.d.ts +29 -0
  524. package/esm/MetricComponent/metric/metricHelpers.d.ts.map +1 -0
  525. package/esm/MetricComponent/metric/metricHelpers.js +114 -0
  526. package/esm/MetricComponent/metric/nameGenerators.d.ts +13 -0
  527. package/esm/MetricComponent/metric/nameGenerators.d.ts.map +1 -0
  528. package/esm/MetricComponent/metric/nameGenerators.js +63 -0
  529. package/esm/MetricComponent/metric/prefixHelper.d.ts +7 -0
  530. package/esm/MetricComponent/metric/prefixHelper.d.ts.map +1 -0
  531. package/esm/MetricComponent/metric/prefixHelper.js +43 -0
  532. package/esm/MetricComponent/metric/saveInfo.d.ts +13 -0
  533. package/esm/MetricComponent/metric/saveInfo.d.ts.map +1 -0
  534. package/esm/MetricComponent/metric/saveInfo.js +10 -0
  535. package/esm/MetricComponent/metric/transformer.d.ts +5 -0
  536. package/esm/MetricComponent/metric/transformer.d.ts.map +1 -0
  537. package/esm/MetricComponent/metric/transformer.js +17 -0
  538. package/esm/index.d.ts +41 -0
  539. package/esm/index.d.ts.map +1 -0
  540. package/esm/index.js +35 -0
  541. package/esm/shared/Form/Form.d.ts +25 -0
  542. package/esm/shared/Form/Form.d.ts.map +1 -0
  543. package/esm/shared/Form/Form.js +48 -0
  544. package/esm/shared/Form/FormApi.d.ts +8 -0
  545. package/esm/shared/Form/FormApi.d.ts.map +1 -0
  546. package/esm/shared/Form/FormApi.js +14 -0
  547. package/esm/shared/Form/FormContext.d.ts +52 -0
  548. package/esm/shared/Form/FormContext.d.ts.map +1 -0
  549. package/esm/shared/Form/FormContext.js +50 -0
  550. package/esm/shared/Form/data.d.ts +5 -0
  551. package/esm/shared/Form/data.d.ts.map +1 -0
  552. package/esm/shared/Form/data.js +6 -0
  553. package/esm/shared/Form/hooks/useChanged.d.ts +5 -0
  554. package/esm/shared/Form/hooks/useChanged.d.ts.map +1 -0
  555. package/esm/shared/Form/hooks/useChanged.js +14 -0
  556. package/esm/shared/Form/hooks/useDirty.d.ts +3 -0
  557. package/esm/shared/Form/hooks/useDirty.d.ts.map +1 -0
  558. package/esm/shared/Form/hooks/useDirty.js +9 -0
  559. package/esm/shared/Form/hooks/useFormHandlersInternal.d.ts +12 -0
  560. package/esm/shared/Form/hooks/useFormHandlersInternal.d.ts.map +1 -0
  561. package/esm/shared/Form/hooks/useFormHandlersInternal.js +16 -0
  562. package/esm/shared/Form/hooks/useFormState.d.ts +4 -0
  563. package/esm/shared/Form/hooks/useFormState.d.ts.map +1 -0
  564. package/esm/shared/Form/hooks/useFormState.js +33 -0
  565. package/esm/shared/Form/hooks/useFormStatusInternal.d.ts +32 -0
  566. package/esm/shared/Form/hooks/useFormStatusInternal.d.ts.map +1 -0
  567. package/esm/shared/Form/hooks/useFormStatusInternal.js +34 -0
  568. package/esm/shared/Form/hooks/useInvalidFocusField.d.ts +3 -0
  569. package/esm/shared/Form/hooks/useInvalidFocusField.d.ts.map +1 -0
  570. package/esm/shared/Form/hooks/useInvalidFocusField.js +8 -0
  571. package/esm/shared/Form/hooks/useMutations.d.ts +4 -0
  572. package/esm/shared/Form/hooks/useMutations.d.ts.map +1 -0
  573. package/esm/shared/Form/hooks/useMutations.js +97 -0
  574. package/esm/shared/Form/hooks/useRealFocus.d.ts +5 -0
  575. package/esm/shared/Form/hooks/useRealFocus.d.ts.map +1 -0
  576. package/esm/shared/Form/hooks/useRealFocus.js +38 -0
  577. package/esm/shared/Form/useFormChanged.d.ts +2 -0
  578. package/esm/shared/Form/useFormChanged.d.ts.map +1 -0
  579. package/esm/shared/Form/useFormChanged.js +12 -0
  580. package/esm/shared/Form/useFormDefaults.d.ts +2 -0
  581. package/esm/shared/Form/useFormDefaults.d.ts.map +1 -0
  582. package/esm/shared/Form/useFormDefaults.js +7 -0
  583. package/esm/shared/Form/useFormDirty.d.ts +2 -0
  584. package/esm/shared/Form/useFormDirty.d.ts.map +1 -0
  585. package/esm/shared/Form/useFormDirty.js +13 -0
  586. package/esm/shared/Form/useFormErrors.d.ts +3 -0
  587. package/esm/shared/Form/useFormErrors.d.ts.map +1 -0
  588. package/esm/shared/Form/useFormErrors.js +18 -0
  589. package/esm/shared/Form/useFormField.d.ts +24 -0
  590. package/esm/shared/Form/useFormField.d.ts.map +1 -0
  591. package/esm/shared/Form/useFormField.js +60 -0
  592. package/esm/shared/Form/useFormFieldElementRef.d.ts +3 -0
  593. package/esm/shared/Form/useFormFieldElementRef.d.ts.map +1 -0
  594. package/esm/shared/Form/useFormFieldElementRef.js +10 -0
  595. package/esm/shared/Form/useFormHandlers.d.ts +8 -0
  596. package/esm/shared/Form/useFormHandlers.d.ts.map +1 -0
  597. package/esm/shared/Form/useFormHandlers.js +45 -0
  598. package/esm/shared/Form/useFormStatus.d.ts +3 -0
  599. package/esm/shared/Form/useFormStatus.d.ts.map +1 -0
  600. package/esm/shared/Form/useFormStatus.js +10 -0
  601. package/esm/shared/Form/useFormValues.d.ts +3 -0
  602. package/esm/shared/Form/useFormValues.d.ts.map +1 -0
  603. package/esm/shared/Form/useFormValues.js +11 -0
  604. package/esm/shared/Form/utils.d.ts +2 -0
  605. package/esm/shared/Form/utils.d.ts.map +1 -0
  606. package/esm/shared/Form/utils.js +5 -0
  607. package/esm/shared/GlobalLoading/GlobalLoading.d.ts +2 -0
  608. package/esm/shared/GlobalLoading/GlobalLoading.d.ts.map +1 -0
  609. package/esm/shared/GlobalLoading/GlobalLoading.js +15 -0
  610. package/esm/shared/MaqlPreview/MaqlPreview.d.ts +19 -0
  611. package/esm/shared/MaqlPreview/MaqlPreview.d.ts.map +1 -0
  612. package/esm/shared/MaqlPreview/MaqlPreview.js +107 -0
  613. package/esm/shared/MaqlPreview/backend/measureExpressionTokens.d.ts +18 -0
  614. package/esm/shared/MaqlPreview/backend/measureExpressionTokens.d.ts.map +1 -0
  615. package/esm/shared/MaqlPreview/backend/measureExpressionTokens.js +83 -0
  616. package/esm/shared/MaqlPreview/hooks/useMetricTokens.d.ts +8 -0
  617. package/esm/shared/MaqlPreview/hooks/useMetricTokens.d.ts.map +1 -0
  618. package/esm/shared/MaqlPreview/hooks/useMetricTokens.js +14 -0
  619. package/esm/shared/MetricTooltip/MetricTooltip.d.ts +14 -0
  620. package/esm/shared/MetricTooltip/MetricTooltip.d.ts.map +1 -0
  621. package/esm/shared/MetricTooltip/MetricTooltip.events.d.ts +9 -0
  622. package/esm/shared/MetricTooltip/MetricTooltip.events.d.ts.map +1 -0
  623. package/esm/shared/MetricTooltip/MetricTooltip.events.js +18 -0
  624. package/esm/shared/MetricTooltip/MetricTooltip.js +46 -0
  625. package/esm/shared/MetricTooltip/MetricTooltipContent.d.ts +12 -0
  626. package/esm/shared/MetricTooltip/MetricTooltipContent.d.ts.map +1 -0
  627. package/esm/shared/MetricTooltip/MetricTooltipContent.js +38 -0
  628. package/esm/shared/MetricTooltip/fixtures.d.ts +3 -0
  629. package/esm/shared/MetricTooltip/fixtures.d.ts.map +1 -0
  630. package/esm/shared/MetricTooltip/fixtures.js +16 -0
  631. package/esm/shared/Tabs/Tab.d.ts +31 -0
  632. package/esm/shared/Tabs/Tab.d.ts.map +1 -0
  633. package/esm/shared/Tabs/Tab.js +171 -0
  634. package/esm/shared/Tabs/Tabs.classes.d.ts +13 -0
  635. package/esm/shared/Tabs/Tabs.classes.d.ts.map +1 -0
  636. package/esm/shared/Tabs/Tabs.classes.js +13 -0
  637. package/esm/shared/Tabs/Tabs.d.ts +4 -0
  638. package/esm/shared/Tabs/Tabs.d.ts.map +1 -0
  639. package/esm/shared/Tabs/Tabs.data.d.ts +37 -0
  640. package/esm/shared/Tabs/Tabs.data.d.ts.map +1 -0
  641. package/esm/shared/Tabs/Tabs.data.js +4 -0
  642. package/esm/shared/Tabs/Tabs.js +195 -0
  643. package/esm/shared/Tabs/hooks/useChangeScroll.d.ts +2 -0
  644. package/esm/shared/Tabs/hooks/useChangeScroll.d.ts.map +1 -0
  645. package/esm/shared/Tabs/hooks/useChangeScroll.js +19 -0
  646. package/esm/shared/Tabs/hooks/useMouseDownRepeat.d.ts +3 -0
  647. package/esm/shared/Tabs/hooks/useMouseDownRepeat.d.ts.map +1 -0
  648. package/esm/shared/Tabs/hooks/useMouseDownRepeat.js +43 -0
  649. package/esm/shared/Tabs/hooks/useScrollByButtons.d.ts +9 -0
  650. package/esm/shared/Tabs/hooks/useScrollByButtons.d.ts.map +1 -0
  651. package/esm/shared/Tabs/hooks/useScrollByButtons.js +76 -0
  652. package/esm/shared/Tabs/hooks/useScrollToActive.d.ts +2 -0
  653. package/esm/shared/Tabs/hooks/useScrollToActive.d.ts.map +1 -0
  654. package/esm/shared/Tabs/hooks/useScrollToActive.js +36 -0
  655. package/esm/shared/Tabs/hooks/useTabCallbacks.d.ts +7 -0
  656. package/esm/shared/Tabs/hooks/useTabCallbacks.d.ts.map +1 -0
  657. package/esm/shared/Tabs/hooks/useTabCallbacks.js +17 -0
  658. package/esm/shared/Tabs/hooks/useTabs.d.ts +24 -0
  659. package/esm/shared/Tabs/hooks/useTabs.d.ts.map +1 -0
  660. package/esm/shared/Tabs/hooks/useTabs.js +130 -0
  661. package/esm/shared/Tabs/hooks/useTabsCallbacks.d.ts +8 -0
  662. package/esm/shared/Tabs/hooks/useTabsCallbacks.d.ts.map +1 -0
  663. package/esm/shared/Tabs/hooks/useTabsCallbacks.js +19 -0
  664. package/esm/shared/authentication/Authentication.d.ts +8 -0
  665. package/esm/shared/authentication/Authentication.d.ts.map +1 -0
  666. package/esm/shared/authentication/Authentication.js +51 -0
  667. package/esm/shared/backend/tigerContractExpiredHandler.d.ts +3 -0
  668. package/esm/shared/backend/tigerContractExpiredHandler.d.ts.map +1 -0
  669. package/esm/shared/backend/tigerContractExpiredHandler.js +19 -0
  670. package/esm/shared/backend/tigerNotAuthenticatedHandler.d.ts +9 -0
  671. package/esm/shared/backend/tigerNotAuthenticatedHandler.d.ts.map +1 -0
  672. package/esm/shared/backend/tigerNotAuthenticatedHandler.js +36 -0
  673. package/esm/shared/eventing/EventContext.d.ts +25 -0
  674. package/esm/shared/eventing/EventContext.d.ts.map +1 -0
  675. package/esm/shared/eventing/EventContext.js +35 -0
  676. package/esm/shared/eventing/events.d.ts +52 -0
  677. package/esm/shared/eventing/events.d.ts.map +1 -0
  678. package/esm/shared/eventing/events.js +56 -0
  679. package/esm/shared/eventing/functions/errorToTrackingData.d.ts +12 -0
  680. package/esm/shared/eventing/functions/errorToTrackingData.d.ts.map +1 -0
  681. package/esm/shared/eventing/functions/errorToTrackingData.js +10 -0
  682. package/esm/shared/eventing/useEvents.d.ts +10 -0
  683. package/esm/shared/eventing/useEvents.d.ts.map +1 -0
  684. package/esm/shared/eventing/useEvents.js +16 -0
  685. package/esm/shared/hooks/useApi.d.ts +4 -0
  686. package/esm/shared/hooks/useApi.d.ts.map +1 -0
  687. package/esm/shared/hooks/useApi.js +15 -0
  688. package/esm/shared/hooks/useFocus.d.ts +3 -0
  689. package/esm/shared/hooks/useFocus.d.ts.map +1 -0
  690. package/esm/shared/hooks/useFocus.js +55 -0
  691. package/esm/shared/hooks/usePromiseHandlerIndicator.d.ts +2 -0
  692. package/esm/shared/hooks/usePromiseHandlerIndicator.d.ts.map +1 -0
  693. package/esm/shared/hooks/usePromiseHandlerIndicator.js +11 -0
  694. package/esm/shared/hooks/useProp.d.ts +3 -0
  695. package/esm/shared/hooks/useProp.d.ts.map +1 -0
  696. package/esm/shared/hooks/useProp.js +15 -0
  697. package/esm/shared/links.d.ts +9 -0
  698. package/esm/shared/links.d.ts.map +1 -0
  699. package/esm/shared/links.js +9 -0
  700. package/esm/shared/metrics/MetricsReloadContext.d.ts +8 -0
  701. package/esm/shared/metrics/MetricsReloadContext.d.ts.map +1 -0
  702. package/esm/shared/metrics/MetricsReloadContext.js +14 -0
  703. package/esm/shared/metrics/functions/metricListData.d.ts +4 -0
  704. package/esm/shared/metrics/functions/metricListData.d.ts.map +1 -0
  705. package/esm/shared/metrics/functions/metricListData.js +29 -0
  706. package/esm/shared/metrics/useMetricListData.d.ts +29 -0
  707. package/esm/shared/metrics/useMetricListData.d.ts.map +1 -0
  708. package/esm/shared/metrics/useMetricListData.events.d.ts +12 -0
  709. package/esm/shared/metrics/useMetricListData.events.d.ts.map +1 -0
  710. package/esm/shared/metrics/useMetricListData.events.js +31 -0
  711. package/esm/shared/metrics/useMetricListData.js +52 -0
  712. package/esm/shared/metrics/useMetrics.d.ts +16 -0
  713. package/esm/shared/metrics/useMetrics.d.ts.map +1 -0
  714. package/esm/shared/metrics/useMetrics.js +34 -0
  715. package/esm/shared/metrics/useReloadMetrics.d.ts +3 -0
  716. package/esm/shared/metrics/useReloadMetrics.d.ts.map +1 -0
  717. package/esm/shared/metrics/useReloadMetrics.js +10 -0
  718. package/esm/shared/permissions.d.ts +10 -0
  719. package/esm/shared/permissions.d.ts.map +1 -0
  720. package/esm/shared/permissions.js +53 -0
  721. package/esm/shared/platform.d.ts +2 -0
  722. package/esm/shared/platform.d.ts.map +1 -0
  723. package/esm/shared/platform.js +4 -0
  724. package/esm/shared/theme/index.d.ts +416 -0
  725. package/esm/shared/theme/index.d.ts.map +1 -0
  726. package/esm/shared/theme/index.js +193 -0
  727. package/esm/tests/render.test.utils.d.ts +9 -0
  728. package/esm/tests/render.test.utils.d.ts.map +1 -0
  729. package/esm/tests/render.test.utils.js +18 -0
  730. package/esm/translations/IntlWrapper.d.ts +9 -0
  731. package/esm/translations/IntlWrapper.d.ts.map +1 -0
  732. package/esm/translations/IntlWrapper.js +11 -0
  733. package/esm/translations/de-DE.json +131 -0
  734. package/esm/translations/en-AU.json +131 -0
  735. package/esm/translations/en-GB.json +131 -0
  736. package/esm/translations/en-US.json +518 -0
  737. package/esm/translations/es-419.json +131 -0
  738. package/esm/translations/es-ES.json +131 -0
  739. package/esm/translations/fi-FI.json +131 -0
  740. package/esm/translations/fr-CA.json +131 -0
  741. package/esm/translations/fr-FR.json +131 -0
  742. package/esm/translations/id-ID.json +131 -0
  743. package/esm/translations/it-IT.json +131 -0
  744. package/esm/translations/ja-JP.json +131 -0
  745. package/esm/translations/ko-KR.json +131 -0
  746. package/esm/translations/nl-NL.json +131 -0
  747. package/esm/translations/pl-PL.json +131 -0
  748. package/esm/translations/pt-BR.json +131 -0
  749. package/esm/translations/pt-PT.json +131 -0
  750. package/esm/translations/ru-RU.json +131 -0
  751. package/esm/translations/sl-SI.json +131 -0
  752. package/esm/translations/th-TH.json +131 -0
  753. package/esm/translations/tr-TR.json +131 -0
  754. package/esm/translations/translations.d.ts +21 -0
  755. package/esm/translations/translations.d.ts.map +1 -0
  756. package/esm/translations/translations.js +89 -0
  757. package/esm/translations/uk-UA.json +131 -0
  758. package/esm/translations/vi-VN.json +131 -0
  759. package/esm/translations/zh-HK.json +131 -0
  760. package/esm/translations/zh-Hans.json +131 -0
  761. package/esm/translations/zh-Hant.json +131 -0
  762. package/package.json +116 -3
@@ -0,0 +1,195 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // (C) 2022-2026 GoodData Corporation
3
+ import { useState } from "react";
4
+ import { Bubble, BubbleHoverTrigger, Button, IconClose, IconContract, IconExpand, IconMinimize, } from "@gooddata/sdk-ui-kit";
5
+ import { makeStyles } from "../theme/index.js";
6
+ import { useChangeScroll } from "./hooks/useChangeScroll.js";
7
+ import { useScrollByButtons } from "./hooks/useScrollByButtons.js";
8
+ import { useScrollToActive } from "./hooks/useScrollToActive.js";
9
+ import { useTabCallbacks } from "./hooks/useTabCallbacks.js";
10
+ import { useTabsCallbacks } from "./hooks/useTabsCallbacks.js";
11
+ import { NameButton, Tab, TabActive, TitleText } from "./Tab.js";
12
+ import { TabsClasses } from "./Tabs.classes.js";
13
+ import { TabMaxWidth, TabsIconSize } from "./Tabs.data.js";
14
+ export const ButtonDivider = "divider";
15
+ const useStyles = makeStyles()((theme) => {
16
+ const buttonSize = TabsIconSize + theme.tabs.sizes.buttonMargin * 2;
17
+ const button = {
18
+ cursor: "pointer",
19
+ minWidth: theme.tabs.sizes.arrowButtonWidth,
20
+ width: theme.tabs.sizes.arrowButtonWidth,
21
+ background: "transparent",
22
+ border: "none",
23
+ borderBottom: `1px solid ${theme.tabs.colors.border}`,
24
+ display: "flex",
25
+ alignContent: "center",
26
+ alignItems: "center",
27
+ justifyContent: "center",
28
+ transition: "all 0.25s ease-in-out",
29
+ color: theme.tabs.colors.arrow,
30
+ "&:hover": {
31
+ color: theme.tabs.colors.hover,
32
+ },
33
+ };
34
+ return {
35
+ root: {
36
+ display: "block",
37
+ },
38
+ tabs: {
39
+ padding: `${theme.tabs.sizes.tabsPadding}px 0 0 0`,
40
+ display: "flex",
41
+ overflow: "hidden",
42
+ [`button.${NameButton}`]: {
43
+ display: "none",
44
+ },
45
+ [`.${TabActive}`]: {
46
+ [`button.${NameButton}`]: {
47
+ display: "block",
48
+ },
49
+ [`div.${TitleText}`]: {
50
+ width: `calc(100% - ${theme.tabs.sizes.buttonMargin + theme.tabs.sizes.controlsDividerMargin}px)`,
51
+ },
52
+ },
53
+ "&:hover": {
54
+ [`button.${NameButton}`]: {
55
+ display: "block",
56
+ },
57
+ [`div.${TitleText}`]: {
58
+ width: `calc(100% - ${theme.tabs.sizes.buttonMargin + theme.tabs.sizes.controlsDividerMargin}px)`,
59
+ },
60
+ },
61
+ },
62
+ //list
63
+ tabsList: {
64
+ display: "flex",
65
+ flexGrow: 0,
66
+ overflow: "hidden",
67
+ maxWidth: "100%",
68
+ position: "relative",
69
+ "&.minimizable": {
70
+ maxWidth: `calc(100% - ${buttonSize}px)`,
71
+ },
72
+ "&.closeable": {
73
+ maxWidth: `calc(100% - ${buttonSize}px)`,
74
+ },
75
+ "&.minimizable.closeable": {
76
+ maxWidth: `calc(100% - ${buttonSize * 2 + theme.tabs.sizes.controlsDividerWidth}px)`,
77
+ },
78
+ "&.scrollable > div:last-child": {
79
+ width: `${theme.tabs.sizes.tabLastDivider}px`,
80
+ "&:after": {
81
+ display: "none",
82
+ },
83
+ },
84
+ },
85
+ //filler
86
+ filler: {
87
+ borderBottom: `1px solid ${theme.tabs.colors.border}`,
88
+ flexShrink: 1,
89
+ flexGrow: 1,
90
+ },
91
+ //arrows
92
+ leftButton: {
93
+ ...button,
94
+ borderRight: `1px solid ${theme.tabs.colors.border}`,
95
+ },
96
+ rightButton: {
97
+ ...button,
98
+ borderLeft: `1px solid ${theme.tabs.colors.border}`,
99
+ },
100
+ disabled: {
101
+ cursor: "default",
102
+ span: {
103
+ color: `${theme.tabs.colors.disabled} !important`,
104
+ },
105
+ },
106
+ //create button
107
+ create: {
108
+ // `&&` doubles specificity (.x.x → 0,2,0) so these beat kit's single-class (0,1,0)
109
+ // `.gd-button-action` background/border/box-shadow, which get re-injected into the shared
110
+ // <head> on host preload and would otherwise win the tie by order and restore the button look.
111
+ "&&": {
112
+ background: "transparent",
113
+ border: "none",
114
+ boxShadow: "none",
115
+ fontSize: `${TabsIconSize}px`,
116
+ ".gd-button-icon::before": {
117
+ color: theme.tabs.colors.create,
118
+ },
119
+ "&:hover, &:focus, &:active": {
120
+ background: "transparent",
121
+ border: "none",
122
+ boxShadow: "none",
123
+ ".gd-button-icon": {
124
+ marginTop: "0 !important",
125
+ },
126
+ ".gd-button-icon::before": {
127
+ color: theme.tabs.colors.hover,
128
+ },
129
+ },
130
+ },
131
+ },
132
+ //controls
133
+ controls: {
134
+ display: "flex",
135
+ borderBottom: `1px solid ${theme.tabs.colors.border}`,
136
+ },
137
+ trigger: {
138
+ display: "block",
139
+ position: "relative",
140
+ bottom: "-1px",
141
+ },
142
+ divider: {
143
+ margin: `${theme.tabs.sizes.controlsDividerMargin}px 0`,
144
+ width: theme.tabs.sizes.controlsDividerWidth,
145
+ background: theme.tabs.colors.divider,
146
+ },
147
+ button: {
148
+ padding: 0,
149
+ border: "none",
150
+ cursor: "pointer",
151
+ background: "none",
152
+ margin: `0 ${theme.tabs.sizes.buttonMargin}px`,
153
+ "svg path": {
154
+ transition: "all 0.25s ease-in-out",
155
+ fill: theme.tabs.colors.normal,
156
+ },
157
+ "&:hover svg path": {
158
+ fill: theme.tabs.colors.hover,
159
+ },
160
+ },
161
+ };
162
+ });
163
+ export function Tabs({ tabs, active, render, content, className, closeable = false, minimizable = false, maximizable = false, maximized = false, creatable = false, onTabCreate = () => { }, onTabActivate = () => { }, onTabClose = () => { }, onTabsMinimize = () => { }, onTabsMaximizable = () => { }, onTabsClose = () => { }, options = {}, locales = {}, }) {
164
+ if (content && render) {
165
+ throw new Error(`Only one property "render" or "content" can be set.`);
166
+ }
167
+ const { classes, cx } = useStyles();
168
+ const { scrollToTabSpace = 3, scrollByArrowsRepeat = 150, scrollByArrowsStep = 100 } = options;
169
+ const [tabsElement, setTabsElement] = useState(null);
170
+ const { enabled, canLeft, canRight, onLeft, onRight } = useScrollByButtons(tabsElement, scrollByArrowsRepeat, scrollByArrowsStep);
171
+ useChangeScroll(tabsElement);
172
+ useScrollToActive(tabsElement, active, enabled, scrollToTabSpace);
173
+ const { onTabsMinimizeHandler, onTabsCloseHandler, onTabCreateHandler, onTabsMaximizeHandler } = useTabsCallbacks(onTabCreate, onTabsMinimize, onTabsMaximizable, onTabsClose);
174
+ const { onTabActiveHandler, onTabCloseHandler } = useTabCallbacks(tabs, onTabActivate, onTabClose, onTabsClose);
175
+ const Content = content;
176
+ return (_jsxs("div", { className: cx(classes.root, className), children: [_jsxs("div", { className: cx(classes.tabs), children: [enabled && (_jsx("button", { className: cx(classes.leftButton, !canLeft && classes.disabled, TabsClasses.ButtonLeft), onMouseDown: onLeft, children: _jsx("span", { className: "gd-icon-navigateleft" }) })), _jsx("div", { className: cx(classes.tabsList, {
177
+ minimizable: minimizable,
178
+ closeable: closeable,
179
+ scrollable: enabled,
180
+ }), style: { width: TabMaxWidth * tabs.length }, ref: setTabsElement, children: tabs.map((tab, i) => (_jsx(Tab, { tab: tab, placeholder: locales.titlePlaceholder, active: active === i, last: i === tabs.length - 1, beforeActive: active - 1 === i, afterActive: active + 1 === i, onActive: onTabActiveHandler, onClose: onTabCloseHandler }, tab.id))) }), enabled && (_jsx("button", { className: cx(classes.rightButton, !canRight && classes.disabled, TabsClasses.ButtonRight), onMouseDown: onRight, children: _jsx("span", { className: "gd-icon-navigateright" }) })), creatable && (_jsxs(BubbleHoverTrigger, { showDelay: 0, hideDelay: 100, eventsOnBubble: true, className: classes.trigger, children: [_jsx("div", { className: cx(classes.controls), children: _jsx(Button, { iconLeft: "gd-icon-add", onClick: onTabCreateHandler, className: cx(classes.create, "gd-button-action", TabsClasses.ButtonNewTab) }) }), locales.createTooltip && (_jsx(Bubble, { className: cx("bubble-dark", "s-tabs-create-tooltip"), alignPoints: [{ align: "bc tr", offset: { x: 0, y: -5 } }], children: locales.createTooltip }))] })), _jsx("div", { className: cx(classes.filler) }), _jsx("div", { className: cx(classes.controls), children: _jsx(TabsControls, { maximized: maximized, minimizable: minimizable, maximizable: maximizable, closeable: closeable, onTabsClose: onTabsCloseHandler, onTabsMinimize: onTabsMinimizeHandler, onTabsMaximize: onTabsMaximizeHandler }) })] }), Content && tabs[active] && _jsx(Content, { tab: tabs[active] }), render && tabs[active] && render({ tab: tabs[active] })] }));
181
+ }
182
+ function TabsControls({ minimizable, maximizable, maximized, closeable, onTabsMinimize, onTabsMaximize, onTabsClose, }) {
183
+ const { classes, cx } = useStyles();
184
+ const controls = [
185
+ minimizable && (_jsx("button", { className: cx(classes.button, TabsClasses.ButtonMinimize), onClick: onTabsMinimize, children: _jsx(IconMinimize, { width: TabsIconSize, height: TabsIconSize }) }, "minimize")),
186
+ maximizable && (_jsx("button", { className: cx(classes.button, TabsClasses.ButtonMaximize), onClick: () => onTabsMaximize?.(!maximized), children: maximized ? (_jsx(IconContract, { width: TabsIconSize, height: TabsIconSize })) : (_jsx(IconExpand, { width: TabsIconSize, height: TabsIconSize })) }, "maximize")),
187
+ closeable && (_jsx("button", { className: cx(classes.button, TabsClasses.ButtonCloseTabs), onClick: onTabsClose, children: _jsx(IconClose, { width: TabsIconSize, height: TabsIconSize }) }, "close")),
188
+ ];
189
+ return (_jsx(_Fragment, { children: controls.filter(Boolean).reduce((prev, current, i) => {
190
+ if (i !== 0) {
191
+ return [...prev, _jsx("div", { className: cx(classes.divider, ButtonDivider) }, i), current];
192
+ }
193
+ return [...prev, current];
194
+ }, []) }));
195
+ }
@@ -0,0 +1,2 @@
1
+ export declare function useChangeScroll(element: HTMLElement | null): void;
2
+ //# sourceMappingURL=useChangeScroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChangeScroll.d.ts","sourceRoot":"","sources":["../../../../src/shared/Tabs/hooks/useChangeScroll.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAmBjE"}
@@ -0,0 +1,19 @@
1
+ // (C) 2022-2026 GoodData Corporation
2
+ import { useEffect } from "react";
3
+ export function useChangeScroll(element) {
4
+ useEffect(() => {
5
+ if (!element) {
6
+ return;
7
+ }
8
+ function transformScroll(event) {
9
+ if (!event.deltaY || !element) {
10
+ return;
11
+ }
12
+ element.scrollLeft += event.deltaY + event.deltaX;
13
+ event.preventDefault();
14
+ event.stopPropagation();
15
+ }
16
+ element.addEventListener("wheel", transformScroll);
17
+ return () => element.removeEventListener("wheel", transformScroll);
18
+ }, [element]);
19
+ }
@@ -0,0 +1,3 @@
1
+ import { type MouseEvent } from "react";
2
+ export declare function useMouseDownRepeat(timeout: number, onMouseDownHandler?: (e: MouseEvent) => void): (e: MouseEvent) => void;
3
+ //# sourceMappingURL=useMouseDownRepeat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMouseDownRepeat.d.ts","sourceRoot":"","sources":["../../../../src/shared/Tabs/hooks/useMouseDownRepeat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAA4C,MAAM,OAAO,CAAC;AAElF,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,MAAM,EACf,kBAAkB,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,GAC7C,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAkBzB"}
@@ -0,0 +1,43 @@
1
+ // (C) 2021-2026 GoodData Corporation
2
+ import { useCallback, useEffect, useRef, useState } from "react";
3
+ export function useMouseDownRepeat(timeout, onMouseDownHandler) {
4
+ const callback = useCallback((e) => onMouseDownHandler?.(e), [onMouseDownHandler]);
5
+ const [start, stop] = useInterval(callback, timeout);
6
+ useEffect(() => {
7
+ document.addEventListener("mouseup", stop);
8
+ return () => document.removeEventListener("mouseup", stop);
9
+ }, [stop]);
10
+ return useCallback((e) => {
11
+ start(e);
12
+ if (onMouseDownHandler) {
13
+ onMouseDownHandler(e);
14
+ }
15
+ }, [onMouseDownHandler, start]);
16
+ }
17
+ function useInterval(handler, timeout) {
18
+ const timer = useRef(-1);
19
+ const [start, setStart] = useState(false);
20
+ const [fnArgs, setArguments] = useState([]);
21
+ const clear = useCallback(() => {
22
+ window.clearInterval(timer.current);
23
+ }, []);
24
+ useEffect(() => {
25
+ if (start) {
26
+ timer.current = window.setInterval(() => handler(...fnArgs), timeout);
27
+ }
28
+ else {
29
+ clear();
30
+ }
31
+ return clear;
32
+ }, [clear, fnArgs, handler, start, timeout]);
33
+ return [
34
+ (...args) => {
35
+ setArguments(args);
36
+ setStart(true);
37
+ },
38
+ () => {
39
+ setStart(false);
40
+ clear();
41
+ },
42
+ ];
43
+ }
@@ -0,0 +1,9 @@
1
+ import { type MouseEvent } from "react";
2
+ export declare function useScrollByButtons(element: HTMLElement | null, timeout?: number, step?: number): {
3
+ enabled: boolean;
4
+ canLeft: boolean;
5
+ canRight: boolean;
6
+ onLeft: (e: MouseEvent) => void;
7
+ onRight: (e: MouseEvent) => void;
8
+ };
9
+ //# sourceMappingURL=useScrollByButtons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollByButtons.d.ts","sourceRoot":"","sources":["../../../../src/shared/Tabs/hooks/useScrollByButtons.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAA6C,MAAM,OAAO,CAAC;AAInF,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,OAAO,SAAM,EACb,IAAI,SAAM,GACX;IACC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CACpC,CAqBA"}
@@ -0,0 +1,76 @@
1
+ // (C) 2022-2026 GoodData Corporation
2
+ import { useCallback, useEffect, useMemo, useState } from "react";
3
+ import { useMouseDownRepeat } from "./useMouseDownRepeat.js";
4
+ export function useScrollByButtons(element, timeout = 150, step = 100) {
5
+ const { enabled, canLeft, canRight } = useChanged(element);
6
+ const changed = useScroll(element);
7
+ const onLeftHandler = useCallback(() => onMove(element, -step), [element, step]);
8
+ const onLeft = useMouseDownRepeat(timeout, onLeftHandler);
9
+ const onRightHandler = useCallback(() => onMove(element, step), [element, step]);
10
+ const onRight = useMouseDownRepeat(timeout, onRightHandler);
11
+ return useMemo(() => ({
12
+ enabled,
13
+ canLeft,
14
+ canRight,
15
+ onLeft,
16
+ onRight,
17
+ }),
18
+ // oxlint-disable-next-line react-hooks/exhaustive-deps
19
+ [enabled, canLeft, canRight, onLeft, onRight, changed]);
20
+ }
21
+ function useScroll(element) {
22
+ const [changed, setChanged] = useState("");
23
+ useEffect(() => {
24
+ if (!element) {
25
+ return;
26
+ }
27
+ const handler = (e) => setChanged(e.timeStamp + Math.random().toString(36));
28
+ element.addEventListener("scroll", handler);
29
+ return () => {
30
+ element.removeEventListener("scroll", handler);
31
+ };
32
+ }, [element]);
33
+ return changed;
34
+ }
35
+ function useChanged(element) {
36
+ const { offsetWidth = 0, scrollWidth = 0, scrollLeft = 0 } = element || {};
37
+ const [width, setWidth] = useState(offsetWidth);
38
+ const [contentWidth, setContentWidth] = useState(scrollWidth);
39
+ const enabled = contentWidth > width;
40
+ const canLeft = scrollLeft > 0;
41
+ const canRight = scrollLeft < contentWidth - width;
42
+ useEffect(() => {
43
+ let pointer;
44
+ const checkChange = () => {
45
+ const { offsetWidth = 0, scrollWidth = 0 } = element || {};
46
+ if (width !== offsetWidth) {
47
+ setWidth(offsetWidth);
48
+ }
49
+ if (contentWidth !== scrollWidth) {
50
+ setContentWidth(scrollWidth);
51
+ }
52
+ pointer = window.requestAnimationFrame(checkChange);
53
+ };
54
+ pointer = window.requestAnimationFrame(checkChange);
55
+ return () => window.cancelAnimationFrame(pointer);
56
+ }, [contentWidth, element, width]);
57
+ return {
58
+ enabled,
59
+ canLeft,
60
+ canRight,
61
+ };
62
+ }
63
+ function onMove(element, step) {
64
+ if (!element) {
65
+ return;
66
+ }
67
+ if (element.scrollBy) {
68
+ element.scrollBy({
69
+ left: step,
70
+ behavior: "smooth",
71
+ });
72
+ return;
73
+ }
74
+ //fallback for IE
75
+ element.scrollLeft += step;
76
+ }
@@ -0,0 +1,2 @@
1
+ export declare function useScrollToActive(element: HTMLElement | null, active: number, enabled: boolean, space?: number): void;
2
+ //# sourceMappingURL=useScrollToActive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useScrollToActive.d.ts","sourceRoot":"","sources":["../../../../src/shared/Tabs/hooks/useScrollToActive.ts"],"names":[],"mappings":"AAMA,wBAAgB,iBAAiB,CAC7B,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,KAAK,SAAI,GACV,IAAI,CA4BN"}
@@ -0,0 +1,36 @@
1
+ // (C) 2022-2026 GoodData Corporation
2
+ import { useEffect } from "react";
3
+ import { TabActive, TabRoot } from "../Tab.js";
4
+ export function useScrollToActive(element, active, enabled, space = 3) {
5
+ useEffect(() => {
6
+ if (!element) {
7
+ return;
8
+ }
9
+ const { offsetWidth, scrollLeft } = element;
10
+ const [start, end] = [scrollLeft, scrollLeft + offsetWidth];
11
+ const activeTab = element.querySelector(`.${TabRoot}.${TabActive}`);
12
+ if (!activeTab) {
13
+ return;
14
+ }
15
+ const isBefore = activeTab.offsetLeft < start;
16
+ const isAfter = activeTab.offsetLeft + activeTab.offsetWidth > end;
17
+ if (isBefore) {
18
+ scrollToLeft(element, activeTab, activeTab.offsetLeft - space);
19
+ }
20
+ if (isAfter) {
21
+ scrollToLeft(element, activeTab, activeTab.offsetLeft + activeTab.offsetWidth - offsetWidth + space);
22
+ }
23
+ }, [element, active, enabled, space]);
24
+ }
25
+ function scrollToLeft(element, activeTab, left) {
26
+ if (element.scrollTo) {
27
+ element.scrollTo({
28
+ left,
29
+ top: 0,
30
+ behavior: "smooth",
31
+ });
32
+ }
33
+ else {
34
+ activeTab.scrollIntoView({ behavior: "smooth", inline: "nearest", block: "nearest" });
35
+ }
36
+ }
@@ -0,0 +1,7 @@
1
+ import { type ITab } from "../Tab.js";
2
+ import { type ITabsProps } from "../Tabs.data.js";
3
+ export declare function useTabCallbacks<T>(tabs: Array<ITab<T>>, onTabActivate: NonNullable<ITabsProps<T>["onTabActivate"]>, onTabClose: NonNullable<ITabsProps<T>["onTabClose"]>, onTabsClose: NonNullable<ITabsProps<T>["onTabsClose"]>): {
4
+ onTabActiveHandler: (tab: ITab<T>) => void;
5
+ onTabCloseHandler: (tab: ITab<T>) => void;
6
+ };
7
+ //# sourceMappingURL=useTabCallbacks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTabCallbacks.d.ts","sourceRoot":"","sources":["../../../../src/shared/Tabs/hooks/useTabCallbacks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,wBAAgB,eAAe,CAAC,CAAC,EAC7B,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EACpB,aAAa,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,EAC1D,UAAU,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EACpD,WAAW,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,GACvD;IACC,kBAAkB,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC3C,iBAAiB,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC7C,CAgBA"}
@@ -0,0 +1,17 @@
1
+ // (C) 2022-2026 GoodData Corporation
2
+ import { useMemo } from "react";
3
+ export function useTabCallbacks(tabs, onTabActivate, onTabClose, onTabsClose) {
4
+ return useMemo(() => {
5
+ function onTabActiveHandler(tab) {
6
+ onTabActivate(tab);
7
+ }
8
+ function onTabCloseHandler(tab) {
9
+ if (tabs.length === 1) {
10
+ onTabsClose();
11
+ return;
12
+ }
13
+ onTabClose(tab);
14
+ }
15
+ return { onTabActiveHandler, onTabCloseHandler };
16
+ }, [onTabActivate, onTabClose, onTabsClose, tabs]);
17
+ }
@@ -0,0 +1,24 @@
1
+ import { type ITab } from "../Tab.js";
2
+ import { type ITabsProps } from "../Tabs.data.js";
3
+ export interface IUseTabsProps<T = undefined> {
4
+ tabs: Array<ITab<T>>;
5
+ active: number;
6
+ creatable?: ITabsProps<T>["creatable"];
7
+ onTabClose?: ITabsProps<T>["onTabClose"];
8
+ onBeforeTabClose?: (tab: ITab<T>, next: () => void) => void;
9
+ onTabActivate?: ITabsProps<T>["onTabActivate"];
10
+ onBeforeTabActivate?: (tab: ITab<T>, next: () => void) => void;
11
+ onTabAdd?: (tab: ITab<T>) => void;
12
+ onBeforeTabAdd?: (tab: ITab<T>, next: () => void) => void;
13
+ onTabUpdate?: (oldTab: ITab<T>, newTab: ITab<T>) => void;
14
+ }
15
+ export interface IUseTabsReturn<T> {
16
+ addTab: (tab: ITab<T>, index?: number) => void;
17
+ activateTab: (tab: ITab<T>) => void;
18
+ updateTab: (tab: ITab<T>, props: Partial<ITab<T>>) => void;
19
+ updateData: (tab: ITab<T>, data: T) => void;
20
+ closeTab: (tab: ITab<T>) => void;
21
+ tabsProps: IUseTabsProps<T>;
22
+ }
23
+ export declare function useTabs<T>(props: IUseTabsProps<T>): IUseTabsReturn<T>;
24
+ //# sourceMappingURL=useTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTabs.d.ts","sourceRoot":"","sources":["../../../../src/shared/Tabs/hooks/useTabs.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,SAAS;IACxC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC5D,aAAa,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAC/C,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC1D,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC5D;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAC7B,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACpC,SAAS,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC3D,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5C,QAAQ,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACjC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CAC/B;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CA2CrE"}
@@ -0,0 +1,130 @@
1
+ // (C) 2022-2026 GoodData Corporation
2
+ import { useCallback } from "react";
3
+ import { useProp } from "../../hooks/useProp.js";
4
+ const nextFn = nextInvoke();
5
+ export function useTabs(props) {
6
+ const [tabs, setTabs] = useProp(props.tabs);
7
+ const [active, setActive] = useProp(Math.min(props.active, props.tabs.length - 1));
8
+ const { onTabActivate, onTabClose, onTabAdd, onTabUpdate } = props;
9
+ const { creatable = true } = props;
10
+ const { onBeforeTabClose = nextFn, onBeforeTabActivate = nextFn, onBeforeTabAdd = nextFn } = props;
11
+ const activateTab = useCallback((tab) => activateTabHandler(tab, setActive, setTabs, onBeforeTabActivate, onTabActivate), [onBeforeTabActivate, onTabActivate, setActive, setTabs]);
12
+ const addTab = useCallback((tab, index = Number.MAX_SAFE_INTEGER) => addTabHandler(tab, index, creatable, setActive, setTabs, onBeforeTabAdd, onTabAdd), [creatable, onBeforeTabAdd, onTabAdd, setActive, setTabs]);
13
+ const closeTab = useCallback((tab) => removeTabHandler(tab, setActive, setTabs, onBeforeTabClose, onTabClose), [onBeforeTabClose, onTabClose, setActive, setTabs]);
14
+ const updateTab = useCallback((tab, newProps) => updateTabHandler(tab, newProps, setTabs, onTabUpdate), [onTabUpdate, setTabs]);
15
+ const updateData = useCallback((tab, data) => updateDataHandler(data, tab, setTabs, onTabUpdate), [onTabUpdate, setTabs]);
16
+ return {
17
+ activateTab,
18
+ addTab,
19
+ closeTab,
20
+ updateTab,
21
+ updateData,
22
+ tabsProps: {
23
+ tabs,
24
+ active,
25
+ creatable,
26
+ onTabClose: closeTab,
27
+ onTabActivate: activateTab,
28
+ },
29
+ };
30
+ }
31
+ function addTabHandler(tab, index, creatable, setActive, setTabs, onBeforeTabAdd, onTabAdd) {
32
+ if (!creatable) {
33
+ return;
34
+ }
35
+ onBeforeTabAdd(tab, () => setTabs((oldTabs) => {
36
+ const newTabs = oldTabs.slice();
37
+ newTabs.splice(index, 0, tab);
38
+ setActive(newTabs.indexOf(tab));
39
+ if (onTabAdd) {
40
+ onTabAdd(tab);
41
+ }
42
+ return newTabs;
43
+ }));
44
+ }
45
+ function removeTabHandler(tab, setActive, setTabs, onBeforeTabClose, onTabClose) {
46
+ if (!tab.options?.closeable) {
47
+ return;
48
+ }
49
+ setTabs((oldTabs) => {
50
+ const index = findIndex(tab, oldTabs);
51
+ const found = oldTabs[index];
52
+ if (!found) {
53
+ return oldTabs;
54
+ }
55
+ let shouldProceed = false;
56
+ onBeforeTabClose(found, () => {
57
+ shouldProceed = true;
58
+ });
59
+ if (!shouldProceed) {
60
+ return oldTabs;
61
+ }
62
+ setActive((oldActive) => index <= oldActive ? Math.max(oldActive - 1, 0) : Math.min(oldActive, oldTabs.length - 2));
63
+ if (onTabClose) {
64
+ onTabClose(found);
65
+ }
66
+ return oldTabs.filter((t) => t !== tab);
67
+ });
68
+ }
69
+ function updateTabHandler(tab, newProps, setTabs, onTabUpdate) {
70
+ setTabs((oldTabs) => {
71
+ const index = findIndex(tab, oldTabs);
72
+ if (index >= 0) {
73
+ const currentTab = oldTabs[index];
74
+ const newTab = { ...currentTab, ...newProps };
75
+ const newTabs = oldTabs.slice();
76
+ newTabs.splice(index, 1, newTab);
77
+ if (onTabUpdate) {
78
+ onTabUpdate(currentTab, newProps);
79
+ }
80
+ return newTabs;
81
+ }
82
+ return oldTabs;
83
+ });
84
+ }
85
+ function updateDataHandler(data, tab, setTabs, onTabUpdate) {
86
+ setTabs((oldTabs) => {
87
+ const index = findIndex(tab, oldTabs);
88
+ if (index >= 0) {
89
+ const oldTab = oldTabs[index];
90
+ const newTab = { ...oldTab, data };
91
+ const newTabs = oldTabs.slice();
92
+ newTabs[index] = newTab;
93
+ if (onTabUpdate) {
94
+ onTabUpdate(oldTab, { data });
95
+ }
96
+ return newTabs;
97
+ }
98
+ return oldTabs;
99
+ });
100
+ }
101
+ function activateTabHandler(tab, setActive, setTabs, onBeforeTabActivate, onTabActivate) {
102
+ setTabs((oldTabs) => {
103
+ const index = findIndex(tab, oldTabs);
104
+ const found = oldTabs[index];
105
+ if (!found) {
106
+ return oldTabs;
107
+ }
108
+ let shouldProceed = false;
109
+ onBeforeTabActivate(found, () => {
110
+ shouldProceed = true;
111
+ });
112
+ if (!shouldProceed) {
113
+ return oldTabs;
114
+ }
115
+ setActive(index);
116
+ if (onTabActivate) {
117
+ onTabActivate(found);
118
+ }
119
+ return oldTabs;
120
+ });
121
+ }
122
+ function findIndex(tab, tabs) {
123
+ const found = tabs
124
+ .map((current, i) => (current.id === tab.id ? i : null))
125
+ .filter((item) => item !== null);
126
+ return found.length ? found[0] : -1;
127
+ }
128
+ function nextInvoke() {
129
+ return (_, next) => next();
130
+ }
@@ -0,0 +1,8 @@
1
+ import { type ITabsProps } from "../Tabs.data.js";
2
+ export declare function useTabsCallbacks<T>(onTabCreate: NonNullable<ITabsProps<T>["onTabCreate"]>, onTabsMinimize: NonNullable<ITabsProps<T>["onTabsMinimize"]>, onTabsMaximizable: NonNullable<ITabsProps<T>["onTabsMaximizable"]>, onTabsClose: NonNullable<ITabsProps<T>["onTabsClose"]>): {
3
+ onTabCreateHandler: () => void;
4
+ onTabsMinimizeHandler: () => void;
5
+ onTabsMaximizeHandler: (state: boolean) => void;
6
+ onTabsCloseHandler: () => void;
7
+ };
8
+ //# sourceMappingURL=useTabsCallbacks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTabsCallbacks.d.ts","sourceRoot":"","sources":["../../../../src/shared/Tabs/hooks/useTabsCallbacks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,wBAAgB,gBAAgB,CAAC,CAAC,EAC9B,WAAW,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,EACtD,cAAc,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,EAC5D,iBAAiB,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,EAClE,WAAW,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,GACvD;IACC,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,qBAAqB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,kBAAkB,EAAE,MAAM,IAAI,CAAC;CAClC,CAoBA"}
@@ -0,0 +1,19 @@
1
+ // (C) 2022-2026 GoodData Corporation
2
+ import { useMemo } from "react";
3
+ export function useTabsCallbacks(onTabCreate, onTabsMinimize, onTabsMaximizable, onTabsClose) {
4
+ return useMemo(() => {
5
+ function onTabsMinimizeHandler() {
6
+ onTabsMinimize();
7
+ }
8
+ function onTabsMaximizeHandler(state) {
9
+ onTabsMaximizable(state);
10
+ }
11
+ function onTabsCloseHandler() {
12
+ onTabsClose();
13
+ }
14
+ function onTabCreateHandler() {
15
+ onTabCreate();
16
+ }
17
+ return { onTabCreateHandler, onTabsMinimizeHandler, onTabsMaximizeHandler, onTabsCloseHandler };
18
+ }, [onTabCreate, onTabsClose, onTabsMinimize, onTabsMaximizable]);
19
+ }
@@ -0,0 +1,8 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ export declare function Authentication({ children, Error, initOpenNotAuthenticatedOverlay, initOpenContractExpiredDialog, }: {
3
+ Error: (err: Error) => ReactElement;
4
+ initOpenNotAuthenticatedOverlay?: ((callback: (err: Error) => void) => void) | false;
5
+ initOpenContractExpiredDialog?: ((callback: (tier: string) => void) => void) | false;
6
+ children: ReactNode;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=Authentication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Authentication.d.ts","sourceRoot":"","sources":["../../../src/shared/authentication/Authentication.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAO/E,wBAAgB,cAAc,CAAC,EAC3B,QAAQ,EACR,KAAK,EACL,+BAA+B,EAC/B,6BAA6B,GAChC,EAAE;IACC,KAAK,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,YAAY,CAAC;IACpC,+BAA+B,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC;IACrF,6BAA6B,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC;IACrF,QAAQ,EAAE,SAAS,CAAC;CACvB,2CAwCA"}