@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.
- package/LICENSE +29 -0
- package/NOTICE +71721 -0
- package/README.md +13 -2
- package/esm/MaqlEditor/components/ExpandableTooltip.d.ts +50 -0
- package/esm/MaqlEditor/components/ExpandableTooltip.d.ts.map +1 -0
- package/esm/MaqlEditor/components/ExpandableTooltip.js +150 -0
- package/esm/MaqlEditor/components/ExpandableTooltipContext.d.ts +10 -0
- package/esm/MaqlEditor/components/ExpandableTooltipContext.d.ts.map +1 -0
- package/esm/MaqlEditor/components/ExpandableTooltipContext.js +17 -0
- package/esm/MaqlEditor/components/hooks/useExpandableTooltip.d.ts +3 -0
- package/esm/MaqlEditor/components/hooks/useExpandableTooltip.d.ts.map +1 -0
- package/esm/MaqlEditor/components/hooks/useExpandableTooltip.js +10 -0
- package/esm/MaqlEditor/components/hooks/useOutsideEvents.d.ts +10 -0
- package/esm/MaqlEditor/components/hooks/useOutsideEvents.d.ts.map +1 -0
- package/esm/MaqlEditor/components/hooks/useOutsideEvents.js +43 -0
- package/esm/MaqlEditor/components/hooks/useRePosition.d.ts +20 -0
- package/esm/MaqlEditor/components/hooks/useRePosition.d.ts.map +1 -0
- package/esm/MaqlEditor/components/hooks/useRePosition.js +108 -0
- package/esm/MaqlEditor/components/hooks/utils.d.ts +4 -0
- package/esm/MaqlEditor/components/hooks/utils.d.ts.map +1 -0
- package/esm/MaqlEditor/components/hooks/utils.js +18 -0
- package/esm/MaqlEditor/hooks/useAutoformat.d.ts +3 -0
- package/esm/MaqlEditor/hooks/useAutoformat.d.ts.map +1 -0
- package/esm/MaqlEditor/hooks/useAutoformat.js +15 -0
- package/esm/MaqlEditor/hooks/useCleanCallback.d.ts +4 -0
- package/esm/MaqlEditor/hooks/useCleanCallback.d.ts.map +1 -0
- package/esm/MaqlEditor/hooks/useCleanCallback.js +12 -0
- package/esm/MaqlEditor/hooks/useCodeTheme.d.ts +3 -0
- package/esm/MaqlEditor/hooks/useCodeTheme.d.ts.map +1 -0
- package/esm/MaqlEditor/hooks/useCodeTheme.js +48 -0
- package/esm/MaqlEditor/hooks/useCopyToClipboard.d.ts +3 -0
- package/esm/MaqlEditor/hooks/useCopyToClipboard.d.ts.map +1 -0
- package/esm/MaqlEditor/hooks/useCopyToClipboard.js +16 -0
- package/esm/MaqlEditor/hooks/useMountCallback.d.ts +13 -0
- package/esm/MaqlEditor/hooks/useMountCallback.d.ts.map +1 -0
- package/esm/MaqlEditor/hooks/useMountCallback.js +26 -0
- package/esm/MaqlEditor/hooks/useUpdateCallback.d.ts +19 -0
- package/esm/MaqlEditor/hooks/useUpdateCallback.d.ts.map +1 -0
- package/esm/MaqlEditor/hooks/useUpdateCallback.js +63 -0
- package/esm/MaqlEditor/hooks/useValueCallbacks.d.ts +6 -0
- package/esm/MaqlEditor/hooks/useValueCallbacks.d.ts.map +1 -0
- package/esm/MaqlEditor/hooks/useValueCallbacks.js +14 -0
- package/esm/MaqlEditor/languageService/LanguageServiceContext.d.ts +13 -0
- package/esm/MaqlEditor/languageService/LanguageServiceContext.d.ts.map +1 -0
- package/esm/MaqlEditor/languageService/LanguageServiceContext.js +20 -0
- package/esm/MaqlEditor/maql/MaqlEditor.d.ts +30 -0
- package/esm/MaqlEditor/maql/MaqlEditor.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/MaqlEditor.js +42 -0
- package/esm/MaqlEditor/maql/MaqlEditor.styles.d.ts +8 -0
- package/esm/MaqlEditor/maql/MaqlEditor.styles.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/MaqlEditor.styles.js +154 -0
- package/esm/MaqlEditor/maql/MaqlEditor.tooltip.d.ts +36 -0
- package/esm/MaqlEditor/maql/MaqlEditor.tooltip.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/MaqlEditor.tooltip.js +187 -0
- package/esm/MaqlEditor/maql/constants.d.ts +2 -0
- package/esm/MaqlEditor/maql/constants.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/constants.js +2 -0
- package/esm/MaqlEditor/maql/formatter.d.ts +6 -0
- package/esm/MaqlEditor/maql/formatter.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/formatter.js +14 -0
- package/esm/MaqlEditor/maql/hooks/hover/doHover.d.ts +12 -0
- package/esm/MaqlEditor/maql/hooks/hover/doHover.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/hover/doHover.js +126 -0
- package/esm/MaqlEditor/maql/hooks/hover/useHoverEvent.d.ts +4 -0
- package/esm/MaqlEditor/maql/hooks/hover/useHoverEvent.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/hover/useHoverEvent.js +32 -0
- package/esm/MaqlEditor/maql/hooks/useAutocomplete.d.ts +4 -0
- package/esm/MaqlEditor/maql/hooks/useAutocomplete.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useAutocomplete.js +60 -0
- package/esm/MaqlEditor/maql/hooks/useDecoration.d.ts +4 -0
- package/esm/MaqlEditor/maql/hooks/useDecoration.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useDecoration.js +73 -0
- package/esm/MaqlEditor/maql/hooks/useDocumentFormatting.d.ts +3 -0
- package/esm/MaqlEditor/maql/hooks/useDocumentFormatting.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useDocumentFormatting.js +29 -0
- package/esm/MaqlEditor/maql/hooks/useHover.d.ts +6 -0
- package/esm/MaqlEditor/maql/hooks/useHover.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useHover.js +77 -0
- package/esm/MaqlEditor/maql/hooks/useLanguageConfiguration.d.ts +4 -0
- package/esm/MaqlEditor/maql/hooks/useLanguageConfiguration.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useLanguageConfiguration.js +21 -0
- package/esm/MaqlEditor/maql/hooks/useLanguageService.d.ts +3 -0
- package/esm/MaqlEditor/maql/hooks/useLanguageService.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useLanguageService.js +21 -0
- package/esm/MaqlEditor/maql/hooks/useLanguageServiceInitializer.d.ts +4 -0
- package/esm/MaqlEditor/maql/hooks/useLanguageServiceInitializer.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useLanguageServiceInitializer.js +11 -0
- package/esm/MaqlEditor/maql/hooks/useMonaco.d.ts +21 -0
- package/esm/MaqlEditor/maql/hooks/useMonaco.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useMonaco.js +75 -0
- package/esm/MaqlEditor/maql/hooks/useSemanticHighlight.d.ts +4 -0
- package/esm/MaqlEditor/maql/hooks/useSemanticHighlight.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useSemanticHighlight.js +33 -0
- package/esm/MaqlEditor/maql/hooks/useSyntaxHighlight.d.ts +2 -0
- package/esm/MaqlEditor/maql/hooks/useSyntaxHighlight.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useSyntaxHighlight.js +28 -0
- package/esm/MaqlEditor/maql/hooks/useValidation.d.ts +4 -0
- package/esm/MaqlEditor/maql/hooks/useValidation.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/hooks/useValidation.js +56 -0
- package/esm/MaqlEditor/maql/utils.d.ts +4 -0
- package/esm/MaqlEditor/maql/utils.d.ts.map +1 -0
- package/esm/MaqlEditor/maql/utils.js +6 -0
- package/esm/MaqlEditor/mock/monaco-shim.d.ts +2 -0
- package/esm/MaqlEditor/mock/monaco-shim.d.ts.map +1 -0
- package/esm/MaqlEditor/mock/monaco-shim.js +36 -0
- package/esm/MaqlEditor/monaco/MonacoEditor.d.ts +49 -0
- package/esm/MaqlEditor/monaco/MonacoEditor.d.ts.map +1 -0
- package/esm/MaqlEditor/monaco/MonacoEditor.js +71 -0
- package/esm/MaqlEditor/monaco/MonacoEditor.styles.d.ts +47 -0
- package/esm/MaqlEditor/monaco/MonacoEditor.styles.d.ts.map +1 -0
- package/esm/MaqlEditor/monaco/MonacoEditor.styles.js +427 -0
- package/esm/MaqlEditor/monaco/hooks/useAutofocus.d.ts +3 -0
- package/esm/MaqlEditor/monaco/hooks/useAutofocus.d.ts.map +1 -0
- package/esm/MaqlEditor/monaco/hooks/useAutofocus.js +33 -0
- package/esm/MaqlEditor/monaco/hooks/useDefaultValue.d.ts +3 -0
- package/esm/MaqlEditor/monaco/hooks/useDefaultValue.d.ts.map +1 -0
- package/esm/MaqlEditor/monaco/hooks/useDefaultValue.js +14 -0
- package/esm/MaqlEditor/monaco/hooks/useEditorInit.d.ts +3 -0
- package/esm/MaqlEditor/monaco/hooks/useEditorInit.d.ts.map +1 -0
- package/esm/MaqlEditor/monaco/hooks/useEditorInit.js +84 -0
- package/esm/MaqlEditor/monaco/hooks/useEditorOptions.d.ts +3 -0
- package/esm/MaqlEditor/monaco/hooks/useEditorOptions.d.ts.map +1 -0
- package/esm/MaqlEditor/monaco/hooks/useEditorOptions.js +51 -0
- package/esm/MaqlEditor/monaco/hooks/useMonaco.d.ts +3 -0
- package/esm/MaqlEditor/monaco/hooks/useMonaco.d.ts.map +1 -0
- package/esm/MaqlEditor/monaco/hooks/useMonaco.js +24 -0
- package/esm/MaqlEditor/monaco/monacoContributions.d.ts +74 -0
- package/esm/MaqlEditor/monaco/monacoContributions.d.ts.map +1 -0
- package/esm/MaqlEditor/monaco/monacoContributions.js +88 -0
- package/esm/MaqlEditor/monaco/monacoWorkers.d.ts +12 -0
- package/esm/MaqlEditor/monaco/monacoWorkers.d.ts.map +1 -0
- package/esm/MaqlEditor/monaco/monacoWorkers.js +63 -0
- package/esm/MaqlEditor/sql/SqlEditor.d.ts +21 -0
- package/esm/MaqlEditor/sql/SqlEditor.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/SqlEditor.js +45 -0
- package/esm/MaqlEditor/sql/SqlEditor.styles.d.ts +3 -0
- package/esm/MaqlEditor/sql/SqlEditor.styles.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/SqlEditor.styles.js +3 -0
- package/esm/MaqlEditor/sql/constants.d.ts +2 -0
- package/esm/MaqlEditor/sql/constants.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/constants.js +2 -0
- package/esm/MaqlEditor/sql/formatter.d.ts +6 -0
- package/esm/MaqlEditor/sql/formatter.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/formatter.js +17 -0
- package/esm/MaqlEditor/sql/hooks/useDocumentFormatting.d.ts +2 -0
- package/esm/MaqlEditor/sql/hooks/useDocumentFormatting.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/hooks/useDocumentFormatting.js +26 -0
- package/esm/MaqlEditor/sql/hooks/useLanguageConfiguration.d.ts +4 -0
- package/esm/MaqlEditor/sql/hooks/useLanguageConfiguration.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/hooks/useLanguageConfiguration.js +29 -0
- package/esm/MaqlEditor/sql/hooks/useMonaco.d.ts +14 -0
- package/esm/MaqlEditor/sql/hooks/useMonaco.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/hooks/useMonaco.js +26 -0
- package/esm/MaqlEditor/sql/hooks/useSyntaxHighlight.d.ts +2 -0
- package/esm/MaqlEditor/sql/hooks/useSyntaxHighlight.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/hooks/useSyntaxHighlight.js +796 -0
- package/esm/MaqlEditor/sql/utils.d.ts +4 -0
- package/esm/MaqlEditor/sql/utils.d.ts.map +1 -0
- package/esm/MaqlEditor/sql/utils.js +6 -0
- package/esm/MaqlEditor/statusBar/SuggestionStatusBar.d.ts +9 -0
- package/esm/MaqlEditor/statusBar/SuggestionStatusBar.d.ts.map +1 -0
- package/esm/MaqlEditor/statusBar/SuggestionStatusBar.js +38 -0
- package/esm/MaqlEditor/theme/default.d.ts +204 -0
- package/esm/MaqlEditor/theme/default.d.ts.map +1 -0
- package/esm/MaqlEditor/theme/default.js +223 -0
- package/esm/MaqlEditor/theme/styles.d.ts +411 -0
- package/esm/MaqlEditor/theme/styles.d.ts.map +1 -0
- package/esm/MaqlEditor/theme/styles.js +5 -0
- package/esm/MaqlEditor/theme/theme.d.ts +206 -0
- package/esm/MaqlEditor/theme/theme.d.ts.map +1 -0
- package/esm/MaqlEditor/theme/theme.js +9 -0
- package/esm/MetricComponent/ConflictContext/ConflictContext.d.ts +9 -0
- package/esm/MetricComponent/ConflictContext/ConflictContext.d.ts.map +1 -0
- package/esm/MetricComponent/ConflictContext/ConflictContext.js +9 -0
- package/esm/MetricComponent/ConflictContext/useConflictDetection.d.ts +8 -0
- package/esm/MetricComponent/ConflictContext/useConflictDetection.d.ts.map +1 -0
- package/esm/MetricComponent/ConflictContext/useConflictDetection.js +48 -0
- package/esm/MetricComponent/Content/EditMetricContent.d.ts +3 -0
- package/esm/MetricComponent/Content/EditMetricContent.d.ts.map +1 -0
- package/esm/MetricComponent/Content/EditMetricContent.data.d.ts +52 -0
- package/esm/MetricComponent/Content/EditMetricContent.data.d.ts.map +1 -0
- package/esm/MetricComponent/Content/EditMetricContent.data.js +12 -0
- package/esm/MetricComponent/Content/EditMetricContent.events.d.ts +9 -0
- package/esm/MetricComponent/Content/EditMetricContent.events.d.ts.map +1 -0
- package/esm/MetricComponent/Content/EditMetricContent.events.js +21 -0
- package/esm/MetricComponent/Content/EditMetricContent.js +27 -0
- package/esm/MetricComponent/DeleteMetric.d.ts +12 -0
- package/esm/MetricComponent/DeleteMetric.d.ts.map +1 -0
- package/esm/MetricComponent/DeleteMetric.events.d.ts +10 -0
- package/esm/MetricComponent/DeleteMetric.events.d.ts.map +1 -0
- package/esm/MetricComponent/DeleteMetric.events.js +24 -0
- package/esm/MetricComponent/DeleteMetric.js +8 -0
- package/esm/MetricComponent/DeleteMetricConfirmDialog/DeleteMetricConfirmDialog.d.ts +6 -0
- package/esm/MetricComponent/DeleteMetricConfirmDialog/DeleteMetricConfirmDialog.d.ts.map +1 -0
- package/esm/MetricComponent/DeleteMetricConfirmDialog/DeleteMetricConfirmDialog.js +19 -0
- package/esm/MetricComponent/EditMetric.d.ts +48 -0
- package/esm/MetricComponent/EditMetric.d.ts.map +1 -0
- package/esm/MetricComponent/EditMetric.events.d.ts +16 -0
- package/esm/MetricComponent/EditMetric.events.d.ts.map +1 -0
- package/esm/MetricComponent/EditMetric.events.js +55 -0
- package/esm/MetricComponent/EditMetric.js +30 -0
- package/esm/MetricComponent/FeaturesAndSettings/index.d.ts +18 -0
- package/esm/MetricComponent/FeaturesAndSettings/index.d.ts.map +1 -0
- package/esm/MetricComponent/FeaturesAndSettings/index.js +25 -0
- package/esm/MetricComponent/Form/CloseButton/CloseButton.d.ts +6 -0
- package/esm/MetricComponent/Form/CloseButton/CloseButton.d.ts.map +1 -0
- package/esm/MetricComponent/Form/CloseButton/CloseButton.js +14 -0
- package/esm/MetricComponent/Form/EditMetricCenterForm.d.ts +15 -0
- package/esm/MetricComponent/Form/EditMetricCenterForm.d.ts.map +1 -0
- package/esm/MetricComponent/Form/EditMetricCenterForm.js +157 -0
- package/esm/MetricComponent/Form/EditMetricContentForm.d.ts +45 -0
- package/esm/MetricComponent/Form/EditMetricContentForm.d.ts.map +1 -0
- package/esm/MetricComponent/Form/EditMetricContentForm.events.d.ts +13 -0
- package/esm/MetricComponent/Form/EditMetricContentForm.events.d.ts.map +1 -0
- package/esm/MetricComponent/Form/EditMetricContentForm.events.js +32 -0
- package/esm/MetricComponent/Form/EditMetricContentForm.js +106 -0
- package/esm/MetricComponent/Form/EditableRow/EditableRow.d.ts +16 -0
- package/esm/MetricComponent/Form/EditableRow/EditableRow.d.ts.map +1 -0
- package/esm/MetricComponent/Form/EditableRow/EditableRow.js +82 -0
- package/esm/MetricComponent/Form/EditableRow/EditableRowError.d.ts +13 -0
- package/esm/MetricComponent/Form/EditableRow/EditableRowError.d.ts.map +1 -0
- package/esm/MetricComponent/Form/EditableRow/EditableRowError.js +5 -0
- package/esm/MetricComponent/Form/EditableRow/InlineEditableValue.d.ts +27 -0
- package/esm/MetricComponent/Form/EditableRow/InlineEditableValue.d.ts.map +1 -0
- package/esm/MetricComponent/Form/EditableRow/InlineEditableValue.js +125 -0
- package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.d.ts +9 -0
- package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.events.d.ts +7 -0
- package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.events.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.events.js +11 -0
- package/esm/MetricComponent/Form/Footer/EditMetricContentFooter.js +63 -0
- package/esm/MetricComponent/Form/Footer/EditMetricSaveMessage.d.ts +8 -0
- package/esm/MetricComponent/Form/Footer/EditMetricSaveMessage.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Footer/EditMetricSaveMessage.js +22 -0
- package/esm/MetricComponent/Form/Header/EditMetricContentHeader.d.ts +28 -0
- package/esm/MetricComponent/Form/Header/EditMetricContentHeader.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/EditMetricContentHeader.events.d.ts +7 -0
- package/esm/MetricComponent/Form/Header/EditMetricContentHeader.events.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/EditMetricContentHeader.events.js +11 -0
- package/esm/MetricComponent/Form/Header/EditMetricContentHeader.js +48 -0
- package/esm/MetricComponent/Form/Header/LockedBubble.d.ts +3 -0
- package/esm/MetricComponent/Form/Header/LockedBubble.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/LockedBubble.js +14 -0
- package/esm/MetricComponent/Form/Header/MetricDescriptionField.d.ts +10 -0
- package/esm/MetricComponent/Form/Header/MetricDescriptionField.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/MetricDescriptionField.js +24 -0
- package/esm/MetricComponent/Form/Header/MetricIdField.d.ts +9 -0
- package/esm/MetricComponent/Form/Header/MetricIdField.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/MetricIdField.js +80 -0
- package/esm/MetricComponent/Form/Header/MetricTagsField.d.ts +8 -0
- package/esm/MetricComponent/Form/Header/MetricTagsField.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/MetricTagsField.js +61 -0
- package/esm/MetricComponent/Form/Header/MetricTitleField.d.ts +8 -0
- package/esm/MetricComponent/Form/Header/MetricTitleField.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/MetricTitleField.js +40 -0
- package/esm/MetricComponent/Form/Header/MetricTypeField.d.ts +8 -0
- package/esm/MetricComponent/Form/Header/MetricTypeField.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/MetricTypeField.js +42 -0
- package/esm/MetricComponent/Form/Header/Usage/Usage.d.ts +13 -0
- package/esm/MetricComponent/Form/Header/Usage/Usage.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/Usage/Usage.js +68 -0
- package/esm/MetricComponent/Form/Header/Usage/UsageItems.d.ts +11 -0
- package/esm/MetricComponent/Form/Header/Usage/UsageItems.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/Usage/UsageItems.js +88 -0
- package/esm/MetricComponent/Form/Header/Usage/UsagesOverlay.d.ts +17 -0
- package/esm/MetricComponent/Form/Header/Usage/UsagesOverlay.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/Usage/UsagesOverlay.js +119 -0
- package/esm/MetricComponent/Form/Header/share/MetricAccessChip.d.ts +9 -0
- package/esm/MetricComponent/Form/Header/share/MetricAccessChip.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/share/MetricAccessChip.js +39 -0
- package/esm/MetricComponent/Form/Header/share/MetricShare.d.ts +17 -0
- package/esm/MetricComponent/Form/Header/share/MetricShare.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/share/MetricShare.js +36 -0
- package/esm/MetricComponent/Form/Header/share/useApplyMetricAccess.d.ts +10 -0
- package/esm/MetricComponent/Form/Header/share/useApplyMetricAccess.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Header/share/useApplyMetricAccess.js +39 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorEditor.d.ts +11 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorEditor.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorEditor.js +128 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.d.ts +9 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.events.d.ts +11 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.events.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.events.js +25 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorField.js +68 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorHeader.d.ts +14 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorHeader.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlEditorField/MaqlEditorHeader.js +84 -0
- package/esm/MetricComponent/Form/MaqlEditorField/suggestionDetailsFunctions.d.ts +3 -0
- package/esm/MetricComponent/Form/MaqlEditorField/suggestionDetailsFunctions.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlEditorField/suggestionDetailsFunctions.js +57 -0
- package/esm/MetricComponent/Form/MaqlEditorUtils/Placeholder.d.ts +8 -0
- package/esm/MetricComponent/Form/MaqlEditorUtils/Placeholder.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlEditorUtils/Placeholder.js +72 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlResult.d.ts +19 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlResult.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlResult.js +144 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlResultHeader.d.ts +23 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlResultHeader.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlResultHeader.js +54 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlSql.d.ts +8 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlSql.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlSql.js +54 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlSqlHeader.d.ts +10 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlSqlHeader.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlResult/MaqlSqlHeader.js +46 -0
- package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelect.d.ts +15 -0
- package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelect.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelect.js +171 -0
- package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelectItem.d.ts +10 -0
- package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelectItem.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlResult/components/AttributesSelectItem.js +23 -0
- package/esm/MetricComponent/Form/MaqlResult/components/LimitSelect.d.ts +11 -0
- package/esm/MetricComponent/Form/MaqlResult/components/LimitSelect.d.ts.map +1 -0
- package/esm/MetricComponent/Form/MaqlResult/components/LimitSelect.js +134 -0
- package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.d.ts +10 -0
- package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.d.ts.map +1 -0
- package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.events.d.ts +7 -0
- package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.events.d.ts.map +1 -0
- package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.events.js +12 -0
- package/esm/MetricComponent/Form/NumberFormat/EditMetricContentNumberFormat.js +83 -0
- package/esm/MetricComponent/Form/OtherMetrics/OtherMetricsContext.d.ts +13 -0
- package/esm/MetricComponent/Form/OtherMetrics/OtherMetricsContext.d.ts.map +1 -0
- package/esm/MetricComponent/Form/OtherMetrics/OtherMetricsContext.js +23 -0
- package/esm/MetricComponent/Form/OtherMetrics/useOtherMetrics.d.ts +3 -0
- package/esm/MetricComponent/Form/OtherMetrics/useOtherMetrics.d.ts.map +1 -0
- package/esm/MetricComponent/Form/OtherMetrics/useOtherMetrics.js +6 -0
- package/esm/MetricComponent/Form/PartHeader/PartHeader.d.ts +20 -0
- package/esm/MetricComponent/Form/PartHeader/PartHeader.d.ts.map +1 -0
- package/esm/MetricComponent/Form/PartHeader/PartHeader.js +90 -0
- package/esm/MetricComponent/Form/PartHeader/PartHeaderButton.d.ts +16 -0
- package/esm/MetricComponent/Form/PartHeader/PartHeaderButton.d.ts.map +1 -0
- package/esm/MetricComponent/Form/PartHeader/PartHeaderButton.js +29 -0
- package/esm/MetricComponent/Form/Prefixes/PrefixesContext.d.ts +12 -0
- package/esm/MetricComponent/Form/Prefixes/PrefixesContext.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Prefixes/PrefixesContext.js +10 -0
- package/esm/MetricComponent/Form/Prefixes/usePrefixes.d.ts +3 -0
- package/esm/MetricComponent/Form/Prefixes/usePrefixes.d.ts.map +1 -0
- package/esm/MetricComponent/Form/Prefixes/usePrefixes.js +6 -0
- package/esm/MetricComponent/Form/TestingFormProvider.d.ts +10 -0
- package/esm/MetricComponent/Form/TestingFormProvider.d.ts.map +1 -0
- package/esm/MetricComponent/Form/TestingFormProvider.js +7 -0
- package/esm/MetricComponent/Form/attribute.d.ts +3 -0
- package/esm/MetricComponent/Form/attribute.d.ts.map +1 -0
- package/esm/MetricComponent/Form/attribute.js +9 -0
- package/esm/MetricComponent/Form/data.d.ts +23 -0
- package/esm/MetricComponent/Form/data.d.ts.map +1 -0
- package/esm/MetricComponent/Form/data.js +12 -0
- package/esm/MetricComponent/Form/hooks/useCatalog.d.ts +9 -0
- package/esm/MetricComponent/Form/hooks/useCatalog.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useCatalog.js +72 -0
- package/esm/MetricComponent/Form/hooks/useExecute.d.ts +14 -0
- package/esm/MetricComponent/Form/hooks/useExecute.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useExecute.js +26 -0
- package/esm/MetricComponent/Form/hooks/useExplain.d.ts +10 -0
- package/esm/MetricComponent/Form/hooks/useExplain.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useExplain.js +50 -0
- package/esm/MetricComponent/Form/hooks/useInvalidFocus.d.ts +5 -0
- package/esm/MetricComponent/Form/hooks/useInvalidFocus.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useInvalidFocus.js +20 -0
- package/esm/MetricComponent/Form/hooks/useMetricFormField.d.ts +10 -0
- package/esm/MetricComponent/Form/hooks/useMetricFormField.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useMetricFormField.js +16 -0
- package/esm/MetricComponent/Form/hooks/useMetricFormStatus.d.ts +5 -0
- package/esm/MetricComponent/Form/hooks/useMetricFormStatus.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useMetricFormStatus.js +5 -0
- package/esm/MetricComponent/Form/hooks/useMetricFormatState.d.ts +41 -0
- package/esm/MetricComponent/Form/hooks/useMetricFormatState.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useMetricFormatState.js +50 -0
- package/esm/MetricComponent/Form/hooks/useMetricValidation.d.ts +11 -0
- package/esm/MetricComponent/Form/hooks/useMetricValidation.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useMetricValidation.js +53 -0
- package/esm/MetricComponent/Form/hooks/useTitleExistsCheck.d.ts +2 -0
- package/esm/MetricComponent/Form/hooks/useTitleExistsCheck.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useTitleExistsCheck.js +19 -0
- package/esm/MetricComponent/Form/hooks/useToggleWithCollapse.d.ts +4 -0
- package/esm/MetricComponent/Form/hooks/useToggleWithCollapse.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useToggleWithCollapse.js +16 -0
- package/esm/MetricComponent/Form/hooks/useUniqIdGenerator.d.ts +2 -0
- package/esm/MetricComponent/Form/hooks/useUniqIdGenerator.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useUniqIdGenerator.js +48 -0
- package/esm/MetricComponent/Form/hooks/useValidationScheme.d.ts +10 -0
- package/esm/MetricComponent/Form/hooks/useValidationScheme.d.ts.map +1 -0
- package/esm/MetricComponent/Form/hooks/useValidationScheme.js +17 -0
- package/esm/MetricComponent/Form/inlineMeasure.d.ts +3 -0
- package/esm/MetricComponent/Form/inlineMeasure.d.ts.map +1 -0
- package/esm/MetricComponent/Form/inlineMeasure.js +11 -0
- package/esm/MetricComponent/Form/maqlFieldFunctions.d.ts +17 -0
- package/esm/MetricComponent/Form/maqlFieldFunctions.d.ts.map +1 -0
- package/esm/MetricComponent/Form/maqlFieldFunctions.js +43 -0
- package/esm/MetricComponent/Form/validationSchema.d.ts +12 -0
- package/esm/MetricComponent/Form/validationSchema.d.ts.map +1 -0
- package/esm/MetricComponent/Form/validationSchema.js +123 -0
- package/esm/MetricComponent/IdChangeConfirmDialog/IdChangeConfirmDialog.d.ts +15 -0
- package/esm/MetricComponent/IdChangeConfirmDialog/IdChangeConfirmDialog.d.ts.map +1 -0
- package/esm/MetricComponent/IdChangeConfirmDialog/IdChangeConfirmDialog.js +75 -0
- package/esm/MetricComponent/ManageMetric.d.ts +38 -0
- package/esm/MetricComponent/ManageMetric.d.ts.map +1 -0
- package/esm/MetricComponent/ManageMetric.js +29 -0
- package/esm/MetricComponent/ManageMetrics.d.ts +23 -0
- package/esm/MetricComponent/ManageMetrics.d.ts.map +1 -0
- package/esm/MetricComponent/ManageMetrics.js +32 -0
- package/esm/MetricComponent/MetricService.d.ts +7 -0
- package/esm/MetricComponent/MetricService.d.ts.map +1 -0
- package/esm/MetricComponent/MetricService.js +7 -0
- package/esm/MetricComponent/MetricState/TabContent.d.ts +37 -0
- package/esm/MetricComponent/MetricState/TabContent.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/TabContent.js +21 -0
- package/esm/MetricComponent/MetricState/hooks/useChangeIdDialog.d.ts +23 -0
- package/esm/MetricComponent/MetricState/hooks/useChangeIdDialog.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useChangeIdDialog.js +68 -0
- package/esm/MetricComponent/MetricState/hooks/useDirtyChanged.d.ts +4 -0
- package/esm/MetricComponent/MetricState/hooks/useDirtyChanged.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useDirtyChanged.js +16 -0
- package/esm/MetricComponent/MetricState/hooks/useOnChangeCallback.d.ts +17 -0
- package/esm/MetricComponent/MetricState/hooks/useOnChangeCallback.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useOnChangeCallback.js +41 -0
- package/esm/MetricComponent/MetricState/hooks/useOnDeleteCallback.d.ts +5 -0
- package/esm/MetricComponent/MetricState/hooks/useOnDeleteCallback.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useOnDeleteCallback.js +9 -0
- package/esm/MetricComponent/MetricState/hooks/useOnSaveCallback.d.ts +6 -0
- package/esm/MetricComponent/MetricState/hooks/useOnSaveCallback.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useOnSaveCallback.js +9 -0
- package/esm/MetricComponent/MetricState/hooks/useSaveTab.d.ts +9 -0
- package/esm/MetricComponent/MetricState/hooks/useSaveTab.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useSaveTab.js +93 -0
- package/esm/MetricComponent/MetricState/hooks/useTabsData.d.ts +16 -0
- package/esm/MetricComponent/MetricState/hooks/useTabsData.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useTabsData.js +62 -0
- package/esm/MetricComponent/MetricState/hooks/useUnsavedChanges.d.ts +17 -0
- package/esm/MetricComponent/MetricState/hooks/useUnsavedChanges.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useUnsavedChanges.js +86 -0
- package/esm/MetricComponent/MetricState/hooks/useUpdateMetricData.d.ts +5 -0
- package/esm/MetricComponent/MetricState/hooks/useUpdateMetricData.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useUpdateMetricData.js +10 -0
- package/esm/MetricComponent/MetricState/hooks/useUpdateMetricTab.d.ts +6 -0
- package/esm/MetricComponent/MetricState/hooks/useUpdateMetricTab.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/hooks/useUpdateMetricTab.js +17 -0
- package/esm/MetricComponent/MetricState/metricState.data.d.ts +37 -0
- package/esm/MetricComponent/MetricState/metricState.data.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/metricState.data.js +13 -0
- package/esm/MetricComponent/MetricState/useMetricState.d.ts +27 -0
- package/esm/MetricComponent/MetricState/useMetricState.d.ts.map +1 -0
- package/esm/MetricComponent/MetricState/useMetricState.js +127 -0
- package/esm/MetricComponent/MetricsContext/MetricsContext.d.ts +11 -0
- package/esm/MetricComponent/MetricsContext/MetricsContext.d.ts.map +1 -0
- package/esm/MetricComponent/MetricsContext/MetricsContext.js +14 -0
- package/esm/MetricComponent/MetricsContext/useMetricsContext.d.ts +3 -0
- package/esm/MetricComponent/MetricsContext/useMetricsContext.d.ts.map +1 -0
- package/esm/MetricComponent/MetricsContext/useMetricsContext.js +6 -0
- package/esm/MetricComponent/MetricsState.d.ts +39 -0
- package/esm/MetricComponent/MetricsState.d.ts.map +1 -0
- package/esm/MetricComponent/MetricsState.js +73 -0
- package/esm/MetricComponent/MinimizedMetricComponent/MinimizedMetricComponent.d.ts +12 -0
- package/esm/MetricComponent/MinimizedMetricComponent/MinimizedMetricComponent.d.ts.map +1 -0
- package/esm/MetricComponent/MinimizedMetricComponent/MinimizedMetricComponent.js +110 -0
- package/esm/MetricComponent/MinimizedMetrics.d.ts +10 -0
- package/esm/MetricComponent/MinimizedMetrics.d.ts.map +1 -0
- package/esm/MetricComponent/MinimizedMetrics.js +19 -0
- package/esm/MetricComponent/MultipleMetricsState.d.ts +61 -0
- package/esm/MetricComponent/MultipleMetricsState.d.ts.map +1 -0
- package/esm/MetricComponent/MultipleMetricsState.js +53 -0
- package/esm/MetricComponent/UnsavedChangesConfirmDialog/UnsavedChangesConfirmDialog.d.ts +14 -0
- package/esm/MetricComponent/UnsavedChangesConfirmDialog/UnsavedChangesConfirmDialog.d.ts.map +1 -0
- package/esm/MetricComponent/UnsavedChangesConfirmDialog/UnsavedChangesConfirmDialog.js +52 -0
- package/esm/MetricComponent/hooks/useDeleteCallbacks.d.ts +7 -0
- package/esm/MetricComponent/hooks/useDeleteCallbacks.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useDeleteCallbacks.js +52 -0
- package/esm/MetricComponent/hooks/useDirtyChanged.d.ts +2 -0
- package/esm/MetricComponent/hooks/useDirtyChanged.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useDirtyChanged.js +10 -0
- package/esm/MetricComponent/hooks/useEditCallbacks.d.ts +23 -0
- package/esm/MetricComponent/hooks/useEditCallbacks.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useEditCallbacks.js +107 -0
- package/esm/MetricComponent/hooks/useFocusedField.d.ts +4 -0
- package/esm/MetricComponent/hooks/useFocusedField.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useFocusedField.js +9 -0
- package/esm/MetricComponent/hooks/useIdCallbacks.d.ts +22 -0
- package/esm/MetricComponent/hooks/useIdCallbacks.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useIdCallbacks.js +46 -0
- package/esm/MetricComponent/hooks/useInitialValueMetric.d.ts +4 -0
- package/esm/MetricComponent/hooks/useInitialValueMetric.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useInitialValueMetric.js +12 -0
- package/esm/MetricComponent/hooks/useInitialValues.d.ts +3 -0
- package/esm/MetricComponent/hooks/useInitialValues.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useInitialValues.js +13 -0
- package/esm/MetricComponent/hooks/useMetricContentState.d.ts +38 -0
- package/esm/MetricComponent/hooks/useMetricContentState.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useMetricContentState.js +73 -0
- package/esm/MetricComponent/hooks/useMetricDelete.d.ts +3 -0
- package/esm/MetricComponent/hooks/useMetricDelete.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useMetricDelete.js +14 -0
- package/esm/MetricComponent/hooks/useMetricSave.d.ts +4 -0
- package/esm/MetricComponent/hooks/useMetricSave.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useMetricSave.js +52 -0
- package/esm/MetricComponent/hooks/useMetricUsage.d.ts +8 -0
- package/esm/MetricComponent/hooks/useMetricUsage.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useMetricUsage.js +21 -0
- package/esm/MetricComponent/hooks/useOnCloseOrCancel.d.ts +7 -0
- package/esm/MetricComponent/hooks/useOnCloseOrCancel.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useOnCloseOrCancel.js +26 -0
- package/esm/MetricComponent/hooks/useOnSaveUnchanged.d.ts +12 -0
- package/esm/MetricComponent/hooks/useOnSaveUnchanged.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useOnSaveUnchanged.js +30 -0
- package/esm/MetricComponent/hooks/useSaveAsClick.d.ts +6 -0
- package/esm/MetricComponent/hooks/useSaveAsClick.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useSaveAsClick.js +62 -0
- package/esm/MetricComponent/hooks/useSaveClick.d.ts +11 -0
- package/esm/MetricComponent/hooks/useSaveClick.d.ts.map +1 -0
- package/esm/MetricComponent/hooks/useSaveClick.js +47 -0
- package/esm/MetricComponent/metric/deleteInfo.d.ts +6 -0
- package/esm/MetricComponent/metric/deleteInfo.d.ts.map +1 -0
- package/esm/MetricComponent/metric/deleteInfo.js +6 -0
- package/esm/MetricComponent/metric/emptyMetric.d.ts +8 -0
- package/esm/MetricComponent/metric/emptyMetric.d.ts.map +1 -0
- package/esm/MetricComponent/metric/emptyMetric.js +13 -0
- package/esm/MetricComponent/metric/idChangeHelper.d.ts +5 -0
- package/esm/MetricComponent/metric/idChangeHelper.d.ts.map +1 -0
- package/esm/MetricComponent/metric/idChangeHelper.js +11 -0
- package/esm/MetricComponent/metric/idValidator.d.ts +3 -0
- package/esm/MetricComponent/metric/idValidator.d.ts.map +1 -0
- package/esm/MetricComponent/metric/idValidator.js +5 -0
- package/esm/MetricComponent/metric/metricHelpers.d.ts +29 -0
- package/esm/MetricComponent/metric/metricHelpers.d.ts.map +1 -0
- package/esm/MetricComponent/metric/metricHelpers.js +114 -0
- package/esm/MetricComponent/metric/nameGenerators.d.ts +13 -0
- package/esm/MetricComponent/metric/nameGenerators.d.ts.map +1 -0
- package/esm/MetricComponent/metric/nameGenerators.js +63 -0
- package/esm/MetricComponent/metric/prefixHelper.d.ts +7 -0
- package/esm/MetricComponent/metric/prefixHelper.d.ts.map +1 -0
- package/esm/MetricComponent/metric/prefixHelper.js +43 -0
- package/esm/MetricComponent/metric/saveInfo.d.ts +13 -0
- package/esm/MetricComponent/metric/saveInfo.d.ts.map +1 -0
- package/esm/MetricComponent/metric/saveInfo.js +10 -0
- package/esm/MetricComponent/metric/transformer.d.ts +5 -0
- package/esm/MetricComponent/metric/transformer.d.ts.map +1 -0
- package/esm/MetricComponent/metric/transformer.js +17 -0
- package/esm/index.d.ts +41 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +35 -0
- package/esm/shared/Form/Form.d.ts +25 -0
- package/esm/shared/Form/Form.d.ts.map +1 -0
- package/esm/shared/Form/Form.js +48 -0
- package/esm/shared/Form/FormApi.d.ts +8 -0
- package/esm/shared/Form/FormApi.d.ts.map +1 -0
- package/esm/shared/Form/FormApi.js +14 -0
- package/esm/shared/Form/FormContext.d.ts +52 -0
- package/esm/shared/Form/FormContext.d.ts.map +1 -0
- package/esm/shared/Form/FormContext.js +50 -0
- package/esm/shared/Form/data.d.ts +5 -0
- package/esm/shared/Form/data.d.ts.map +1 -0
- package/esm/shared/Form/data.js +6 -0
- package/esm/shared/Form/hooks/useChanged.d.ts +5 -0
- package/esm/shared/Form/hooks/useChanged.d.ts.map +1 -0
- package/esm/shared/Form/hooks/useChanged.js +14 -0
- package/esm/shared/Form/hooks/useDirty.d.ts +3 -0
- package/esm/shared/Form/hooks/useDirty.d.ts.map +1 -0
- package/esm/shared/Form/hooks/useDirty.js +9 -0
- package/esm/shared/Form/hooks/useFormHandlersInternal.d.ts +12 -0
- package/esm/shared/Form/hooks/useFormHandlersInternal.d.ts.map +1 -0
- package/esm/shared/Form/hooks/useFormHandlersInternal.js +16 -0
- package/esm/shared/Form/hooks/useFormState.d.ts +4 -0
- package/esm/shared/Form/hooks/useFormState.d.ts.map +1 -0
- package/esm/shared/Form/hooks/useFormState.js +33 -0
- package/esm/shared/Form/hooks/useFormStatusInternal.d.ts +32 -0
- package/esm/shared/Form/hooks/useFormStatusInternal.d.ts.map +1 -0
- package/esm/shared/Form/hooks/useFormStatusInternal.js +34 -0
- package/esm/shared/Form/hooks/useInvalidFocusField.d.ts +3 -0
- package/esm/shared/Form/hooks/useInvalidFocusField.d.ts.map +1 -0
- package/esm/shared/Form/hooks/useInvalidFocusField.js +8 -0
- package/esm/shared/Form/hooks/useMutations.d.ts +4 -0
- package/esm/shared/Form/hooks/useMutations.d.ts.map +1 -0
- package/esm/shared/Form/hooks/useMutations.js +97 -0
- package/esm/shared/Form/hooks/useRealFocus.d.ts +5 -0
- package/esm/shared/Form/hooks/useRealFocus.d.ts.map +1 -0
- package/esm/shared/Form/hooks/useRealFocus.js +38 -0
- package/esm/shared/Form/useFormChanged.d.ts +2 -0
- package/esm/shared/Form/useFormChanged.d.ts.map +1 -0
- package/esm/shared/Form/useFormChanged.js +12 -0
- package/esm/shared/Form/useFormDefaults.d.ts +2 -0
- package/esm/shared/Form/useFormDefaults.d.ts.map +1 -0
- package/esm/shared/Form/useFormDefaults.js +7 -0
- package/esm/shared/Form/useFormDirty.d.ts +2 -0
- package/esm/shared/Form/useFormDirty.d.ts.map +1 -0
- package/esm/shared/Form/useFormDirty.js +13 -0
- package/esm/shared/Form/useFormErrors.d.ts +3 -0
- package/esm/shared/Form/useFormErrors.d.ts.map +1 -0
- package/esm/shared/Form/useFormErrors.js +18 -0
- package/esm/shared/Form/useFormField.d.ts +24 -0
- package/esm/shared/Form/useFormField.d.ts.map +1 -0
- package/esm/shared/Form/useFormField.js +60 -0
- package/esm/shared/Form/useFormFieldElementRef.d.ts +3 -0
- package/esm/shared/Form/useFormFieldElementRef.d.ts.map +1 -0
- package/esm/shared/Form/useFormFieldElementRef.js +10 -0
- package/esm/shared/Form/useFormHandlers.d.ts +8 -0
- package/esm/shared/Form/useFormHandlers.d.ts.map +1 -0
- package/esm/shared/Form/useFormHandlers.js +45 -0
- package/esm/shared/Form/useFormStatus.d.ts +3 -0
- package/esm/shared/Form/useFormStatus.d.ts.map +1 -0
- package/esm/shared/Form/useFormStatus.js +10 -0
- package/esm/shared/Form/useFormValues.d.ts +3 -0
- package/esm/shared/Form/useFormValues.d.ts.map +1 -0
- package/esm/shared/Form/useFormValues.js +11 -0
- package/esm/shared/Form/utils.d.ts +2 -0
- package/esm/shared/Form/utils.d.ts.map +1 -0
- package/esm/shared/Form/utils.js +5 -0
- package/esm/shared/GlobalLoading/GlobalLoading.d.ts +2 -0
- package/esm/shared/GlobalLoading/GlobalLoading.d.ts.map +1 -0
- package/esm/shared/GlobalLoading/GlobalLoading.js +15 -0
- package/esm/shared/MaqlPreview/MaqlPreview.d.ts +19 -0
- package/esm/shared/MaqlPreview/MaqlPreview.d.ts.map +1 -0
- package/esm/shared/MaqlPreview/MaqlPreview.js +107 -0
- package/esm/shared/MaqlPreview/backend/measureExpressionTokens.d.ts +18 -0
- package/esm/shared/MaqlPreview/backend/measureExpressionTokens.d.ts.map +1 -0
- package/esm/shared/MaqlPreview/backend/measureExpressionTokens.js +83 -0
- package/esm/shared/MaqlPreview/hooks/useMetricTokens.d.ts +8 -0
- package/esm/shared/MaqlPreview/hooks/useMetricTokens.d.ts.map +1 -0
- package/esm/shared/MaqlPreview/hooks/useMetricTokens.js +14 -0
- package/esm/shared/MetricTooltip/MetricTooltip.d.ts +14 -0
- package/esm/shared/MetricTooltip/MetricTooltip.d.ts.map +1 -0
- package/esm/shared/MetricTooltip/MetricTooltip.events.d.ts +9 -0
- package/esm/shared/MetricTooltip/MetricTooltip.events.d.ts.map +1 -0
- package/esm/shared/MetricTooltip/MetricTooltip.events.js +18 -0
- package/esm/shared/MetricTooltip/MetricTooltip.js +46 -0
- package/esm/shared/MetricTooltip/MetricTooltipContent.d.ts +12 -0
- package/esm/shared/MetricTooltip/MetricTooltipContent.d.ts.map +1 -0
- package/esm/shared/MetricTooltip/MetricTooltipContent.js +38 -0
- package/esm/shared/MetricTooltip/fixtures.d.ts +3 -0
- package/esm/shared/MetricTooltip/fixtures.d.ts.map +1 -0
- package/esm/shared/MetricTooltip/fixtures.js +16 -0
- package/esm/shared/Tabs/Tab.d.ts +31 -0
- package/esm/shared/Tabs/Tab.d.ts.map +1 -0
- package/esm/shared/Tabs/Tab.js +171 -0
- package/esm/shared/Tabs/Tabs.classes.d.ts +13 -0
- package/esm/shared/Tabs/Tabs.classes.d.ts.map +1 -0
- package/esm/shared/Tabs/Tabs.classes.js +13 -0
- package/esm/shared/Tabs/Tabs.d.ts +4 -0
- package/esm/shared/Tabs/Tabs.d.ts.map +1 -0
- package/esm/shared/Tabs/Tabs.data.d.ts +37 -0
- package/esm/shared/Tabs/Tabs.data.d.ts.map +1 -0
- package/esm/shared/Tabs/Tabs.data.js +4 -0
- package/esm/shared/Tabs/Tabs.js +195 -0
- package/esm/shared/Tabs/hooks/useChangeScroll.d.ts +2 -0
- package/esm/shared/Tabs/hooks/useChangeScroll.d.ts.map +1 -0
- package/esm/shared/Tabs/hooks/useChangeScroll.js +19 -0
- package/esm/shared/Tabs/hooks/useMouseDownRepeat.d.ts +3 -0
- package/esm/shared/Tabs/hooks/useMouseDownRepeat.d.ts.map +1 -0
- package/esm/shared/Tabs/hooks/useMouseDownRepeat.js +43 -0
- package/esm/shared/Tabs/hooks/useScrollByButtons.d.ts +9 -0
- package/esm/shared/Tabs/hooks/useScrollByButtons.d.ts.map +1 -0
- package/esm/shared/Tabs/hooks/useScrollByButtons.js +76 -0
- package/esm/shared/Tabs/hooks/useScrollToActive.d.ts +2 -0
- package/esm/shared/Tabs/hooks/useScrollToActive.d.ts.map +1 -0
- package/esm/shared/Tabs/hooks/useScrollToActive.js +36 -0
- package/esm/shared/Tabs/hooks/useTabCallbacks.d.ts +7 -0
- package/esm/shared/Tabs/hooks/useTabCallbacks.d.ts.map +1 -0
- package/esm/shared/Tabs/hooks/useTabCallbacks.js +17 -0
- package/esm/shared/Tabs/hooks/useTabs.d.ts +24 -0
- package/esm/shared/Tabs/hooks/useTabs.d.ts.map +1 -0
- package/esm/shared/Tabs/hooks/useTabs.js +130 -0
- package/esm/shared/Tabs/hooks/useTabsCallbacks.d.ts +8 -0
- package/esm/shared/Tabs/hooks/useTabsCallbacks.d.ts.map +1 -0
- package/esm/shared/Tabs/hooks/useTabsCallbacks.js +19 -0
- package/esm/shared/authentication/Authentication.d.ts +8 -0
- package/esm/shared/authentication/Authentication.d.ts.map +1 -0
- package/esm/shared/authentication/Authentication.js +51 -0
- package/esm/shared/backend/tigerContractExpiredHandler.d.ts +3 -0
- package/esm/shared/backend/tigerContractExpiredHandler.d.ts.map +1 -0
- package/esm/shared/backend/tigerContractExpiredHandler.js +19 -0
- package/esm/shared/backend/tigerNotAuthenticatedHandler.d.ts +9 -0
- package/esm/shared/backend/tigerNotAuthenticatedHandler.d.ts.map +1 -0
- package/esm/shared/backend/tigerNotAuthenticatedHandler.js +36 -0
- package/esm/shared/eventing/EventContext.d.ts +25 -0
- package/esm/shared/eventing/EventContext.d.ts.map +1 -0
- package/esm/shared/eventing/EventContext.js +35 -0
- package/esm/shared/eventing/events.d.ts +52 -0
- package/esm/shared/eventing/events.d.ts.map +1 -0
- package/esm/shared/eventing/events.js +56 -0
- package/esm/shared/eventing/functions/errorToTrackingData.d.ts +12 -0
- package/esm/shared/eventing/functions/errorToTrackingData.d.ts.map +1 -0
- package/esm/shared/eventing/functions/errorToTrackingData.js +10 -0
- package/esm/shared/eventing/useEvents.d.ts +10 -0
- package/esm/shared/eventing/useEvents.d.ts.map +1 -0
- package/esm/shared/eventing/useEvents.js +16 -0
- package/esm/shared/hooks/useApi.d.ts +4 -0
- package/esm/shared/hooks/useApi.d.ts.map +1 -0
- package/esm/shared/hooks/useApi.js +15 -0
- package/esm/shared/hooks/useFocus.d.ts +3 -0
- package/esm/shared/hooks/useFocus.d.ts.map +1 -0
- package/esm/shared/hooks/useFocus.js +55 -0
- package/esm/shared/hooks/usePromiseHandlerIndicator.d.ts +2 -0
- package/esm/shared/hooks/usePromiseHandlerIndicator.d.ts.map +1 -0
- package/esm/shared/hooks/usePromiseHandlerIndicator.js +11 -0
- package/esm/shared/hooks/useProp.d.ts +3 -0
- package/esm/shared/hooks/useProp.d.ts.map +1 -0
- package/esm/shared/hooks/useProp.js +15 -0
- package/esm/shared/links.d.ts +9 -0
- package/esm/shared/links.d.ts.map +1 -0
- package/esm/shared/links.js +9 -0
- package/esm/shared/metrics/MetricsReloadContext.d.ts +8 -0
- package/esm/shared/metrics/MetricsReloadContext.d.ts.map +1 -0
- package/esm/shared/metrics/MetricsReloadContext.js +14 -0
- package/esm/shared/metrics/functions/metricListData.d.ts +4 -0
- package/esm/shared/metrics/functions/metricListData.d.ts.map +1 -0
- package/esm/shared/metrics/functions/metricListData.js +29 -0
- package/esm/shared/metrics/useMetricListData.d.ts +29 -0
- package/esm/shared/metrics/useMetricListData.d.ts.map +1 -0
- package/esm/shared/metrics/useMetricListData.events.d.ts +12 -0
- package/esm/shared/metrics/useMetricListData.events.d.ts.map +1 -0
- package/esm/shared/metrics/useMetricListData.events.js +31 -0
- package/esm/shared/metrics/useMetricListData.js +52 -0
- package/esm/shared/metrics/useMetrics.d.ts +16 -0
- package/esm/shared/metrics/useMetrics.d.ts.map +1 -0
- package/esm/shared/metrics/useMetrics.js +34 -0
- package/esm/shared/metrics/useReloadMetrics.d.ts +3 -0
- package/esm/shared/metrics/useReloadMetrics.d.ts.map +1 -0
- package/esm/shared/metrics/useReloadMetrics.js +10 -0
- package/esm/shared/permissions.d.ts +10 -0
- package/esm/shared/permissions.d.ts.map +1 -0
- package/esm/shared/permissions.js +53 -0
- package/esm/shared/platform.d.ts +2 -0
- package/esm/shared/platform.d.ts.map +1 -0
- package/esm/shared/platform.js +4 -0
- package/esm/shared/theme/index.d.ts +416 -0
- package/esm/shared/theme/index.d.ts.map +1 -0
- package/esm/shared/theme/index.js +193 -0
- package/esm/tests/render.test.utils.d.ts +9 -0
- package/esm/tests/render.test.utils.d.ts.map +1 -0
- package/esm/tests/render.test.utils.js +18 -0
- package/esm/translations/IntlWrapper.d.ts +9 -0
- package/esm/translations/IntlWrapper.d.ts.map +1 -0
- package/esm/translations/IntlWrapper.js +11 -0
- package/esm/translations/de-DE.json +131 -0
- package/esm/translations/en-AU.json +131 -0
- package/esm/translations/en-GB.json +131 -0
- package/esm/translations/en-US.json +518 -0
- package/esm/translations/es-419.json +131 -0
- package/esm/translations/es-ES.json +131 -0
- package/esm/translations/fi-FI.json +131 -0
- package/esm/translations/fr-CA.json +131 -0
- package/esm/translations/fr-FR.json +131 -0
- package/esm/translations/id-ID.json +131 -0
- package/esm/translations/it-IT.json +131 -0
- package/esm/translations/ja-JP.json +131 -0
- package/esm/translations/ko-KR.json +131 -0
- package/esm/translations/nl-NL.json +131 -0
- package/esm/translations/pl-PL.json +131 -0
- package/esm/translations/pt-BR.json +131 -0
- package/esm/translations/pt-PT.json +131 -0
- package/esm/translations/ru-RU.json +131 -0
- package/esm/translations/sl-SI.json +131 -0
- package/esm/translations/th-TH.json +131 -0
- package/esm/translations/tr-TR.json +131 -0
- package/esm/translations/translations.d.ts +21 -0
- package/esm/translations/translations.d.ts.map +1 -0
- package/esm/translations/translations.js +89 -0
- package/esm/translations/uk-UA.json +131 -0
- package/esm/translations/vi-VN.json +131 -0
- package/esm/translations/zh-HK.json +131 -0
- package/esm/translations/zh-Hans.json +131 -0
- package/esm/translations/zh-Hant.json +131 -0
- package/package.json +116 -3
package/README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Metric component
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Metric component is a library for editing metrics in gdc-analytical-designer and gdc-meditor.
|
|
4
|
+
Originally it was part of gdc-meditor and released as npm private package @gooddata/metric-component.
|
|
5
|
+
The npm package is now obsolete as the library is now here in the monorepo, still used
|
|
6
|
+
by both gdc-analytical-designer and gdc-meditor apps.
|
|
7
|
+
|
|
8
|
+
## Development setup
|
|
9
|
+
|
|
10
|
+
The project is part of the rush-managed monorepository. Follow the main repository guidelines.
|
|
11
|
+
|
|
12
|
+
## License
|
|
13
|
+
|
|
14
|
+
Copyright (C) 2007-2025, GoodData(R) Corporation. All rights reserved.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type MutableRefObject, type ReactElement } from "react";
|
|
2
|
+
import { type Root } from "react-dom/client";
|
|
3
|
+
export declare const ExpandedClass = "expanded";
|
|
4
|
+
export declare const ScrollbarClass = "with-scrollbar";
|
|
5
|
+
export interface IExpandableTooltipProps {
|
|
6
|
+
reference: MutableRefObject<IRootRef | null>;
|
|
7
|
+
elements: Array<HTMLElement>;
|
|
8
|
+
/**
|
|
9
|
+
* Element that owns the tooltip for outside-click attribution (see {@link IExpandableTooltipSettings.anchor}).
|
|
10
|
+
*/
|
|
11
|
+
anchor?: HTMLElement;
|
|
12
|
+
className: string;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
onOpen?: () => void;
|
|
15
|
+
onDestroy?: () => void;
|
|
16
|
+
cachedPositions?: Array<{
|
|
17
|
+
top: number;
|
|
18
|
+
left: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
} | undefined>;
|
|
22
|
+
}
|
|
23
|
+
export interface IExpandableTooltipSettings {
|
|
24
|
+
elements: Array<HTMLElement>;
|
|
25
|
+
/**
|
|
26
|
+
* Element that owns the tooltip for outside-click attribution: the tooltip is treated as part
|
|
27
|
+
* of this element's subtree by overlay/dialog outside-click detection. It must be stable for
|
|
28
|
+
* the tooltip's lifetime — the hovered `elements` are virtual-rendered by Monaco and may be
|
|
29
|
+
* swapped for fresh nodes while the tooltip is open, so pass the editor's container node
|
|
30
|
+
* rather than relying on the default (the first hovered element).
|
|
31
|
+
*/
|
|
32
|
+
anchor?: HTMLElement;
|
|
33
|
+
className?: string;
|
|
34
|
+
readOnly?: boolean;
|
|
35
|
+
onOpen?: () => void;
|
|
36
|
+
onDestroy?: () => void;
|
|
37
|
+
cachedPositions?: Array<{
|
|
38
|
+
top: number;
|
|
39
|
+
left: number;
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
} | undefined>;
|
|
43
|
+
}
|
|
44
|
+
export interface IRootRef {
|
|
45
|
+
element: HTMLElement;
|
|
46
|
+
root: Root;
|
|
47
|
+
}
|
|
48
|
+
export declare function renderTooltip(ref: MutableRefObject<IRootRef | null>, { elements, anchor, className, readOnly, onOpen, onDestroy, cachedPositions, }: IExpandableTooltipSettings, content: ReactElement): void;
|
|
49
|
+
export declare function destroyTooltip(ref: MutableRefObject<IRootRef | null>): void;
|
|
50
|
+
//# sourceMappingURL=ExpandableTooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandableTooltip.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/components/ExpandableTooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,gBAAgB,EAErB,KAAK,YAAY,EAGpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,kBAAkB,CAAC;AAgBzD,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAuE/C,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC7C,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,KAAK,CACjB;QACI,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAClB,GACD,SAAS,CACd,CAAC;CACL;AAoGD,MAAM,WAAW,0BAA0B;IACvC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,KAAK,CACjB;QACI,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAClB,GACD,SAAS,CACd,CAAC;CACL;AAED,MAAM,WAAW,QAAQ;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC;CACd;AAED,wBAAgB,aAAa,CACzB,GAAG,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,EACtC,EACI,QAAQ,EACR,MAAM,EACN,SAAc,EACd,QAAgB,EAChB,MAAM,EACN,SAAS,EACT,eAAe,GAClB,EAAE,0BAA0B,EAC7B,OAAO,EAAE,YAAY,GACtB,IAAI,CAmDN;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,IAAI,CAiB3E"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2021-2026 GoodData Corporation
|
|
3
|
+
import { useCallback, useEffect, } from "react";
|
|
4
|
+
import { createRoot } from "react-dom/client";
|
|
5
|
+
import { FLOATING_ELEMENT_DATA_ATTR, IconClose, IconExpand, useRegisterFloatingAnchor, } from "@gooddata/sdk-ui-kit";
|
|
6
|
+
import { makeStyles } from "../theme/styles.js";
|
|
7
|
+
import { ExpandableTooltipContextProvider } from "./ExpandableTooltipContext.js";
|
|
8
|
+
import { useExpandableTooltip } from "./hooks/useExpandableTooltip.js";
|
|
9
|
+
import { useRePosition } from "./hooks/useRePosition.js";
|
|
10
|
+
export const ExpandedClass = "expanded";
|
|
11
|
+
export const ScrollbarClass = "with-scrollbar";
|
|
12
|
+
const useStyles = makeStyles()((theme) => ({
|
|
13
|
+
root: {
|
|
14
|
+
position: "absolute",
|
|
15
|
+
zIndex: 9999,
|
|
16
|
+
fontFamily: theme.globals.font,
|
|
17
|
+
border: theme.tooltip.borders.default,
|
|
18
|
+
background: theme.tooltip.colors.background,
|
|
19
|
+
boxShadow: `0 1px 20px ${theme.globals.colors.shadow}`,
|
|
20
|
+
borderRadius: theme.tooltip.borderRadius,
|
|
21
|
+
overflow: "hidden",
|
|
22
|
+
transition: "top 200ms, left 200ms, transform 200ms, max-width 200ms, max-height 200ms",
|
|
23
|
+
[`&.${ExpandedClass}`]: {
|
|
24
|
+
top: "50% !important",
|
|
25
|
+
left: "50% !important",
|
|
26
|
+
transform: "translateX(-50%) translateY(-50%)",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
expand: {
|
|
30
|
+
position: "absolute",
|
|
31
|
+
zIndex: 99,
|
|
32
|
+
top: 15,
|
|
33
|
+
right: 15,
|
|
34
|
+
cursor: "pointer",
|
|
35
|
+
[`&.${ScrollbarClass}`]: {
|
|
36
|
+
right: 30,
|
|
37
|
+
},
|
|
38
|
+
"&:hover svg path": {
|
|
39
|
+
fill: theme.tooltip.colors.hover,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
open: {
|
|
43
|
+
position: "absolute",
|
|
44
|
+
zIndex: 99,
|
|
45
|
+
top: 15,
|
|
46
|
+
right: 45,
|
|
47
|
+
cursor: "pointer",
|
|
48
|
+
color: "#464E56",
|
|
49
|
+
[`&.${ScrollbarClass}`]: {
|
|
50
|
+
right: 60,
|
|
51
|
+
},
|
|
52
|
+
"&:hover": {
|
|
53
|
+
color: theme.tooltip.colors.hover,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
overflow: {
|
|
57
|
+
position: "absolute",
|
|
58
|
+
top: 0,
|
|
59
|
+
left: 0,
|
|
60
|
+
bottom: 0,
|
|
61
|
+
right: 0,
|
|
62
|
+
},
|
|
63
|
+
divider: {
|
|
64
|
+
top: 19,
|
|
65
|
+
right: 36,
|
|
66
|
+
width: 1,
|
|
67
|
+
backgroundColor: theme.tooltip.colors.line,
|
|
68
|
+
height: 12,
|
|
69
|
+
zIndex: 99,
|
|
70
|
+
position: "absolute",
|
|
71
|
+
},
|
|
72
|
+
}));
|
|
73
|
+
function ExpandableTooltip({ className, reference, elements, anchor, children, readOnly, onOpen, onDestroy, cachedPositions, }) {
|
|
74
|
+
const { classes, cx } = useStyles();
|
|
75
|
+
const { expanded, setExpanded, hasScrollbar, setHasScrollbar } = useExpandableTooltip();
|
|
76
|
+
const memoizedDestroy = useCallback(() => destroyTooltip(reference), [reference]);
|
|
77
|
+
const { element, position } = useRePosition(reference, elements, classes.root, expanded, memoizedDestroy, cachedPositions);
|
|
78
|
+
// The tooltip renders into its own React root appended to <body>, outside the editor that
|
|
79
|
+
// opened it, so an enclosing overlay/dialog with outside-click dismissal (e.g. the KD insight
|
|
80
|
+
// overlay hosting AD) cannot attribute clicks inside it by DOM containment and would close on
|
|
81
|
+
// the "edit" click. Mark it as a floating element anchored to its owner so ownership resolves
|
|
82
|
+
// through the anchor chain (same contract as UiFloatingElement / PositionedMenuContent).
|
|
83
|
+
const assignRootEl = useCallback((node) => {
|
|
84
|
+
element.current = node;
|
|
85
|
+
}, [element]);
|
|
86
|
+
const setRootElWithAnchorRegistry = useRegisterFloatingAnchor(assignRootEl, anchor ?? elements[0] ?? null);
|
|
87
|
+
// Run onDestroy when component unmounts
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
return () => onDestroy?.();
|
|
90
|
+
}, [onDestroy]);
|
|
91
|
+
return (_jsx("div", { className: cx(classes.overflow, expanded && ExpandedClass), children: _jsxs("div", { className: cx(classes.root, className, expanded && ExpandedClass), style: position, ref: setRootElWithAnchorRegistry, [FLOATING_ELEMENT_DATA_ATTR]: true, children: [onOpen && (_jsx("div", { className: cx(classes.open, hasScrollbar && ScrollbarClass, "s-maql_tooltip-open"), onClick: () => {
|
|
92
|
+
onOpen();
|
|
93
|
+
destroyTooltip(reference);
|
|
94
|
+
}, children: readOnly ? (_jsx("span", { className: "gd-icon-visible" })) : (_jsx("span", { className: "gd-icon-pencil" })) })), !expanded && (_jsx("div", { className: cx(classes.expand, hasScrollbar && ScrollbarClass, "s-maql_tooltip-expand"), onClick: () => {
|
|
95
|
+
setExpanded(true);
|
|
96
|
+
setHasScrollbar(false);
|
|
97
|
+
}, children: _jsx(IconExpand, {}) })), onOpen && expanded && _jsx("div", { className: classes.divider }), expanded && (_jsx("div", { className: cx(classes.expand, hasScrollbar && ScrollbarClass, "s-maql_tooltip-close"), onClick: () => destroyTooltip(reference), children: _jsx(IconClose, {}) })), children] }) }));
|
|
98
|
+
}
|
|
99
|
+
export function renderTooltip(ref, { elements, anchor, className = "", readOnly = false, onOpen, onDestroy, cachedPositions, }, content) {
|
|
100
|
+
// First ensure any previous tooltip is destroyed
|
|
101
|
+
destroyTooltip(ref);
|
|
102
|
+
// Validate elements to ensure they're still in the DOM
|
|
103
|
+
const validElements = elements.filter((el) => {
|
|
104
|
+
const isValid = el && document.body.contains(el);
|
|
105
|
+
// Additional validation to check if elements are visible/have dimensions
|
|
106
|
+
if (isValid) {
|
|
107
|
+
try {
|
|
108
|
+
const rect = el.getBoundingClientRect();
|
|
109
|
+
return rect.width > 0 && rect.height > 0;
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return isValid;
|
|
116
|
+
});
|
|
117
|
+
if (validElements.length === 0) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const div = document.createElement("div");
|
|
121
|
+
document.body.appendChild(div);
|
|
122
|
+
try {
|
|
123
|
+
const root = createRoot(div);
|
|
124
|
+
root.render(_jsx(ExpandableTooltipContextProvider, { children: _jsx(ExpandableTooltip, { className: className, reference: ref, elements: validElements, anchor: anchor, readOnly: readOnly, onOpen: onOpen, onDestroy: onDestroy, cachedPositions: cachedPositions, children: content }) }));
|
|
125
|
+
ref.current = { element: div, root };
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
// If there's an error during rendering, clean up to avoid memory leaks
|
|
129
|
+
div.remove();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
export function destroyTooltip(ref) {
|
|
133
|
+
if (ref.current) {
|
|
134
|
+
const { element, root } = ref.current;
|
|
135
|
+
// Clear the ref first to prevent any race conditions
|
|
136
|
+
ref.current = null;
|
|
137
|
+
// Use try-catch to handle potential errors during unmounting
|
|
138
|
+
try {
|
|
139
|
+
// Unmount first to allow React to clean up properly
|
|
140
|
+
root?.unmount();
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
// Silently handle errors during unmounting
|
|
144
|
+
}
|
|
145
|
+
finally {
|
|
146
|
+
// Always attempt to remove the element from the DOM
|
|
147
|
+
element?.remove();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type PropsWithChildren } from "react";
|
|
2
|
+
export interface IExpandableTooltipContext {
|
|
3
|
+
expanded: boolean;
|
|
4
|
+
setExpanded: (state: boolean) => void;
|
|
5
|
+
hasScrollbar: boolean;
|
|
6
|
+
setHasScrollbar: (state: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const ExpandableTooltipContext: import("react").Context<IExpandableTooltipContext | null>;
|
|
9
|
+
export declare function ExpandableTooltipContextProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ExpandableTooltipContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandableTooltipContext.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/components/ExpandableTooltipContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAoC,MAAM,OAAO,CAAC;AAEjF,MAAM,WAAW,yBAAyB;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,wBAAwB,2DAAwD,CAAC;AAE9F,wBAAgB,gCAAgC,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAc/E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2021-2026 GoodData Corporation
|
|
3
|
+
import { createContext, useMemo, useState } from "react";
|
|
4
|
+
export const ExpandableTooltipContext = createContext(null);
|
|
5
|
+
export function ExpandableTooltipContextProvider({ children }) {
|
|
6
|
+
const [expanded, setExpanded] = useState(false);
|
|
7
|
+
const [hasScrollbar, setHasScrollbar] = useState(false);
|
|
8
|
+
const context = useMemo(() => {
|
|
9
|
+
return {
|
|
10
|
+
expanded,
|
|
11
|
+
hasScrollbar,
|
|
12
|
+
setExpanded,
|
|
13
|
+
setHasScrollbar,
|
|
14
|
+
};
|
|
15
|
+
}, [expanded, hasScrollbar]);
|
|
16
|
+
return _jsx(ExpandableTooltipContext.Provider, { value: context, children: children });
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpandableTooltip.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/components/hooks/useExpandableTooltip.ts"],"names":[],"mappings":"AAIA,OAAO,EAA4B,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE1G,wBAAgB,oBAAoB,IAAI,yBAAyB,CAOhE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useContext } from "react";
|
|
3
|
+
import { ExpandableTooltipContext } from "../ExpandableTooltipContext.js";
|
|
4
|
+
export function useExpandableTooltip() {
|
|
5
|
+
const expandableTooltip = useContext(ExpandableTooltipContext);
|
|
6
|
+
if (!expandableTooltip) {
|
|
7
|
+
throw new Error("useExpandableTooltip must be used inside ExpandableTooltipContextProvider");
|
|
8
|
+
}
|
|
9
|
+
return expandableTooltip;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type MutableRefObject } from "react";
|
|
2
|
+
import { type IRootRef } from "../ExpandableTooltip.js";
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook that handles all outside events for the tooltip
|
|
5
|
+
* - Mouse move: Close tooltip when mouse moves outside both the decorated text and tooltip
|
|
6
|
+
* - Mouse down: Close tooltip when user clicks outside the tooltip (if expanded)
|
|
7
|
+
* - Key down: Close tooltip when user presses Escape (if expanded)
|
|
8
|
+
*/
|
|
9
|
+
export declare function useOutsideEvents(_reference: MutableRefObject<IRootRef | null>, rectangles: Array<DOMRect>, className: string | null, expanded: boolean, onDestroy: () => void): void;
|
|
10
|
+
//# sourceMappingURL=useOutsideEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOutsideEvents.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/components/hooks/useOutsideEvents.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAa,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC5B,UAAU,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,EAC7C,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,EAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,MAAM,IAAI,GACtB,IAAI,CAuCN"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { isInside, isIntersect, isKeyCancel } from "./utils.js";
|
|
4
|
+
/**
|
|
5
|
+
* Custom hook that handles all outside events for the tooltip
|
|
6
|
+
* - Mouse move: Close tooltip when mouse moves outside both the decorated text and tooltip
|
|
7
|
+
* - Mouse down: Close tooltip when user clicks outside the tooltip (if expanded)
|
|
8
|
+
* - Key down: Close tooltip when user presses Escape (if expanded)
|
|
9
|
+
*/
|
|
10
|
+
export function useOutsideEvents(_reference, rectangles, className, expanded, onDestroy) {
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
// Handle mouse movement to close on hover out (when not expanded)
|
|
13
|
+
const handleMouseMove = (e) => {
|
|
14
|
+
if (expanded)
|
|
15
|
+
return;
|
|
16
|
+
const point = [e.clientX, e.clientY];
|
|
17
|
+
const intersects = rectangles.some((data) => isIntersect(data, point, 5)) || isInside(e, className);
|
|
18
|
+
if (!intersects) {
|
|
19
|
+
onDestroy();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
// Handle mouse click outside the tooltip (when expanded)
|
|
23
|
+
const handleMouseDown = (e) => {
|
|
24
|
+
if (expanded && !isInside(e, className)) {
|
|
25
|
+
onDestroy();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
// Handle keyboard escape (when expanded)
|
|
29
|
+
const handleKeyDown = (e) => {
|
|
30
|
+
if (expanded && isKeyCancel(e)) {
|
|
31
|
+
onDestroy();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
document.body.addEventListener("mousemove", handleMouseMove);
|
|
35
|
+
document.body.addEventListener("mousedown", handleMouseDown);
|
|
36
|
+
document.body.addEventListener("keydown", handleKeyDown);
|
|
37
|
+
return () => {
|
|
38
|
+
document.body.removeEventListener("mousemove", handleMouseMove);
|
|
39
|
+
document.body.removeEventListener("mousedown", handleMouseDown);
|
|
40
|
+
document.body.removeEventListener("keydown", handleKeyDown);
|
|
41
|
+
};
|
|
42
|
+
}, [rectangles, className, expanded, onDestroy]);
|
|
43
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type MutableRefObject } from "react";
|
|
2
|
+
import { type IRootRef } from "../ExpandableTooltip.js";
|
|
3
|
+
interface ICachedPosition {
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
type Position = {
|
|
10
|
+
top?: number;
|
|
11
|
+
left?: number;
|
|
12
|
+
bottom?: number;
|
|
13
|
+
right?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function useRePosition(reference: MutableRefObject<IRootRef | null>, elements: Array<HTMLElement>, className: string, opened: boolean, onDestroy: () => void, cachedPositions?: Array<ICachedPosition | undefined>): {
|
|
16
|
+
element: MutableRefObject<HTMLDivElement | null>;
|
|
17
|
+
position: Position;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=useRePosition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRePosition.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/components/hooks/useRePosition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAA8C,MAAM,OAAO,CAAC;AAE1F,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAIxD,UAAU,eAAe;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,QAAQ,GAAG;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,aAAa,CACzB,SAAS,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,EAC5C,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,EAC5B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,IAAI,EACrB,eAAe,CAAC,EAAE,KAAK,CAAC,eAAe,GAAG,SAAS,CAAC,GACrD;IACC,OAAO,EAAE,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC;CACtB,CAwGA"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { useOutsideEvents } from "./useOutsideEvents.js";
|
|
4
|
+
export function useRePosition(reference, elements, className, opened, onDestroy, cachedPositions) {
|
|
5
|
+
const element = useRef(null);
|
|
6
|
+
const [bounding, setBounding] = useState(null);
|
|
7
|
+
// Get valid rectangles from elements - using cached positions if elements are disconnected
|
|
8
|
+
const rectangles = useMemo(() => {
|
|
9
|
+
// Create rectangles from elements or cached positions
|
|
10
|
+
const rects = [];
|
|
11
|
+
elements.forEach((el, idx) => {
|
|
12
|
+
const isConnected = el ? el.isConnected : false;
|
|
13
|
+
const inBody = el ? document.body.contains(el) : false;
|
|
14
|
+
let rect = null;
|
|
15
|
+
// Try to get rectangle from element
|
|
16
|
+
if (isConnected && inBody) {
|
|
17
|
+
try {
|
|
18
|
+
rect = el.getBoundingClientRect();
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
// silent error
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// If element is disconnected, use cached position
|
|
25
|
+
if ((!rect || rect.width === 0 || rect.height === 0) && cachedPositions?.[idx]) {
|
|
26
|
+
const cached = cachedPositions[idx];
|
|
27
|
+
// Create a DOMRect-like object from cached position if cached exists
|
|
28
|
+
if (cached) {
|
|
29
|
+
rect = {
|
|
30
|
+
top: cached.top,
|
|
31
|
+
left: cached.left,
|
|
32
|
+
width: cached.width,
|
|
33
|
+
height: cached.height,
|
|
34
|
+
right: cached.left + cached.width,
|
|
35
|
+
bottom: cached.top + cached.height,
|
|
36
|
+
x: cached.left,
|
|
37
|
+
y: cached.top,
|
|
38
|
+
toJSON: () => ({}),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (rect && rect.width > 0 && rect.height > 0) {
|
|
43
|
+
rects.push(rect);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return rects;
|
|
47
|
+
}, [elements, cachedPositions]);
|
|
48
|
+
// Update bounding rect when element or tooltip state changes
|
|
49
|
+
useLayoutEffect(() => {
|
|
50
|
+
if (!element.current)
|
|
51
|
+
return;
|
|
52
|
+
// Update immediately
|
|
53
|
+
const initialBounding = element.current.getBoundingClientRect();
|
|
54
|
+
setBounding(initialBounding);
|
|
55
|
+
// Update on resize too
|
|
56
|
+
const observer = new ResizeObserver(() => {
|
|
57
|
+
if (element.current) {
|
|
58
|
+
setBounding(element.current.getBoundingClientRect());
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
observer.observe(element.current);
|
|
62
|
+
return () => observer.disconnect();
|
|
63
|
+
}, [opened]);
|
|
64
|
+
// Calculate position based on rectangles and window size
|
|
65
|
+
const position = useMemo(() => {
|
|
66
|
+
const { innerWidth, innerHeight } = window;
|
|
67
|
+
const { width, height } = bounding || { width: 0, height: 0 };
|
|
68
|
+
// If we have no valid rectangles, use a default position
|
|
69
|
+
if (rectangles.length === 0) {
|
|
70
|
+
return { top: 10, left: 10 };
|
|
71
|
+
}
|
|
72
|
+
const [topCorner, leftCorner] = getPosition(rectangles);
|
|
73
|
+
const res = { top: topCorner, left: leftCorner };
|
|
74
|
+
// Handle edge overflow
|
|
75
|
+
if (leftCorner + width > innerWidth) {
|
|
76
|
+
delete res.left;
|
|
77
|
+
res.right = 0;
|
|
78
|
+
}
|
|
79
|
+
if (topCorner + height > innerHeight) {
|
|
80
|
+
delete res.top;
|
|
81
|
+
res.bottom = 0;
|
|
82
|
+
}
|
|
83
|
+
return res;
|
|
84
|
+
}, [rectangles, bounding]);
|
|
85
|
+
// Combined hook for all outside interactions
|
|
86
|
+
useOutsideEvents(reference, rectangles, className, opened, onDestroy);
|
|
87
|
+
return {
|
|
88
|
+
element,
|
|
89
|
+
position,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function getPosition(rectangles) {
|
|
93
|
+
// Add a safeguard for empty rectangles array
|
|
94
|
+
if (rectangles.length === 0) {
|
|
95
|
+
return [10, 10]; // Provide a small default offset
|
|
96
|
+
}
|
|
97
|
+
const initialValues = [0, Number.MAX_SAFE_INTEGER];
|
|
98
|
+
const finalPosition = rectangles.reduce((prev, current) => {
|
|
99
|
+
if (!current)
|
|
100
|
+
return prev;
|
|
101
|
+
return [Math.max(prev[0], current.top + current.height), Math.min(prev[1], current.left)];
|
|
102
|
+
}, initialValues);
|
|
103
|
+
// If leftCorner is still MAX_SAFE_INTEGER, use a reasonable default
|
|
104
|
+
if (finalPosition[1] === Number.MAX_SAFE_INTEGER) {
|
|
105
|
+
finalPosition[1] = 10;
|
|
106
|
+
}
|
|
107
|
+
return finalPosition;
|
|
108
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function isIntersect(rectangle: DOMRect | null | undefined, point: [number, number], overflow?: number): boolean;
|
|
2
|
+
export declare function isInside(e: MouseEvent, className: string | null): boolean;
|
|
3
|
+
export declare function isKeyCancel(e: KeyboardEvent): boolean;
|
|
4
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/components/hooks/utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CACvB,SAAS,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EACrC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EACvB,QAAQ,SAAI,GACb,OAAO,CAYT;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAIzE;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO,CAErD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
export function isIntersect(rectangle, point, overflow = 0) {
|
|
3
|
+
const [x, y] = point;
|
|
4
|
+
if (rectangle) {
|
|
5
|
+
return (rectangle.left - overflow <= x &&
|
|
6
|
+
x <= rectangle.left + rectangle.width + overflow &&
|
|
7
|
+
rectangle.top - overflow <= y &&
|
|
8
|
+
y <= rectangle.top + rectangle.height + overflow);
|
|
9
|
+
}
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
export function isInside(e, className) {
|
|
13
|
+
const target = e.target;
|
|
14
|
+
return Boolean(className && target.closest(`.${className}`) !== null);
|
|
15
|
+
}
|
|
16
|
+
export function isKeyCancel(e) {
|
|
17
|
+
return !(e.ctrlKey || e.metaKey || e.altKey);
|
|
18
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type IStandaloneCodeEditor, type Monaco } from "../monaco/MonacoEditor.js";
|
|
2
|
+
export declare function useAutoformat(onChange?: (editor: IStandaloneCodeEditor, monaco: Monaco, value: string) => void): (editor: IStandaloneCodeEditor, monaco: Monaco) => void;
|
|
3
|
+
//# sourceMappingURL=useAutoformat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutoformat.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/hooks/useAutoformat.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEpF,wBAAgB,aAAa,CACzB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAClF,CAAC,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAezD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
export function useAutoformat(onChange) {
|
|
4
|
+
return useCallback((editor, monaco) => {
|
|
5
|
+
editor
|
|
6
|
+
.getAction("editor.action.formatDocument")
|
|
7
|
+
?.run()
|
|
8
|
+
.then(() => {
|
|
9
|
+
editor.focus();
|
|
10
|
+
if (onChange) {
|
|
11
|
+
onChange(editor, monaco, editor.getValue());
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}, [onChange]);
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCleanCallback.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/hooks/useCleanCallback.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAa,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,wBAAgB,gBAAgB,CAAC,GAAG,WAAW,EAAE,gBAAgB,CAAC,WAAW,EAAE,CAAC,EAAE,GAAG,IAAI,CASxF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
export function useCleanCallback(...disposables) {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
return () => {
|
|
6
|
+
disposables.forEach((dis) => {
|
|
7
|
+
dis.current.forEach((item) => item.dispose());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
11
|
+
}, []);
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCodeTheme.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/hooks/useCodeTheme.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAatE,wBAAgB,YAAY,IAAI,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAgD7D"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { DecoratorAttribute, DecoratorComputedAttribute, DecoratorDataset, DecoratorDateAttribute, DecoratorDateLabel, DecoratorFact, DecoratorLabel, DecoratorMetric, DecoratorParameter, } from "../monaco/MonacoEditor.styles.js";
|
|
4
|
+
export function useCodeTheme() {
|
|
5
|
+
return useMemo(() => [
|
|
6
|
+
"gooddata-theme",
|
|
7
|
+
{
|
|
8
|
+
base: "vs",
|
|
9
|
+
inherit: true,
|
|
10
|
+
rules: [
|
|
11
|
+
//others languages are inherited from vs base theme
|
|
12
|
+
//maql specific
|
|
13
|
+
{ token: "keyword.maql", foreground: "#7364CF" },
|
|
14
|
+
{ token: "function.maql", foreground: "#7364CF" },
|
|
15
|
+
{ token: "variable.maql", foreground: "#464E56" },
|
|
16
|
+
{ token: "attribute.maql", foreground: "#DB7900" },
|
|
17
|
+
{ token: "label.maql", foreground: "#DB7900" },
|
|
18
|
+
{ token: "fact.maql", foreground: "#00A67D" },
|
|
19
|
+
{ token: "metric.maql", foreground: "#00A67D" },
|
|
20
|
+
{ token: "dataset.maql", foreground: "#952F8E" },
|
|
21
|
+
{ token: "string.maql", foreground: "#D95791" },
|
|
22
|
+
{ token: "number.maql", foreground: "#D95791" },
|
|
23
|
+
{ token: "comment.maql", foreground: "#94A1AD" },
|
|
24
|
+
],
|
|
25
|
+
colors: {
|
|
26
|
+
"editor.background": "#FCFCFD",
|
|
27
|
+
[`editor.variable.${DecoratorFact}.color`]: "rgba(0,166,125,1)",
|
|
28
|
+
[`editor.variable.${DecoratorFact}.background`]: "rgba(0,166,125,0.07)",
|
|
29
|
+
[`editor.variable.${DecoratorMetric}.color`]: "rgba(0,166,125,1)",
|
|
30
|
+
[`editor.variable.${DecoratorMetric}.background`]: "rgba(0,166,125,0.07)",
|
|
31
|
+
[`editor.variable.${DecoratorDataset}.color`]: "rgba(149,47,142,1)",
|
|
32
|
+
[`editor.variable.${DecoratorDataset}.background`]: "rgba(149,47,142,0.07)",
|
|
33
|
+
[`editor.variable.${DecoratorAttribute}.color`]: "rgba(219,121,0,1)",
|
|
34
|
+
[`editor.variable.${DecoratorAttribute}.background`]: "rgba(219,121,0,0.07)",
|
|
35
|
+
[`editor.variable.${DecoratorLabel}.color`]: "rgba(219,121,0,1)",
|
|
36
|
+
[`editor.variable.${DecoratorLabel}.background`]: "rgba(219,121,0,0.07)",
|
|
37
|
+
[`editor.variable.${DecoratorComputedAttribute}.color`]: "rgba(219,121,0,1)",
|
|
38
|
+
[`editor.variable.${DecoratorComputedAttribute}.background`]: "rgba(219,121,0,0.07)",
|
|
39
|
+
[`editor.variable.${DecoratorDateAttribute}.color`]: "rgba(0,155,201,1)",
|
|
40
|
+
[`editor.variable.${DecoratorDateAttribute}.background`]: "rgba(0,155,201,0.07)",
|
|
41
|
+
[`editor.variable.${DecoratorDateLabel}.color`]: "rgba(0,155,201,1)",
|
|
42
|
+
[`editor.variable.${DecoratorDateLabel}.background`]: "rgba(0,155,201,0.07)",
|
|
43
|
+
[`editor.variable.${DecoratorParameter}.color`]: "rgba(148,161,173,1)",
|
|
44
|
+
[`editor.variable.${DecoratorParameter}.background`]: "rgba(148,161,173,0.07)",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
], []);
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopyToClipboard.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/hooks/useCopyToClipboard.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,wBAAgB,kBAAkB,IAAI,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,GAAG,SAAS,KAAK,OAAO,CAalG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
export function useCopyToClipboard() {
|
|
4
|
+
return useCallback((editor) => {
|
|
5
|
+
if (editor) {
|
|
6
|
+
const range = editor.getModel()?.getFullModelRange();
|
|
7
|
+
if (range) {
|
|
8
|
+
editor.setSelection(range);
|
|
9
|
+
editor.focus();
|
|
10
|
+
editor.trigger("editor", "editor.action.clipboardCopyAction", {});
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
}, []);
|
|
16
|
+
}
|