@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,47 @@
|
|
|
1
|
+
import type * as monaco from "monaco-editor/editor/editor.api.js";
|
|
2
|
+
import { type IStandaloneEditorConstructionOptions } from "./MonacoEditor.js";
|
|
3
|
+
export interface IMaqlEditorIcon {
|
|
4
|
+
base64: string;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IMaqlEditorIcons {
|
|
9
|
+
fact?: IMaqlEditorIcon;
|
|
10
|
+
metric?: IMaqlEditorIcon;
|
|
11
|
+
dataset?: IMaqlEditorIcon;
|
|
12
|
+
label?: IMaqlEditorIcon;
|
|
13
|
+
attribute?: IMaqlEditorIcon;
|
|
14
|
+
keyword?: IMaqlEditorIcon;
|
|
15
|
+
function?: IMaqlEditorIcon;
|
|
16
|
+
detail?: IMaqlEditorIcon;
|
|
17
|
+
next?: IMaqlEditorIcon;
|
|
18
|
+
prev?: IMaqlEditorIcon;
|
|
19
|
+
close?: IMaqlEditorIcon;
|
|
20
|
+
}
|
|
21
|
+
export declare const DecoratorHovered = "hovered-decorator";
|
|
22
|
+
export declare const DecoratorClassName = "decorator";
|
|
23
|
+
export declare const DecoratorItemClassName = "decorator-item";
|
|
24
|
+
type Decorators = {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
decoratorItem: Array<string>;
|
|
27
|
+
decorator: Array<string>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const DecoratorFact = "fact";
|
|
31
|
+
export declare const DecoratorAttribute = "attribute";
|
|
32
|
+
export declare const DecoratorDateAttribute = "dateAttribute";
|
|
33
|
+
export declare const DecoratorComputedAttribute = "computedAttribute";
|
|
34
|
+
export declare const DecoratorLabel = "label";
|
|
35
|
+
export declare const DecoratorDateLabel = "dateLabel";
|
|
36
|
+
export declare const DecoratorMetric = "metric";
|
|
37
|
+
export declare const DecoratorDataset = "dataset";
|
|
38
|
+
export declare const DecoratorParameter = "parameter";
|
|
39
|
+
export declare const Decorators: Decorators;
|
|
40
|
+
export declare function MonacoStyles({ id, icons, themeData, options, }: {
|
|
41
|
+
id: string;
|
|
42
|
+
icons?: IMaqlEditorIcons;
|
|
43
|
+
themeData?: monaco.editor.IStandaloneThemeData;
|
|
44
|
+
options?: Partial<IStandaloneEditorConstructionOptions>;
|
|
45
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=MonacoEditor.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MonacoEditor.styles.d.ts","sourceRoot":"","sources":["../../../src/MaqlEditor/monaco/MonacoEditor.styles.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,MAAM,oCAAoC,CAAC;AAMlE,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,mBAAmB,CAAC;AAI9E,MAAM,WAAW,eAAe;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AACpD,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAC9C,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AAEvD,KAAK,UAAU,GAAG;IACd,CAAC,GAAG,EAAE,MAAM,GAAG;QACX,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KAC5B,CAAC;CACL,CAAC;AACF,eAAO,MAAM,aAAa,SAAS,CAAC;AACpC,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAC9C,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AACtD,eAAO,MAAM,0BAA0B,sBAAsB,CAAC;AAC9D,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAC9C,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAC9C,eAAO,MAAM,UAAU,EAAE,UAyCxB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EACzB,EAAE,EACF,KAAK,EACL,SAAS,EACT,OAAY,GACf,EAAE;IACC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC,oCAAoC,CAAC,CAAC;CAC3D,2CAIA"}
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2021-2026 GoodData Corporation
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { GlobalStyles } from "tss-react";
|
|
5
|
+
import { makeStyles } from "../theme/styles.js";
|
|
6
|
+
const useStyles = makeStyles()(() => ({}));
|
|
7
|
+
export const DecoratorHovered = "hovered-decorator";
|
|
8
|
+
export const DecoratorClassName = "decorator";
|
|
9
|
+
export const DecoratorItemClassName = "decorator-item";
|
|
10
|
+
export const DecoratorFact = "fact";
|
|
11
|
+
export const DecoratorAttribute = "attribute";
|
|
12
|
+
export const DecoratorDateAttribute = "dateAttribute";
|
|
13
|
+
export const DecoratorComputedAttribute = "computedAttribute";
|
|
14
|
+
export const DecoratorLabel = "label";
|
|
15
|
+
export const DecoratorDateLabel = "dateLabel";
|
|
16
|
+
export const DecoratorMetric = "metric";
|
|
17
|
+
export const DecoratorDataset = "dataset";
|
|
18
|
+
export const DecoratorParameter = "parameter";
|
|
19
|
+
export const Decorators = {
|
|
20
|
+
[DecoratorFact]: {
|
|
21
|
+
decoratorItem: [DecoratorItemClassName, DecoratorFact],
|
|
22
|
+
decorator: [DecoratorClassName, DecoratorFact],
|
|
23
|
+
},
|
|
24
|
+
[DecoratorAttribute]: {
|
|
25
|
+
decoratorItem: [DecoratorItemClassName, DecoratorAttribute],
|
|
26
|
+
decorator: [DecoratorClassName, DecoratorAttribute],
|
|
27
|
+
},
|
|
28
|
+
[DecoratorDateAttribute]: {
|
|
29
|
+
decoratorItem: [DecoratorItemClassName, DecoratorDateAttribute],
|
|
30
|
+
decorator: [DecoratorClassName, DecoratorDateAttribute],
|
|
31
|
+
},
|
|
32
|
+
[DecoratorComputedAttribute]: {
|
|
33
|
+
decoratorItem: [DecoratorItemClassName, DecoratorComputedAttribute],
|
|
34
|
+
decorator: [DecoratorClassName, DecoratorComputedAttribute],
|
|
35
|
+
},
|
|
36
|
+
[DecoratorLabel]: {
|
|
37
|
+
decoratorItem: [DecoratorItemClassName, DecoratorLabel],
|
|
38
|
+
decorator: [DecoratorClassName, DecoratorLabel],
|
|
39
|
+
},
|
|
40
|
+
[DecoratorDateLabel]: {
|
|
41
|
+
decoratorItem: [DecoratorItemClassName, DecoratorDateLabel],
|
|
42
|
+
decorator: [DecoratorClassName, DecoratorDateLabel],
|
|
43
|
+
},
|
|
44
|
+
[DecoratorMetric]: {
|
|
45
|
+
decoratorItem: [DecoratorItemClassName, DecoratorMetric],
|
|
46
|
+
decorator: [DecoratorClassName, DecoratorMetric],
|
|
47
|
+
},
|
|
48
|
+
[DecoratorDataset]: {
|
|
49
|
+
decoratorItem: [DecoratorItemClassName, DecoratorDataset],
|
|
50
|
+
decorator: [DecoratorClassName, DecoratorDataset],
|
|
51
|
+
},
|
|
52
|
+
[DecoratorParameter]: {
|
|
53
|
+
decoratorItem: [DecoratorItemClassName, DecoratorParameter],
|
|
54
|
+
decorator: [DecoratorClassName, DecoratorParameter],
|
|
55
|
+
},
|
|
56
|
+
default: {
|
|
57
|
+
decoratorItem: [DecoratorItemClassName, "unknown"],
|
|
58
|
+
decorator: [DecoratorClassName, "unknown"],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
export function MonacoStyles({ id, icons, themeData, options = {}, }) {
|
|
62
|
+
const styles = useMonacoStyles(id, options, icons, themeData);
|
|
63
|
+
return _jsx(GlobalStyles, { styles: styles });
|
|
64
|
+
}
|
|
65
|
+
const linePaddingLeft = 16;
|
|
66
|
+
function useMonacoStyles(id, _options, icons, themeData) {
|
|
67
|
+
const { theme } = useStyles();
|
|
68
|
+
return useMemo(() => {
|
|
69
|
+
const customIcon = {
|
|
70
|
+
display: "block",
|
|
71
|
+
};
|
|
72
|
+
const editorLines = {
|
|
73
|
+
".lines-content": {
|
|
74
|
+
paddingLeft: `${linePaddingLeft}px`,
|
|
75
|
+
},
|
|
76
|
+
textarea: {
|
|
77
|
+
marginLeft: `${linePaddingLeft + 1}px`,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
const editor = {
|
|
81
|
+
".bracket-match": {
|
|
82
|
+
backgroundColor: theme.content.colors.bracketMatch,
|
|
83
|
+
border: "none",
|
|
84
|
+
},
|
|
85
|
+
".monaco-scrollable-element": {
|
|
86
|
+
borderLeft: "none",
|
|
87
|
+
},
|
|
88
|
+
".line-numbers": {
|
|
89
|
+
color: theme.content.colors.lineNumber,
|
|
90
|
+
},
|
|
91
|
+
".active-line-number.line-numbers": {
|
|
92
|
+
color: theme.content.colors.activeLineNumber,
|
|
93
|
+
},
|
|
94
|
+
".monaco-scrollable-element > .scrollbar > .slider ": {
|
|
95
|
+
background: theme.content.colors.slider,
|
|
96
|
+
"&:hover": {
|
|
97
|
+
background: theme.content.colors.sliderHover,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
".codicon-folding-expanded, .codicon-folding-collapsed": {
|
|
101
|
+
width: "16px !important",
|
|
102
|
+
height: "16px !important",
|
|
103
|
+
margin: "3px 0 !important",
|
|
104
|
+
fontSize: "100%",
|
|
105
|
+
},
|
|
106
|
+
...editorLines,
|
|
107
|
+
};
|
|
108
|
+
const suggestionWidget = {
|
|
109
|
+
".suggest-widget": {
|
|
110
|
+
height: "auto !important",
|
|
111
|
+
boxShadow: theme.suggestion.shadow,
|
|
112
|
+
borderColor: `${theme.suggestion.colors.line} !important`,
|
|
113
|
+
".monaco-list .monaco-list-row": {
|
|
114
|
+
fontFamily: theme.suggestion.font,
|
|
115
|
+
background: theme.suggestion.colors.background,
|
|
116
|
+
color: theme.globals.colors.font,
|
|
117
|
+
fontSize: `${theme.suggestion.item.fontSize}px !important`,
|
|
118
|
+
".label-name": {
|
|
119
|
+
"&:hover, &:focus, &:active": {
|
|
120
|
+
textDecoration: "none",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
"&.focused, &.selected, &.focused:hover, &.selected:hover": {
|
|
124
|
+
background: theme.suggestion.colors.selectedBackground,
|
|
125
|
+
color: theme.globals.colors.font,
|
|
126
|
+
},
|
|
127
|
+
"&:hover:not(.selected):not(.focused)": {
|
|
128
|
+
background: `${theme.suggestion.colors.selectedBackground} !important`,
|
|
129
|
+
color: theme.globals.colors.font,
|
|
130
|
+
},
|
|
131
|
+
".monaco-highlighted-label .highlight, &.focused .monaco-highlighted-label .highlight": {
|
|
132
|
+
background: theme.suggestion.colors.highlightedBackground,
|
|
133
|
+
color: theme.globals.colors.font,
|
|
134
|
+
},
|
|
135
|
+
"&.focused .readMore": {
|
|
136
|
+
display: "inline-block !important",
|
|
137
|
+
visibility: "visible !important",
|
|
138
|
+
"&[aria-hidden='true']": {
|
|
139
|
+
display: "none !important",
|
|
140
|
+
},
|
|
141
|
+
"&:before": {
|
|
142
|
+
padding: "3px 0",
|
|
143
|
+
display: "block",
|
|
144
|
+
backgroundPosition: "center",
|
|
145
|
+
...createIconDefinition(icons?.detail),
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
"&.focused:hover .details-label, &.focused .details-label": {
|
|
149
|
+
width: "calc(100% - 32px) !important",
|
|
150
|
+
},
|
|
151
|
+
"& > .contents": {
|
|
152
|
+
paddingLeft: "10px",
|
|
153
|
+
},
|
|
154
|
+
".details-label": {
|
|
155
|
+
fontSize: `${theme.suggestion.label.fontSize}px`,
|
|
156
|
+
fontFamily: theme.globals.font,
|
|
157
|
+
color: theme.suggestion.colors.active,
|
|
158
|
+
},
|
|
159
|
+
".suggest-icon": {
|
|
160
|
+
marginRight: "5px",
|
|
161
|
+
"&.codicon-symbol-field:before": {
|
|
162
|
+
...customIcon,
|
|
163
|
+
...createIconDefinition(icons?.fact),
|
|
164
|
+
},
|
|
165
|
+
"&.codicon-symbol-variable:before": {
|
|
166
|
+
...customIcon,
|
|
167
|
+
...createIconDefinition(icons?.metric),
|
|
168
|
+
},
|
|
169
|
+
"&.codicon-symbol-constant:before": {
|
|
170
|
+
...customIcon,
|
|
171
|
+
...createIconDefinition(icons?.dataset),
|
|
172
|
+
},
|
|
173
|
+
"&.codicon-symbol-text:before": {
|
|
174
|
+
...customIcon,
|
|
175
|
+
...createIconDefinition(icons?.label),
|
|
176
|
+
},
|
|
177
|
+
"&.codicon-symbol-enum:before": {
|
|
178
|
+
...customIcon,
|
|
179
|
+
...createIconDefinition(icons?.attribute),
|
|
180
|
+
},
|
|
181
|
+
"&.codicon-symbol-keyword:before": {
|
|
182
|
+
...customIcon,
|
|
183
|
+
...createIconDefinition(icons?.keyword),
|
|
184
|
+
},
|
|
185
|
+
"&.codicon-symbol-function:before": {
|
|
186
|
+
...customIcon,
|
|
187
|
+
...createIconDefinition(icons?.function),
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
const suggestionsDetails = {
|
|
194
|
+
".suggest-details": {
|
|
195
|
+
fontFamily: theme.globals.font,
|
|
196
|
+
minHeight: `${2 * theme.detail.padding + theme.detail.header.size}px`,
|
|
197
|
+
borderColor: `${theme.detail.colors.border} !important`,
|
|
198
|
+
boxShadow: `0 1px 20px ${theme.globals.colors.shadow}`,
|
|
199
|
+
".monaco-scrollable-element .body": {
|
|
200
|
+
color: theme.globals.colors.font,
|
|
201
|
+
background: theme.detail.colors.background,
|
|
202
|
+
padding: `${theme.detail.padding}px`,
|
|
203
|
+
".header": {
|
|
204
|
+
fontSize: `${theme.detail.header.fontSize}px`,
|
|
205
|
+
lineHeight: `${theme.detail.header.lineHeight}px`,
|
|
206
|
+
color: theme.detail.colors.header,
|
|
207
|
+
".codicon-close": {
|
|
208
|
+
width: "auto !important",
|
|
209
|
+
height: "auto !important",
|
|
210
|
+
fontFamily: theme.detail.header.close.font,
|
|
211
|
+
fontSize: `${theme.detail.header.close.size}px`,
|
|
212
|
+
top: `${theme.detail.padding}px`,
|
|
213
|
+
right: `${theme.detail.padding}px`,
|
|
214
|
+
"&::before": {
|
|
215
|
+
content: '"\\e62d"',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
p: {
|
|
219
|
+
margin: `0 ${theme.detail.padding * 2}px 0 0`,
|
|
220
|
+
padding: 0,
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
const decorators = Object.keys(Decorators).reduce((prev, name) => {
|
|
227
|
+
const item = Decorators[name];
|
|
228
|
+
prev[`.${item.decorator.join(".")}`] = {
|
|
229
|
+
background: themeData?.colors[`editor.variable.${name}.background`] ?? "#cecece",
|
|
230
|
+
color: themeData?.colors[`editor.variable.${name}.color`] ?? "#7e7e7e",
|
|
231
|
+
...theme.decorator,
|
|
232
|
+
};
|
|
233
|
+
prev[`.${item.decoratorItem.join(".")}`] = {
|
|
234
|
+
color: themeData?.colors[`editor.variable.${name}.color`] ?? "#000000",
|
|
235
|
+
};
|
|
236
|
+
return prev;
|
|
237
|
+
}, {});
|
|
238
|
+
const errorsView = {
|
|
239
|
+
".zone-widget-container.peekview-widget": {
|
|
240
|
+
borderTopWidth: `${theme.errorsBar.border.topWidth}px !important`,
|
|
241
|
+
borderTopColor: `${theme.errorsBar.colors.error} !important`,
|
|
242
|
+
borderBottomColor: `${theme.errorsBar.colors.error} !important`,
|
|
243
|
+
left: theme.errorsBar.left,
|
|
244
|
+
width: `calc(100% - ${theme.errorsBar.left}px)`,
|
|
245
|
+
background: `${theme.errorsBar.colors.bodyBackground} !important`,
|
|
246
|
+
".head": {
|
|
247
|
+
background: `${theme.errorsBar.colors.headBackground} !important`,
|
|
248
|
+
".peekview-title": {
|
|
249
|
+
marginLeft: `${theme.errorsBar.paddingHorizontal}px !important`,
|
|
250
|
+
},
|
|
251
|
+
".filename": {
|
|
252
|
+
display: "none",
|
|
253
|
+
},
|
|
254
|
+
".dirname": {
|
|
255
|
+
fontSize: `${theme.errorsBar.sizes.headerFontSize}px !important`,
|
|
256
|
+
lineHeight: `${theme.errorsBar.sizes.lineHeight}px !important`,
|
|
257
|
+
fontFamily: theme.errorsBar.font,
|
|
258
|
+
color: `${theme.errorsBar.colors.font} !important`,
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
".body": {
|
|
262
|
+
borderColor: `${theme.errorsBar.colors.error} !important`,
|
|
263
|
+
background: `${theme.errorsBar.colors.bodyBackground} !important`,
|
|
264
|
+
".monaco-scrollable-element": {
|
|
265
|
+
border: "none !important",
|
|
266
|
+
width: "auto !important",
|
|
267
|
+
".descriptioncontainer": {
|
|
268
|
+
paddingLeft: `${theme.errorsBar.paddingHorizontal}px !important`,
|
|
269
|
+
paddingRight: `${theme.errorsBar.paddingHorizontal}px !important`,
|
|
270
|
+
paddingTop: `${theme.errorsBar.paddingVertical}px !important`,
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
".message": {
|
|
274
|
+
fontFamily: `${theme.errorsBar.font} !important`,
|
|
275
|
+
fontSize: `${theme.errorsBar.sizes.bodyFontSize}px !important`,
|
|
276
|
+
color: `${theme.errorsBar.colors.body} !important`,
|
|
277
|
+
"& > div::first-letter": {
|
|
278
|
+
textTransform: "uppercase",
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
".codicon-marker-navigation-next:before": {
|
|
283
|
+
...customIcon,
|
|
284
|
+
...createIconDefinition(icons?.next),
|
|
285
|
+
},
|
|
286
|
+
".codicon-marker-navigation-previous:before": {
|
|
287
|
+
...customIcon,
|
|
288
|
+
...createIconDefinition(icons?.prev),
|
|
289
|
+
},
|
|
290
|
+
".codicon-close:before": {
|
|
291
|
+
...customIcon,
|
|
292
|
+
...createIconDefinition(icons?.close),
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
const hoverView = {
|
|
297
|
+
".monaco-hover": {
|
|
298
|
+
border: theme.hoverBar.border,
|
|
299
|
+
borderRadius: theme.hoverBar.sizes.borderRadius,
|
|
300
|
+
background: theme.hoverBar.colors.background,
|
|
301
|
+
boxShadow: theme.hoverBar.boxShadow,
|
|
302
|
+
fontFamily: theme.hoverBar.font,
|
|
303
|
+
".monaco-scrollable-element": {
|
|
304
|
+
border: "none !important",
|
|
305
|
+
},
|
|
306
|
+
".monaco-hover-content": {
|
|
307
|
+
".hover-row": {
|
|
308
|
+
borderTop: "none !important",
|
|
309
|
+
".marker.hover-contents": {
|
|
310
|
+
fontFamily: `${theme.hoverBar.font} !important`,
|
|
311
|
+
margin: theme.hoverBar.margin,
|
|
312
|
+
padding: theme.hoverBar.padding,
|
|
313
|
+
borderRadius: theme.hoverBar.sizes.borderRadiusInner,
|
|
314
|
+
background: theme.hoverBar.colors.errorBackground,
|
|
315
|
+
color: theme.hoverBar.colors.errorText,
|
|
316
|
+
fontSize: `${theme.hoverBar.sizes.font}px !important`,
|
|
317
|
+
"&::first-letter": {
|
|
318
|
+
textTransform: "uppercase",
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
".hover-row.status-bar": {
|
|
323
|
+
display: "none",
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
};
|
|
328
|
+
const hoverDecorator = {
|
|
329
|
+
[`.${DecoratorHovered}`]: {
|
|
330
|
+
background: `${theme.hoverMetric.colors.hover} !important`,
|
|
331
|
+
...theme.decorator,
|
|
332
|
+
},
|
|
333
|
+
};
|
|
334
|
+
return {
|
|
335
|
+
[`#${id} .monaco-editor.vs`]: {
|
|
336
|
+
...editor,
|
|
337
|
+
...suggestionWidget,
|
|
338
|
+
...suggestionsDetails,
|
|
339
|
+
...decorators,
|
|
340
|
+
...hoverDecorator,
|
|
341
|
+
...errorsView,
|
|
342
|
+
...hoverView,
|
|
343
|
+
},
|
|
344
|
+
};
|
|
345
|
+
}, [
|
|
346
|
+
id,
|
|
347
|
+
icons?.attribute,
|
|
348
|
+
icons?.detail,
|
|
349
|
+
icons?.fact,
|
|
350
|
+
icons?.function,
|
|
351
|
+
icons?.keyword,
|
|
352
|
+
icons?.label,
|
|
353
|
+
icons?.metric,
|
|
354
|
+
icons?.dataset,
|
|
355
|
+
icons?.next,
|
|
356
|
+
icons?.prev,
|
|
357
|
+
icons?.close,
|
|
358
|
+
theme.content.colors.activeLineNumber,
|
|
359
|
+
theme.content.colors.lineNumber,
|
|
360
|
+
theme.content.colors.slider,
|
|
361
|
+
theme.content.colors.sliderHover,
|
|
362
|
+
theme.content.colors.bracketMatch,
|
|
363
|
+
theme.detail.colors.background,
|
|
364
|
+
theme.detail.colors.border,
|
|
365
|
+
theme.detail.colors.header,
|
|
366
|
+
theme.detail.header.close.font,
|
|
367
|
+
theme.detail.header.close.size,
|
|
368
|
+
theme.detail.header.fontSize,
|
|
369
|
+
theme.detail.header.lineHeight,
|
|
370
|
+
theme.detail.header.size,
|
|
371
|
+
theme.detail.padding,
|
|
372
|
+
theme.globals.colors.font,
|
|
373
|
+
theme.globals.colors.shadow,
|
|
374
|
+
theme.globals.font,
|
|
375
|
+
theme.suggestion.colors.active,
|
|
376
|
+
theme.suggestion.colors.background,
|
|
377
|
+
theme.suggestion.colors.highlightedBackground,
|
|
378
|
+
theme.suggestion.colors.line,
|
|
379
|
+
theme.suggestion.colors.selectedBackground,
|
|
380
|
+
theme.suggestion.font,
|
|
381
|
+
theme.suggestion.item.fontSize,
|
|
382
|
+
theme.suggestion.label.fontSize,
|
|
383
|
+
theme.suggestion.shadow,
|
|
384
|
+
theme.errorsBar.colors.error,
|
|
385
|
+
theme.errorsBar.colors.headBackground,
|
|
386
|
+
theme.errorsBar.colors.bodyBackground,
|
|
387
|
+
theme.errorsBar.colors.font,
|
|
388
|
+
theme.errorsBar.colors.body,
|
|
389
|
+
theme.errorsBar.border.topWidth,
|
|
390
|
+
theme.errorsBar.sizes.lineHeight,
|
|
391
|
+
theme.errorsBar.sizes.headerFontSize,
|
|
392
|
+
theme.errorsBar.sizes.bodyFontSize,
|
|
393
|
+
theme.errorsBar.left,
|
|
394
|
+
theme.errorsBar.font,
|
|
395
|
+
theme.errorsBar.paddingHorizontal,
|
|
396
|
+
theme.errorsBar.paddingVertical,
|
|
397
|
+
theme.hoverBar.border,
|
|
398
|
+
theme.hoverBar.sizes.borderRadius,
|
|
399
|
+
theme.hoverBar.colors.background,
|
|
400
|
+
theme.hoverBar.boxShadow,
|
|
401
|
+
theme.hoverBar.font,
|
|
402
|
+
theme.hoverBar.margin,
|
|
403
|
+
theme.hoverBar.padding,
|
|
404
|
+
theme.hoverBar.sizes.borderRadiusInner,
|
|
405
|
+
theme.hoverBar.sizes.font,
|
|
406
|
+
theme.hoverBar.colors.errorBackground,
|
|
407
|
+
theme.hoverBar.colors.errorText,
|
|
408
|
+
theme.hoverMetric.colors.hover,
|
|
409
|
+
theme.decorator,
|
|
410
|
+
themeData?.colors,
|
|
411
|
+
]);
|
|
412
|
+
}
|
|
413
|
+
function createIconDefinition(icon) {
|
|
414
|
+
const def = {};
|
|
415
|
+
if (icon) {
|
|
416
|
+
def["content"] = '""';
|
|
417
|
+
def["backgroundImage"] = `url("data:image/svg+xml;base64,${icon.base64}")`;
|
|
418
|
+
def["backgroundRepeat"] = "no-repeat";
|
|
419
|
+
if (icon.width) {
|
|
420
|
+
def["width"] = `${icon.width}px`;
|
|
421
|
+
}
|
|
422
|
+
if (icon.height) {
|
|
423
|
+
def["height"] = `${icon.height}px`;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return def;
|
|
427
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAutofocus.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/monaco/hooks/useAutofocus.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,wBAAgB,YAAY,CACxB,OAAO,EAAE,cAAc,GAAG,IAAI,EAC9B,MAAM,EAAE,qBAAqB,GAAG,IAAI,EACpC,SAAS,EAAE,OAAO,GACnB,IAAI,CAgBN"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
export function useAutofocus(element, editor, autofocus) {
|
|
4
|
+
const timer = useRef(-1);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
clearInterval(timer);
|
|
7
|
+
if (editor && autofocus) {
|
|
8
|
+
createInterval(timer, () => isVisible(element), () => editor.focus());
|
|
9
|
+
}
|
|
10
|
+
return () => clearInterval(timer);
|
|
11
|
+
}, [editor, autofocus, element]);
|
|
12
|
+
}
|
|
13
|
+
function isVisible(element) {
|
|
14
|
+
if (element) {
|
|
15
|
+
const style = window.getComputedStyle(element);
|
|
16
|
+
const notHidden = style.visibility !== "hidden";
|
|
17
|
+
const notNone = style.display !== "none";
|
|
18
|
+
const hasSize = element.offsetHeight > 0;
|
|
19
|
+
return notHidden && notNone && hasSize;
|
|
20
|
+
}
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
function clearInterval(timer) {
|
|
24
|
+
window.clearInterval(timer.current);
|
|
25
|
+
}
|
|
26
|
+
function createInterval(timer, check, done) {
|
|
27
|
+
timer.current = window.setInterval(() => {
|
|
28
|
+
if (check()) {
|
|
29
|
+
done();
|
|
30
|
+
clearInterval(timer);
|
|
31
|
+
}
|
|
32
|
+
}, 25);
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDefaultValue.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/monaco/hooks/useDefaultValue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAahG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
export function useDefaultValue(editor, defaultValue) {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
if (!editor) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const editorModel = editor.getModel();
|
|
9
|
+
const currentValue = editorModel?.getValue();
|
|
10
|
+
if (defaultValue !== currentValue) {
|
|
11
|
+
editor.setValue(defaultValue);
|
|
12
|
+
}
|
|
13
|
+
}, [defaultValue, editor]);
|
|
14
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IMonacoEditorProps, IStandaloneCodeEditor } from "../MonacoEditor.js";
|
|
2
|
+
export declare function useEditorInit(element: HTMLDivElement | null, editor: IStandaloneCodeEditor | null, setEditor: (editor: IStandaloneCodeEditor) => void, props: Omit<IMonacoEditorProps, "autofocus" | "icons">): void;
|
|
3
|
+
//# sourceMappingURL=useEditorInit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditorInit.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/monaco/hooks/useEditorInit.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAER,kBAAkB,EAClB,qBAAqB,EAGxB,MAAM,oBAAoB,CAAC;AAK5B,wBAAgB,aAAa,CACzB,OAAO,EAAE,cAAc,GAAG,IAAI,EAC9B,MAAM,EAAE,qBAAqB,GAAG,IAAI,EACpC,SAAS,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,EAClD,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,CAAC,GACvD,IAAI,CAoEN"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
//more info in README.md
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
import * as monaco from "monaco-editor/editor/editor.api.js";
|
|
5
|
+
import { setupMonacoWorkers } from "../monacoWorkers.js";
|
|
6
|
+
import { useEditorOptions } from "./useEditorOptions.js";
|
|
7
|
+
export function useEditorInit(element, editor, setEditor, props) {
|
|
8
|
+
const { inline = false, readonly = false, defaultValue = "", options, themeName, themeData, language, languageConfiguration, className, onEditorMount = () => { }, onEditorUpdate = () => { }, onContentSizeChange = () => { }, } = props;
|
|
9
|
+
const init = useRef(false);
|
|
10
|
+
const defaultOptions = useEditorOptions(readonly, inline, options);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (!element) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
//NOTE: if editor is already initialized and editor is set, update editor
|
|
16
|
+
if (init.current && editor) {
|
|
17
|
+
onEditorUpdate(editor, monaco);
|
|
18
|
+
return initDisposable(editor, onContentSizeChange);
|
|
19
|
+
}
|
|
20
|
+
//NOTE: if editor is already initialized, do not initialize it again
|
|
21
|
+
// This is case where editor is initialized but still not in state
|
|
22
|
+
if (init.current) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
// Must run before the first `monaco.editor.create` — Monaco reads `MonacoEnvironment` when it
|
|
26
|
+
// lazily spawns its editor worker.
|
|
27
|
+
setupMonacoWorkers();
|
|
28
|
+
const opts = { ...defaultOptions, automaticLayout: true };
|
|
29
|
+
updateTheme(opts, themeName, themeData);
|
|
30
|
+
updateLanguage(opts, language, languageConfiguration);
|
|
31
|
+
updateClassName(opts, className);
|
|
32
|
+
opts.value = defaultValue;
|
|
33
|
+
init.current = true;
|
|
34
|
+
const currentEditor = monaco.editor.create(element, opts);
|
|
35
|
+
setEditor(currentEditor);
|
|
36
|
+
onEditorMount(currentEditor, monaco);
|
|
37
|
+
onEditorUpdate(currentEditor, monaco);
|
|
38
|
+
return initDisposable(currentEditor, onContentSizeChange);
|
|
39
|
+
}, [
|
|
40
|
+
defaultValue,
|
|
41
|
+
defaultOptions,
|
|
42
|
+
themeName,
|
|
43
|
+
themeData,
|
|
44
|
+
language,
|
|
45
|
+
languageConfiguration,
|
|
46
|
+
className,
|
|
47
|
+
element,
|
|
48
|
+
editor,
|
|
49
|
+
onEditorMount,
|
|
50
|
+
onEditorUpdate,
|
|
51
|
+
onContentSizeChange,
|
|
52
|
+
setEditor,
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
function updateTheme(options, themeName, themeData) {
|
|
56
|
+
if (themeName && themeData) {
|
|
57
|
+
monaco.editor.defineTheme(themeName, themeData);
|
|
58
|
+
options.theme = themeName;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function updateLanguage(options, language, configuration) {
|
|
62
|
+
if (language) {
|
|
63
|
+
monaco.languages.register({ id: language });
|
|
64
|
+
if (configuration) {
|
|
65
|
+
monaco.languages.setLanguageConfiguration(language, configuration);
|
|
66
|
+
}
|
|
67
|
+
options.language = language;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function updateClassName(options, className) {
|
|
71
|
+
if (className) {
|
|
72
|
+
options.extraEditorClassName = className;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function initDisposable(editor, onContentSizeChange) {
|
|
76
|
+
const disposable = [];
|
|
77
|
+
disposable.push(onContentSizeChanged(editor, onContentSizeChange));
|
|
78
|
+
return () => disposable.forEach((dis) => {
|
|
79
|
+
dis.dispose();
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function onContentSizeChanged(editor, onContentSizeChange) {
|
|
83
|
+
return editor.onDidContentSizeChange(() => onContentSizeChange?.(editor, monaco, editor.getContentWidth(), editor.getContentHeight()));
|
|
84
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type IStandaloneEditorConstructionOptions } from "../MonacoEditor.js";
|
|
2
|
+
export declare function useEditorOptions(readonly: boolean, inline: boolean | undefined, options?: Partial<IStandaloneEditorConstructionOptions>): IStandaloneEditorConstructionOptions;
|
|
3
|
+
//# sourceMappingURL=useEditorOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditorOptions.d.ts","sourceRoot":"","sources":["../../../../src/MaqlEditor/monaco/hooks/useEditorOptions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oCAAoC,EAAE,MAAM,oBAAoB,CAAC;AAE/E,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,OAAO,GAAG,SAAS,EAC3B,OAAO,GAAE,OAAO,CAAC,oCAAoC,CAAM,GAC5D,oCAAoC,CAmDtC"}
|