@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
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2021-2026 GoodData Corporation
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import classNames from "classnames";
|
|
5
|
+
import { FormattedMessage, IntlProvider } from "react-intl";
|
|
6
|
+
import { BackendProvider, WorkspaceProvider } from "@gooddata/sdk-ui";
|
|
7
|
+
import { destroyTooltip, renderTooltip } from "../components/ExpandableTooltip.js";
|
|
8
|
+
import { useExpandableTooltip } from "../components/hooks/useExpandableTooltip.js";
|
|
9
|
+
import { useCodeTheme } from "../hooks/useCodeTheme.js";
|
|
10
|
+
import { MainClassContent, MonacoEditor, } from "../monaco/MonacoEditor.js";
|
|
11
|
+
import { makeStyles } from "../theme/styles.js";
|
|
12
|
+
import { LANGUAGE } from "./constants.js";
|
|
13
|
+
import { useDecoration } from "./hooks/useDecoration.js";
|
|
14
|
+
import { useLanguageService } from "./hooks/useLanguageService.js";
|
|
15
|
+
import { MaqlTooltip, MaqlTooltipEditorClass, TooltipMaqlStyles } from "./MaqlEditor.styles.js";
|
|
16
|
+
const BiggerClass = "bigger";
|
|
17
|
+
const SmallerClass = "smaller";
|
|
18
|
+
const ExpandedClass = "expanded";
|
|
19
|
+
const useStyles = makeStyles()((theme) => {
|
|
20
|
+
const { title, description, colors, lineHeight, padding, readMore, space, tooltip } = theme.hoverMetric;
|
|
21
|
+
const { borders } = theme.tooltip;
|
|
22
|
+
const titleHeight = lineHeight + padding;
|
|
23
|
+
const descriptionHeightNormal = lineHeight * 2;
|
|
24
|
+
const descriptionHeightBigger = lineHeight * 4;
|
|
25
|
+
const expandIcon = 15;
|
|
26
|
+
const size = tooltip.normal.maxHeight - titleHeight - title.bottomSpace - space - borders.size;
|
|
27
|
+
const normalSize = size - descriptionHeightNormal;
|
|
28
|
+
const smallerSize = size - descriptionHeightBigger;
|
|
29
|
+
const link = {
|
|
30
|
+
color: colors.link,
|
|
31
|
+
textDecoration: "underline",
|
|
32
|
+
cursor: "pointer",
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
content: {
|
|
36
|
+
display: "flex",
|
|
37
|
+
flexDirection: "column",
|
|
38
|
+
flexWrap: "nowrap",
|
|
39
|
+
},
|
|
40
|
+
title: {
|
|
41
|
+
margin: 0,
|
|
42
|
+
fontWeight: "normal",
|
|
43
|
+
padding: `${padding}px ${padding + expandIcon}px 0 ${padding}px`,
|
|
44
|
+
lineHeight: `${lineHeight}px`,
|
|
45
|
+
fontSize: `${title.fontSize}px`,
|
|
46
|
+
marginBottom: `${title.bottomSpace}px`,
|
|
47
|
+
maxHeight: `${titleHeight}px`,
|
|
48
|
+
whiteSpace: "nowrap",
|
|
49
|
+
textOverflow: "ellipsis",
|
|
50
|
+
overflow: "hidden",
|
|
51
|
+
width: `calc(100% - ${padding * 2 + expandIcon}px)`,
|
|
52
|
+
[`&.${BiggerClass}`]: {
|
|
53
|
+
position: "absolute",
|
|
54
|
+
width: `calc(100% - ${padding * 3 + expandIcon}px)`,
|
|
55
|
+
background: "white",
|
|
56
|
+
zIndex: 1,
|
|
57
|
+
},
|
|
58
|
+
[`&.${ExpandedClass}`]: {
|
|
59
|
+
position: "absolute",
|
|
60
|
+
background: "white",
|
|
61
|
+
zIndex: 1,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
description: {
|
|
65
|
+
position: "relative",
|
|
66
|
+
overflow: "hidden",
|
|
67
|
+
fontSize: `${description.fontSize}px`,
|
|
68
|
+
lineHeight: `${lineHeight}px`,
|
|
69
|
+
padding: `0 ${padding}px 0px ${padding}px`,
|
|
70
|
+
marginBottom: `${space}px`,
|
|
71
|
+
color: colors.color,
|
|
72
|
+
maxHeight: `${descriptionHeightNormal}px`,
|
|
73
|
+
[`&.${BiggerClass}`]: {
|
|
74
|
+
padding: `${titleHeight + title.bottomSpace}px ${padding}px ${space}px ${padding}px`,
|
|
75
|
+
marginBottom: 0,
|
|
76
|
+
maxHeight: `${descriptionHeightBigger}px`,
|
|
77
|
+
overflow: "auto",
|
|
78
|
+
},
|
|
79
|
+
[`&.${ExpandedClass}`]: {
|
|
80
|
+
padding: `${titleHeight + title.bottomSpace}px ${padding}px ${space}px ${padding}px`,
|
|
81
|
+
marginBottom: 0,
|
|
82
|
+
maxHeight: `${tooltip.expanded.maxHeightDescription}px !important`,
|
|
83
|
+
overflow: "hidden",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
readMore: {
|
|
87
|
+
bottom: 0,
|
|
88
|
+
position: "absolute",
|
|
89
|
+
right: `${padding}px`,
|
|
90
|
+
background: theme.tooltip.colors.background,
|
|
91
|
+
span: {
|
|
92
|
+
padding: `0 ${readMore.paddingText}px 0 0`,
|
|
93
|
+
color: colors.color,
|
|
94
|
+
},
|
|
95
|
+
a: link,
|
|
96
|
+
},
|
|
97
|
+
readLess: {
|
|
98
|
+
padding: `0 0 0 ${readMore.paddingText}px`,
|
|
99
|
+
a: link,
|
|
100
|
+
},
|
|
101
|
+
hr: {
|
|
102
|
+
width: "100%",
|
|
103
|
+
height: 0,
|
|
104
|
+
margin: 0,
|
|
105
|
+
borderTop: borders.default,
|
|
106
|
+
},
|
|
107
|
+
maql: {
|
|
108
|
+
[`.${MainClassContent}`]: {
|
|
109
|
+
minWidth: "100%",
|
|
110
|
+
maxWidth: "100%",
|
|
111
|
+
minHeight: `0 !important`,
|
|
112
|
+
maxHeight: `${normalSize}px !important`,
|
|
113
|
+
".lines-content": {
|
|
114
|
+
paddingLeft: `${padding}px !important`,
|
|
115
|
+
},
|
|
116
|
+
textarea: {
|
|
117
|
+
marginLeft: `${padding + 1}px !important`,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
[`&.${SmallerClass}`]: {
|
|
121
|
+
[`.${MainClassContent}`]: {
|
|
122
|
+
maxHeight: `${smallerSize}px !important`,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
[`&.${ExpandedClass}`]: {
|
|
126
|
+
[`.${MainClassContent}`]: {
|
|
127
|
+
maxHeight: `${tooltip.expanded.maxHeight - tooltip.expanded.maxHeightDescription}px !important`,
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
});
|
|
133
|
+
function MaqlEditorTooltip({ content, intl, backend, workspaceId }) {
|
|
134
|
+
return (_jsx(IntlProvider, { locale: intl ? intl.locale : "en-US", defaultLocale: intl ? intl.locale : "en-US", messages: intl ? intl.messages : {}, children: _jsx(BackendProvider, { backend: backend, children: _jsx(WorkspaceProvider, { workspace: workspaceId, children: _jsx(MaqlEditorTooltipContent, { content: content }) }) }) }));
|
|
135
|
+
}
|
|
136
|
+
function MaqlEditorTooltipContent({ content }) {
|
|
137
|
+
const { classes, cx } = useStyles();
|
|
138
|
+
const { title, description, maql } = content;
|
|
139
|
+
const ls = useLanguageService();
|
|
140
|
+
const decoration = useDecoration(ls, true);
|
|
141
|
+
const [theme, themeData] = useCodeTheme();
|
|
142
|
+
const options = useEditorOptions();
|
|
143
|
+
const { expanded, setHasScrollbar } = useExpandableTooltip();
|
|
144
|
+
const [descriptionOpened, setDescriptionOpened] = useState(false);
|
|
145
|
+
const [readMore, setReadMore] = useState(false);
|
|
146
|
+
const descElementRef = useRef(null);
|
|
147
|
+
const descElement = descElementRef.current;
|
|
148
|
+
useEffect(() => setReadMore(Boolean(descElement && descElement.scrollHeight > descElement.offsetHeight)), [descElement]);
|
|
149
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: classes.content, children: [_jsx("h2", { className: cx(classes.title, descriptionOpened && BiggerClass, expanded && ExpandedClass), children: title }), !expanded && (_jsxs("div", { className: cx(classes.description, descriptionOpened && BiggerClass), ref: descElementRef, children: [description, readMore && !descriptionOpened && (_jsxs("div", { className: classes.readMore, children: [_jsx("span", { children: "\u2026" }), _jsx("a", { onClick: () => {
|
|
150
|
+
setDescriptionOpened(true);
|
|
151
|
+
setHasScrollbar(true);
|
|
152
|
+
}, children: _jsx(FormattedMessage, { id: "metricComponent.editMetric.hover.more" }) })] })), readMore && descriptionOpened && (_jsx("span", { className: classes.readLess, children: _jsx("a", { onClick: () => {
|
|
153
|
+
setDescriptionOpened(false);
|
|
154
|
+
setHasScrollbar(false);
|
|
155
|
+
if (descElement) {
|
|
156
|
+
descElement.scrollTop = 0;
|
|
157
|
+
}
|
|
158
|
+
}, children: _jsx(FormattedMessage, { id: "metricComponent.editMetric.hover.less" }) }) }))] })), expanded && _jsx("div", { className: cx(classes.description, ExpandedClass), children: description }), _jsx("div", { className: classes.hr }), _jsx("div", { className: cx(classes.maql, descriptionOpened && SmallerClass, expanded && ExpandedClass), children: _jsx(MonacoEditor, { className: MaqlTooltipEditorClass, inline: true, options: options, readonly: true, autofocus: false, defaultValue: maql, language: LANGUAGE, themeName: theme, themeData: themeData, onEditorMount: (editor) => decoration(editor) }) })] }) }));
|
|
159
|
+
}
|
|
160
|
+
export function renderMaqlTooltip(ref, { content, backend, workspaceId, intl, elements, anchor, readOnly, cachedPositions }, onOpen, onDestroy) {
|
|
161
|
+
if (!content) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
// Validate elements
|
|
165
|
+
if (!elements || elements.length === 0) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
renderTooltip(ref, {
|
|
169
|
+
elements,
|
|
170
|
+
anchor,
|
|
171
|
+
className: classNames("s_maql_tooltip", MaqlTooltip),
|
|
172
|
+
readOnly,
|
|
173
|
+
onOpen,
|
|
174
|
+
onDestroy,
|
|
175
|
+
cachedPositions,
|
|
176
|
+
}, _jsxs(_Fragment, { children: [_jsx(TooltipMaqlStyles, {}), _jsx(MaqlEditorTooltip, { content: content, backend: backend, workspaceId: workspaceId, intl: intl })] }));
|
|
177
|
+
}
|
|
178
|
+
export function destroyMaqlTooltip(ref) {
|
|
179
|
+
destroyTooltip(ref);
|
|
180
|
+
}
|
|
181
|
+
function useEditorOptions() {
|
|
182
|
+
return useMemo(() => ({
|
|
183
|
+
lineNumbers: "off",
|
|
184
|
+
lineNumbersMinChars: 0,
|
|
185
|
+
folding: false,
|
|
186
|
+
}), []);
|
|
187
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/maql/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as monaco from "monaco-editor/editor/editor.api.js";
|
|
2
|
+
import { type TextDocument } from "vscode-languageserver-textdocument";
|
|
3
|
+
import { type MaqlLanguageService } from "@gooddata/sdk-maql-language-server";
|
|
4
|
+
import { type FormattingOptions, type Range } from "../monaco/MonacoEditor.js";
|
|
5
|
+
export declare function formatDocument(languageService: MaqlLanguageService, document: TextDocument, options: FormattingOptions, range?: Range): Promise<monaco.languages.TextEdit[]>;
|
|
6
|
+
//# sourceMappingURL=formatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/maql/formatter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,oCAAoC,CAAC;AAE7D,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAG9E,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAE/E,wBAAgB,cAAc,CAC1B,eAAe,EAAE,mBAAmB,EACpC,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,iBAAiB,EAC1B,KAAK,CAAC,EAAE,KAAK,GACd,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAatC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// (C) 2022-2026 GoodData Corporation
|
|
2
|
+
import * as monaco from "monaco-editor/editor/editor.api.js";
|
|
3
|
+
import { MonacoToProtocolConverter, ProtocolToMonacoConverter } from "monaco-languageclient/monaco-converter";
|
|
4
|
+
export function formatDocument(languageService, document, options, range) {
|
|
5
|
+
const m2p = new MonacoToProtocolConverter(monaco);
|
|
6
|
+
const p2m = new ProtocolToMonacoConverter(monaco);
|
|
7
|
+
const formattingOptions = m2p.asFormattingOptions(options);
|
|
8
|
+
if (range) {
|
|
9
|
+
return languageService
|
|
10
|
+
.doFormatRange(document, m2p.asRange(range), formattingOptions)
|
|
11
|
+
.then((edits) => p2m.asTextEdits(edits));
|
|
12
|
+
}
|
|
13
|
+
return languageService.doFormat(document, formattingOptions).then((edits) => p2m.asTextEdits(edits));
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type MutableRefObject } from "react";
|
|
2
|
+
import type * as monaco from "monaco-editor/editor/editor.api.js";
|
|
3
|
+
import { type ObjectContent } from "@gooddata/sdk-maql-language-server";
|
|
4
|
+
import { type IMetadataObject } from "@gooddata/sdk-model";
|
|
5
|
+
import { type IRootRef } from "../../../components/ExpandableTooltip.js";
|
|
6
|
+
import { type IStandaloneCodeEditor } from "../../../monaco/MonacoEditor.js";
|
|
7
|
+
import { type MaqlTooltipSettings } from "../../MaqlEditor.tooltip.js";
|
|
8
|
+
export type HoverSettings = Omit<MaqlTooltipSettings, "elements" | "content"> & {
|
|
9
|
+
content: ObjectContent | null | undefined;
|
|
10
|
+
};
|
|
11
|
+
export declare function doHover(event: MouseEvent | KeyboardEvent | null, tooltip: MutableRefObject<IRootRef | null>, editor: IStandaloneCodeEditor, hover: monaco.languages.Hover | null, settings: HoverSettings, onOpen?: (editor: IStandaloneCodeEditor, object: IMetadataObject) => void): monaco.languages.Hover | null;
|
|
12
|
+
//# sourceMappingURL=doHover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doHover.d.ts","sourceRoot":"","sources":["../../../../../src/MaqlEditor/maql/hooks/hover/doHover.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,MAAM,oCAAoC,CAAC;AAElE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM7E,OAAO,EAAE,KAAK,mBAAmB,EAAqB,MAAM,6BAA6B,CAAC;AAgB1F,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG;IAC5E,OAAO,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEF,wBAAgB,OAAO,CACnB,KAAK,EAAE,UAAU,GAAG,aAAa,GAAG,IAAI,EACxC,OAAO,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,EAC1C,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,IAAI,EACpC,QAAQ,EAAE,aAAa,EACvB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,eAAe,KAAK,IAAI,GAC1E,MAAM,CAAC,SAAS,CAAC,KAAK,GAAG,IAAI,CAgF/B"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { DecoratorClassName, DecoratorHovered, DecoratorItemClassName, } from "../../../monaco/MonacoEditor.styles.js";
|
|
3
|
+
import { renderMaqlTooltip } from "../../MaqlEditor.tooltip.js";
|
|
4
|
+
// Position cache using WeakMap to avoid modifying elements directly
|
|
5
|
+
const positionCache = new WeakMap();
|
|
6
|
+
export function doHover(event, tooltip, editor, hover, settings, onOpen) {
|
|
7
|
+
// Early return cases
|
|
8
|
+
if (!hover || !event || tooltip.current || !settings.content) {
|
|
9
|
+
return settings.content ? null : hover;
|
|
10
|
+
}
|
|
11
|
+
const containerNode = editor.getContainerDomNode();
|
|
12
|
+
if (!containerNode) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
// Collect valid DOM elements and ensure they have valid dimensions
|
|
17
|
+
const rawElements = collectElements(containerNode, event);
|
|
18
|
+
const elements = rawElements.filter((el) => {
|
|
19
|
+
const isValid = el && document.body.contains(el);
|
|
20
|
+
if (isValid) {
|
|
21
|
+
const rect = el.getBoundingClientRect();
|
|
22
|
+
// Store position in the WeakMap instead of on the element
|
|
23
|
+
positionCache.set(el, {
|
|
24
|
+
top: rect.top,
|
|
25
|
+
left: rect.left,
|
|
26
|
+
width: rect.width,
|
|
27
|
+
height: rect.height,
|
|
28
|
+
});
|
|
29
|
+
return rect.width > 0 && rect.height > 0;
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
});
|
|
33
|
+
if (elements.length === 0) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
// Create a decorator for the hovered element
|
|
37
|
+
const decorator = createDecorator(editor, hover);
|
|
38
|
+
// Prepare the callback for when the tooltip is opened
|
|
39
|
+
const handleOpen = () => {
|
|
40
|
+
if (!settings.content)
|
|
41
|
+
return;
|
|
42
|
+
onOpen?.(editor, {
|
|
43
|
+
type: "measure",
|
|
44
|
+
...settings.content,
|
|
45
|
+
deprecated: false,
|
|
46
|
+
production: true,
|
|
47
|
+
unlisted: false,
|
|
48
|
+
uri: "",
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
// Prepare the cleanup callback for when the tooltip is closed
|
|
52
|
+
const handleDestroy = () => {
|
|
53
|
+
removeDecorator(editor, decorator);
|
|
54
|
+
};
|
|
55
|
+
// Render the tooltip immediately
|
|
56
|
+
renderMaqlTooltip(tooltip, {
|
|
57
|
+
...settings,
|
|
58
|
+
elements,
|
|
59
|
+
// the hovered spans are re-rendered by Monaco (the hover decoration added above
|
|
60
|
+
// already triggers that), so the editor node is the stable owner of the tooltip
|
|
61
|
+
anchor: containerNode,
|
|
62
|
+
content: settings.content,
|
|
63
|
+
cachedPositions: elements.map((el) => positionCache.get(el)),
|
|
64
|
+
}, handleOpen, handleDestroy);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// Silent error handling
|
|
68
|
+
}
|
|
69
|
+
// Return null to prevent monaco from showing its default tooltip
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
function collectElements(parent, event) {
|
|
73
|
+
const element = collectTarget(parent, event);
|
|
74
|
+
if (!element)
|
|
75
|
+
return [];
|
|
76
|
+
const items = [];
|
|
77
|
+
if (isDecorator(element)) {
|
|
78
|
+
items.push(element);
|
|
79
|
+
}
|
|
80
|
+
if (element) {
|
|
81
|
+
let current = element.previousElementSibling;
|
|
82
|
+
while (current && isDecorator(current)) {
|
|
83
|
+
items.unshift(current);
|
|
84
|
+
current = current.previousElementSibling;
|
|
85
|
+
}
|
|
86
|
+
current = element.nextElementSibling;
|
|
87
|
+
while (current && isDecorator(current)) {
|
|
88
|
+
items.push(current);
|
|
89
|
+
current = current.nextElementSibling;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return items;
|
|
93
|
+
}
|
|
94
|
+
function collectTarget(parent, event) {
|
|
95
|
+
if (event.type === "keydown") {
|
|
96
|
+
const cursor = parent.querySelector(".cursor.monaco-mouse-cursor-text");
|
|
97
|
+
if (cursor) {
|
|
98
|
+
const { x, y, height } = cursor.getBoundingClientRect();
|
|
99
|
+
const elementFromPoint = document.elementFromPoint(x - 1, y + height / 2);
|
|
100
|
+
return elementFromPoint || null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const target = event.target;
|
|
104
|
+
return target || null;
|
|
105
|
+
}
|
|
106
|
+
function isDecorator(el) {
|
|
107
|
+
if (!el)
|
|
108
|
+
return false;
|
|
109
|
+
return el.classList.contains(DecoratorClassName) || el.classList.contains(DecoratorItemClassName);
|
|
110
|
+
}
|
|
111
|
+
function createDecorator(editor, hover) {
|
|
112
|
+
if (!hover.range) {
|
|
113
|
+
return [];
|
|
114
|
+
}
|
|
115
|
+
return editor.deltaDecorations([], [
|
|
116
|
+
{
|
|
117
|
+
range: hover.range,
|
|
118
|
+
options: {
|
|
119
|
+
inlineClassName: DecoratorHovered,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
]);
|
|
123
|
+
}
|
|
124
|
+
function removeDecorator(editor, decorator) {
|
|
125
|
+
editor.deltaDecorations(decorator, []);
|
|
126
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type MutableRefObject } from "react";
|
|
2
|
+
import { type IRootRef } from "../../../components/ExpandableTooltip.js";
|
|
3
|
+
export declare function useHoverEvent(editorElement: HTMLElement | null, tooltip: MutableRefObject<IRootRef | null>, isHoverShortcut: (e: KeyboardEvent) => boolean): MutableRefObject<MouseEvent | KeyboardEvent | null>;
|
|
4
|
+
//# sourceMappingURL=useHoverEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHoverEvent.d.ts","sourceRoot":"","sources":["../../../../../src/MaqlEditor/maql/hooks/hover/useHoverEvent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAqB,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAGzE,wBAAgB,aAAa,CACzB,aAAa,EAAE,WAAW,GAAG,IAAI,EACjC,OAAO,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,EAC1C,eAAe,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,OAAO,GAC/C,gBAAgB,CAAC,UAAU,GAAG,aAAa,GAAG,IAAI,CAAC,CAkCrD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { destroyMaqlTooltip } from "../../MaqlEditor.tooltip.js";
|
|
4
|
+
export function useHoverEvent(editorElement, tooltip, isHoverShortcut) {
|
|
5
|
+
const currentEvent = useRef(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const handlerEvent = (e) => {
|
|
8
|
+
// Store the current event for use in hover provider
|
|
9
|
+
currentEvent.current = e;
|
|
10
|
+
};
|
|
11
|
+
const handleKey = (e) => {
|
|
12
|
+
//Do not hide if there is triggered shortcut Ctrl/Cmd + u
|
|
13
|
+
if (isHoverShortcut(e)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
destroyMaqlTooltip(tooltip);
|
|
17
|
+
};
|
|
18
|
+
if (editorElement) {
|
|
19
|
+
editorElement.addEventListener("mousemove", handlerEvent);
|
|
20
|
+
editorElement.addEventListener("keydown", handlerEvent);
|
|
21
|
+
editorElement.addEventListener("keydown", handleKey);
|
|
22
|
+
}
|
|
23
|
+
return () => {
|
|
24
|
+
if (editorElement) {
|
|
25
|
+
editorElement.removeEventListener("mousemove", handlerEvent);
|
|
26
|
+
editorElement.removeEventListener("keydown", handlerEvent);
|
|
27
|
+
editorElement.removeEventListener("keydown", handleKey);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}, [editorElement, tooltip, isHoverShortcut]);
|
|
31
|
+
return currentEvent;
|
|
32
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type CompletionList, type InitializeResult } from "vscode-languageserver";
|
|
2
|
+
import { type MaqlLanguageService } from "@gooddata/sdk-maql-language-server";
|
|
3
|
+
export declare function useAutocomplete(languageId: string, languageService: MaqlLanguageService | undefined, initializeData: InitializeResult | undefined, onList: (list: CompletionList) => void): void;
|
|
4
|
+
//# sourceMappingURL=useAutocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutocomplete.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/maql/hooks/useAutocomplete.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAY,MAAM,uBAAuB,CAAC;AAG7F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAW9E,wBAAgB,eAAe,CAC3B,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,mBAAmB,GAAG,SAAS,EAChD,cAAc,EAAE,gBAAgB,GAAG,SAAS,EAC5C,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,GACvC,IAAI,CAwDN"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import * as monaco from "monaco-editor/editor/editor.api.js";
|
|
4
|
+
import { MonacoToProtocolConverter, ProtocolToMonacoConverter } from "monaco-languageclient/monaco-converter";
|
|
5
|
+
//more info in README.md
|
|
6
|
+
import { TextEdit } from "vscode-languageserver";
|
|
7
|
+
import { createDocument } from "../utils.js";
|
|
8
|
+
const triggerSuggestCommand = {
|
|
9
|
+
title: "trigger suggestion",
|
|
10
|
+
command: "editor.action.triggerSuggest",
|
|
11
|
+
};
|
|
12
|
+
let completionRequestCounter = 0;
|
|
13
|
+
export function useAutocomplete(languageId, languageService, initializeData, onList) {
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!languageService || !initializeData) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const m2p = new MonacoToProtocolConverter(monaco);
|
|
19
|
+
const p2m = new ProtocolToMonacoConverter(monaco);
|
|
20
|
+
const disposeCompletion = monaco.languages.registerCompletionItemProvider(languageId, {
|
|
21
|
+
triggerCharacters: initializeData.capabilities.completionProvider?.triggerCharacters,
|
|
22
|
+
provideCompletionItems: (model, position) => {
|
|
23
|
+
const document = createDocument(model);
|
|
24
|
+
const wordUntil = model.getWordUntilPosition(position);
|
|
25
|
+
const defaultRange = new monaco.Range(position.lineNumber, wordUntil.startColumn, position.lineNumber, wordUntil.endColumn);
|
|
26
|
+
onList({ isIncomplete: false, items: [] });
|
|
27
|
+
++completionRequestCounter;
|
|
28
|
+
return languageService
|
|
29
|
+
?.doCompletion(document, m2p.asPosition(position.lineNumber, position.column))
|
|
30
|
+
.then((list) => {
|
|
31
|
+
const modifiedList = {
|
|
32
|
+
isIncomplete: list.isIncomplete,
|
|
33
|
+
items: list.items.map((item) => {
|
|
34
|
+
return {
|
|
35
|
+
...item,
|
|
36
|
+
textEdit: TextEdit.is(item.textEdit) ? item.textEdit : undefined,
|
|
37
|
+
command: triggerSuggestCommand,
|
|
38
|
+
};
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
if (completionRequestCounter == 1) {
|
|
42
|
+
onList(modifiedList);
|
|
43
|
+
}
|
|
44
|
+
return p2m.asCompletionResult(modifiedList, defaultRange);
|
|
45
|
+
})
|
|
46
|
+
.finally(() => --completionRequestCounter);
|
|
47
|
+
},
|
|
48
|
+
resolveCompletionItem: (item) => languageService.doCompletionResolve(m2p.asCompletionItem(item)).then((result) => {
|
|
49
|
+
const protocolItem = p2m.asCompletionItem(result, item.range);
|
|
50
|
+
return {
|
|
51
|
+
...item,
|
|
52
|
+
...protocolItem,
|
|
53
|
+
};
|
|
54
|
+
}),
|
|
55
|
+
});
|
|
56
|
+
return () => {
|
|
57
|
+
disposeCompletion.dispose();
|
|
58
|
+
};
|
|
59
|
+
}, [languageId, languageService, initializeData, onList]);
|
|
60
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type MaqlLanguageService } from "@gooddata/sdk-maql-language-server";
|
|
2
|
+
import { type IStandaloneCodeEditor } from "../../monaco/MonacoEditor.js";
|
|
3
|
+
export declare function useDecoration(languageService: MaqlLanguageService | undefined, decorators: boolean): (editor: IStandaloneCodeEditor | null) => void;
|
|
4
|
+
//# sourceMappingURL=useDecoration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDecoration.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/maql/hooks/useDecoration.ts"],"names":[],"mappings":"AAQA,OAAO,EAAoB,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAGhG,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAI1E,wBAAgB,aAAa,CACzB,eAAe,EAAE,mBAAmB,GAAG,SAAS,EAChD,UAAU,EAAE,OAAO,GACpB,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,KAAK,IAAI,CAoChD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
3
|
+
import * as monaco from "monaco-editor/editor/editor.api.js";
|
|
4
|
+
import { ProtocolToMonacoConverter } from "monaco-languageclient/monaco-converter";
|
|
5
|
+
import { Decorators } from "../../monaco/MonacoEditor.styles.js";
|
|
6
|
+
import { createDocument } from "../utils.js";
|
|
7
|
+
export function useDecoration(languageService, decorators) {
|
|
8
|
+
const decoratorsCollection = useRef(null);
|
|
9
|
+
const editorRef = useRef(null);
|
|
10
|
+
// Apply decorations in an effect to ensure proper timing with React 18
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (editorRef.current) {
|
|
13
|
+
doDecorate(languageService, getDocument(editorRef.current), editorRef.current, decoratorsCollection, decorators);
|
|
14
|
+
}
|
|
15
|
+
// Capture the current value of decoratorsCollection.current to use in cleanup
|
|
16
|
+
const currentCollection = decoratorsCollection.current;
|
|
17
|
+
// Cleanup function to clear decorations when component unmounts
|
|
18
|
+
return () => {
|
|
19
|
+
if (currentCollection) {
|
|
20
|
+
currentCollection.clear();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}, [languageService, decorators]);
|
|
24
|
+
return useCallback((editor) => {
|
|
25
|
+
if (editor) {
|
|
26
|
+
editorRef.current = editor;
|
|
27
|
+
doDecorate(languageService, getDocument(editor), editor, decoratorsCollection, decorators);
|
|
28
|
+
}
|
|
29
|
+
}, [decorators, languageService]);
|
|
30
|
+
}
|
|
31
|
+
function getDocument(editor) {
|
|
32
|
+
const model = editor?.getModel();
|
|
33
|
+
return model ? createDocument(model) : null;
|
|
34
|
+
}
|
|
35
|
+
function doDecorate(languageService, document, editor, decoratorsCollection, state) {
|
|
36
|
+
const p2m = new ProtocolToMonacoConverter(monaco);
|
|
37
|
+
if (!languageService || !document) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (!decoratorsCollection.current) {
|
|
41
|
+
decoratorsCollection.current = editor.createDecorationsCollection([]);
|
|
42
|
+
}
|
|
43
|
+
//decorators are turned off
|
|
44
|
+
if (!state) {
|
|
45
|
+
decoratorsCollection.current.clear();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
//decorators are turned on
|
|
49
|
+
languageService.doDecoration(document).then((lspDecorations) => {
|
|
50
|
+
// Check if the collection still exists before setting decorations
|
|
51
|
+
if (decoratorsCollection.current) {
|
|
52
|
+
decoratorsCollection.current.set(asDecorations(p2m, lspDecorations));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function asDecorations(p2m, decorations) {
|
|
57
|
+
return decorations.map((decoration) => {
|
|
58
|
+
const def = Decorators[decoration.options.type] || Decorators["default"];
|
|
59
|
+
return {
|
|
60
|
+
range: p2m.asRange(decoration.range),
|
|
61
|
+
options: {
|
|
62
|
+
hoverMessage: decoration.options.hoverMessage,
|
|
63
|
+
inlineClassName: def.decoratorItem.join(" "),
|
|
64
|
+
before: {
|
|
65
|
+
inlineClassName: def.decorator.join(" "),
|
|
66
|
+
inlineClassNameAffectsLetterSpacing: true,
|
|
67
|
+
//NOTE: Keep space before and after to simulate padding
|
|
68
|
+
content: ` ${decoration.options.label} `,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDocumentFormatting.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/maql/hooks/useDocumentFormatting.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAK9E,wBAAgB,qBAAqB,CACjC,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,mBAAmB,GAAG,SAAS,GACjD,IAAI,CA4BN"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// (C) 2022-2026 GoodData Corporation
|
|
2
|
+
//more info in README.md
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
import * as monaco from "monaco-editor/editor/editor.api.js";
|
|
5
|
+
import { formatDocument } from "../formatter.js";
|
|
6
|
+
import { createDocument } from "../utils.js";
|
|
7
|
+
export function useDocumentFormatting(languageId, languageService) {
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (!languageService) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const disposeFormatting = monaco.languages.registerDocumentFormattingEditProvider(languageId, {
|
|
13
|
+
provideDocumentFormattingEdits: (model, options) => {
|
|
14
|
+
const document = createDocument(model);
|
|
15
|
+
return formatDocument(languageService, document, options);
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
const disposeRangeFormatting = monaco.languages.registerDocumentRangeFormattingEditProvider(languageId, {
|
|
19
|
+
provideDocumentRangeFormattingEdits: (model, range, options) => {
|
|
20
|
+
const document = createDocument(model);
|
|
21
|
+
return formatDocument(languageService, document, options, range);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
return () => {
|
|
25
|
+
disposeFormatting.dispose();
|
|
26
|
+
disposeRangeFormatting.dispose();
|
|
27
|
+
};
|
|
28
|
+
}, [languageId, languageService]);
|
|
29
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type InitializeResult } from "vscode-languageserver";
|
|
2
|
+
import { type MaqlLanguageService } from "@gooddata/sdk-maql-language-server";
|
|
3
|
+
import { type IMetadataObject } from "@gooddata/sdk-model";
|
|
4
|
+
import { type IStandaloneCodeEditor } from "../../monaco/MonacoEditor.js";
|
|
5
|
+
export declare function useHover(editor: IStandaloneCodeEditor | null, languageId: string, languageService: MaqlLanguageService | undefined, initializeData: InitializeResult | undefined, onOpen?: (editor: IStandaloneCodeEditor, object: IMetadataObject) => void): void;
|
|
6
|
+
//# sourceMappingURL=useHover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHover.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/maql/hooks/useHover.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAO1E,wBAAgB,QAAQ,CACpB,MAAM,EAAE,qBAAqB,GAAG,IAAI,EACpC,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,mBAAmB,GAAG,SAAS,EAChD,cAAc,EAAE,gBAAgB,GAAG,SAAS,EAC5C,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,eAAe,KAAK,IAAI,GAC1E,IAAI,CA6DN"}
|