@grafana/plugin-ui 0.8.0 → 0.9.0
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/README.md +3 -12
- package/dist/components/AsyncButtonCascader/AsyncButtonCascader.js +1 -2
- package/dist/components/AsyncButtonCascader/AsyncButtonCascader.js.map +1 -1
- package/dist/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js +28 -0
- package/dist/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js.map +1 -0
- package/dist/components/ConfigEditor/AdvancedSettings/index.js +6 -0
- package/dist/components/ConfigEditor/AdvancedSettings/index.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/Auth.js +24 -0
- package/dist/components/ConfigEditor/Auth/Auth.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js +109 -0
- package/dist/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/auth-method/BasicAuth.js +23 -0
- package/dist/components/ConfigEditor/Auth/auth-method/BasicAuth.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeader.js +41 -0
- package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeader.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js +76 -0
- package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/index.js +10 -0
- package/dist/components/ConfigEditor/Auth/index.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/styles.js +19 -0
- package/dist/components/ConfigEditor/Auth/styles.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js +18 -0
- package/dist/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/tls/SkipTLSVerification.js +11 -0
- package/dist/components/ConfigEditor/Auth/tls/SkipTLSVerification.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/tls/TLSClientAuth.js +22 -0
- package/dist/components/ConfigEditor/Auth/tls/TLSClientAuth.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/tls/TLSSettings.js +25 -0
- package/dist/components/ConfigEditor/Auth/tls/TLSSettings.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/tls/TLSSettingsSection.js +35 -0
- package/dist/components/ConfigEditor/Auth/tls/TLSSettingsSection.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/types.js +11 -0
- package/dist/components/ConfigEditor/Auth/types.js.map +1 -0
- package/dist/components/ConfigEditor/Auth/utils.js +112 -0
- package/dist/components/ConfigEditor/Auth/utils.js.map +1 -0
- package/dist/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js +32 -0
- package/dist/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js.map +1 -0
- package/dist/components/ConfigEditor/ConfigSection/ConfigSection.js +12 -0
- package/dist/components/ConfigEditor/ConfigSection/ConfigSection.js.map +1 -0
- package/dist/components/ConfigEditor/ConfigSection/ConfigSubSection.js +12 -0
- package/dist/components/ConfigEditor/ConfigSection/ConfigSubSection.js.map +1 -0
- package/dist/components/ConfigEditor/ConfigSection/GenericConfigSection.js +40 -0
- package/dist/components/ConfigEditor/ConfigSection/GenericConfigSection.js.map +1 -0
- package/dist/components/ConfigEditor/ConfigSection/index.js +10 -0
- package/dist/components/ConfigEditor/ConfigSection/index.js.map +1 -0
- package/dist/components/ConfigEditor/Connection/ConnectionSettings.js +25 -0
- package/dist/components/ConfigEditor/Connection/ConnectionSettings.js.map +1 -0
- package/dist/components/ConfigEditor/Connection/index.js +6 -0
- package/dist/components/ConfigEditor/Connection/index.js.map +1 -0
- package/dist/components/ConfigEditor/DataSourceDescription.js +39 -0
- package/dist/components/ConfigEditor/DataSourceDescription.js.map +1 -0
- package/dist/components/ConfigEditor/SecureSocksProxyToggle.js +3 -7
- package/dist/components/ConfigEditor/SecureSocksProxyToggle.js.map +1 -1
- package/dist/components/ConfigEditor/index.js +15 -3
- package/dist/components/ConfigEditor/index.js.map +1 -1
- package/dist/components/ConfigEditor/types.js +3 -0
- package/dist/components/ConfigEditor/types.js.map +1 -0
- package/dist/components/DataLinks/DataLink.js +3 -3
- package/dist/components/DataLinks/DataLink.js.map +1 -1
- package/dist/components/DataLinks/DataLinks.js +6 -9
- package/dist/components/DataLinks/DataLinks.js.map +1 -1
- package/dist/components/DataLinks/index.js.map +1 -1
- package/dist/components/DataSourcePicker/DataSourcePicker.js +4 -6
- package/dist/components/DataSourcePicker/DataSourcePicker.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +5 -3
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DatePicker/styles.js +8 -10
- package/dist/components/DatePicker/styles.js.map +1 -1
- package/dist/components/DatePickerWithInput/DatePickerWithInput.js +1 -1
- package/dist/components/DatePickerWithInput/DatePickerWithInput.js.map +1 -1
- package/dist/components/DebounceInput/DebounceInput.js +3 -1
- package/dist/components/DebounceInput/DebounceInput.js.map +1 -1
- package/dist/components/QueryEditor/AccessoryButton.js +3 -4
- package/dist/components/QueryEditor/AccessoryButton.js.map +1 -1
- package/dist/components/QueryEditor/EditorField.js +7 -9
- package/dist/components/QueryEditor/EditorField.js.map +1 -1
- package/dist/components/QueryEditor/EditorFieldGroup.js +2 -2
- package/dist/components/QueryEditor/EditorFieldGroup.js.map +1 -1
- package/dist/components/QueryEditor/EditorHeader.js +3 -4
- package/dist/components/QueryEditor/EditorHeader.js.map +1 -1
- package/dist/components/QueryEditor/EditorList.js +5 -6
- package/dist/components/QueryEditor/EditorList.js.map +1 -1
- package/dist/components/QueryEditor/EditorRow.js +3 -3
- package/dist/components/QueryEditor/EditorRow.js.map +1 -1
- package/dist/components/QueryEditor/EditorRows.js +2 -2
- package/dist/components/QueryEditor/EditorRows.js.map +1 -1
- package/dist/components/QueryEditor/EditorStack.js +13 -0
- package/dist/components/QueryEditor/EditorStack.js.map +1 -0
- package/dist/components/QueryEditor/InlineSelect.js +5 -8
- package/dist/components/QueryEditor/InlineSelect.js.map +1 -1
- package/dist/components/QueryEditor/InputGroup.js +29 -9
- package/dist/components/QueryEditor/InputGroup.js.map +1 -1
- package/dist/components/QueryEditor/QueryHeader.js +1 -4
- package/dist/components/QueryEditor/QueryHeader.js.map +1 -1
- package/dist/components/QueryEditor/index.js +3 -3
- package/dist/components/QueryEditor/index.js.map +1 -1
- package/dist/components/QueryEditor/query-editor-raw/QueryEditorRaw.js +2 -2
- package/dist/components/QueryEditor/query-editor-raw/QueryEditorRaw.js.map +1 -1
- package/dist/components/QueryEditor/utils/sql.utils.js.map +1 -1
- package/dist/components/QueryEditor/visual-query-builder/EditorRow.js +2 -2
- package/dist/components/QueryEditor/visual-query-builder/EditorRow.js.map +1 -1
- package/dist/components/QueryEditor/visual-query-builder/EditorRows.js +2 -2
- package/dist/components/QueryEditor/visual-query-builder/EditorRows.js.map +1 -1
- package/dist/components/QueryEditor/visual-query-builder/SelectRow.js +3 -3
- package/dist/components/QueryEditor/visual-query-builder/SelectRow.js.map +1 -1
- package/dist/components/QueryEditor/visual-query-builder/VisualEditor.js.map +1 -1
- package/dist/components/QueryEditorRow/QueryEditorRow.js +3 -4
- package/dist/components/QueryEditorRow/QueryEditorRow.js.map +1 -1
- package/dist/components/SQLEditor/components/SQLEditor.js +330 -0
- package/dist/components/SQLEditor/components/SQLEditor.js.map +1 -0
- package/dist/components/SQLEditor/index.js +25 -0
- package/dist/components/SQLEditor/index.js.map +1 -0
- package/dist/components/SQLEditor/mocks/Monaco.js +23 -0
- package/dist/components/SQLEditor/mocks/Monaco.js.map +1 -0
- package/dist/components/SQLEditor/mocks/TextModel.js +22 -0
- package/dist/components/SQLEditor/mocks/TextModel.js.map +1 -0
- package/dist/components/SQLEditor/mocks/queries/multiLineFullQuery.js +216 -0
- package/dist/components/SQLEditor/mocks/queries/multiLineFullQuery.js.map +1 -0
- package/dist/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js +231 -0
- package/dist/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js.map +1 -0
- package/dist/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js +271 -0
- package/dist/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js.map +1 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js +8 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js.map +1 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineFullQuery.js +196 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineFullQuery.js.map +1 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js +211 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js.map +1 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js +251 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js.map +1 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueries.js +386 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueries.js.map +1 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js +416 -0
- package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js.map +1 -0
- package/dist/components/SQLEditor/mocks/testData.js +22 -0
- package/dist/components/SQLEditor/mocks/testData.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/definition.js +13 -0
- package/dist/components/SQLEditor/standardSql/definition.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/getStandardSuggestions.js +26 -0
- package/dist/components/SQLEditor/standardSql/getStandardSuggestions.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/getStatementPosition.js +24 -0
- package/dist/components/SQLEditor/standardSql/getStatementPosition.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/language.js +875 -0
- package/dist/components/SQLEditor/standardSql/language.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/macros.js +166 -0
- package/dist/components/SQLEditor/standardSql/macros.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js +30 -0
- package/dist/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/standardSuggestionsRegistry.js +378 -0
- package/dist/components/SQLEditor/standardSql/standardSuggestionsRegistry.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/statementPositionResolversRegistry.js +234 -0
- package/dist/components/SQLEditor/standardSql/statementPositionResolversRegistry.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/suggestionsKindRegistry.js +153 -0
- package/dist/components/SQLEditor/standardSql/suggestionsKindRegistry.js.map +1 -0
- package/dist/components/SQLEditor/standardSql/types.js +3 -0
- package/dist/components/SQLEditor/standardSql/types.js.map +1 -0
- package/dist/components/SQLEditor/test-utils/index.js +11 -0
- package/dist/components/SQLEditor/test-utils/index.js.map +1 -0
- package/dist/components/SQLEditor/test-utils/statementPosition.js +40 -0
- package/dist/components/SQLEditor/test-utils/statementPosition.js.map +1 -0
- package/dist/components/SQLEditor/test-utils/types.js +3 -0
- package/dist/components/SQLEditor/test-utils/types.js.map +1 -0
- package/dist/components/SQLEditor/types.js +139 -0
- package/dist/components/SQLEditor/types.js.map +1 -0
- package/dist/components/SQLEditor/utils/LinkedToken.js +147 -0
- package/dist/components/SQLEditor/utils/LinkedToken.js.map +1 -0
- package/dist/components/SQLEditor/utils/commands.js +8 -0
- package/dist/components/SQLEditor/utils/commands.js.map +1 -0
- package/dist/components/SQLEditor/utils/debugger.js +14 -0
- package/dist/components/SQLEditor/utils/debugger.js.map +1 -0
- package/dist/components/SQLEditor/utils/getSuggestionKind.js +18 -0
- package/dist/components/SQLEditor/utils/getSuggestionKind.js.map +1 -0
- package/dist/components/SQLEditor/utils/linkedTokenBuilder.js +46 -0
- package/dist/components/SQLEditor/utils/linkedTokenBuilder.js.map +1 -0
- package/dist/components/SQLEditor/utils/toCompletionItem.js +10 -0
- package/dist/components/SQLEditor/utils/toCompletionItem.js.map +1 -0
- package/dist/components/SQLEditor/utils/tokenUtils.js +72 -0
- package/dist/components/SQLEditor/utils/tokenUtils.js.map +1 -0
- package/dist/components/SQLEditor/utils/types.js +3 -0
- package/dist/components/SQLEditor/utils/types.js.map +1 -0
- package/dist/components/Segment/Segment.js +2 -1
- package/dist/components/Segment/Segment.js.map +1 -1
- package/dist/components/VisualQueryBuilder/QueryModellerBase.js +35 -0
- package/dist/components/VisualQueryBuilder/QueryModellerBase.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/LabelFilterItem.js +125 -0
- package/dist/components/VisualQueryBuilder/components/LabelFilterItem.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/LabelFilters.js +37 -0
- package/dist/components/VisualQueryBuilder/components/LabelFilters.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/OperationEditor.js +41 -0
- package/dist/components/VisualQueryBuilder/components/OperationEditor.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/OperationEditorBody.js +173 -0
- package/dist/components/VisualQueryBuilder/components/OperationEditorBody.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/OperationExplainedBox.js +64 -0
- package/dist/components/VisualQueryBuilder/components/OperationExplainedBox.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/OperationHeader.js +67 -0
- package/dist/components/VisualQueryBuilder/components/OperationHeader.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/OperationInfoButton.js +71 -0
- package/dist/components/VisualQueryBuilder/components/OperationInfoButton.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/OperationList.js +129 -0
- package/dist/components/VisualQueryBuilder/components/OperationList.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/OperationListExplained.js +22 -0
- package/dist/components/VisualQueryBuilder/components/OperationListExplained.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/OperationParamEditor.js +71 -0
- package/dist/components/VisualQueryBuilder/components/OperationParamEditor.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/OperationsEditorRow.js +24 -0
- package/dist/components/VisualQueryBuilder/components/OperationsEditorRow.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/QueryBuilderHints.js +54 -0
- package/dist/components/VisualQueryBuilder/components/QueryBuilderHints.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/QueryEditorModeToggle.js +17 -0
- package/dist/components/VisualQueryBuilder/components/QueryEditorModeToggle.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/QueryHeaderSwitch.js +32 -0
- package/dist/components/VisualQueryBuilder/components/QueryHeaderSwitch.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/QueryOptionGroup.js +81 -0
- package/dist/components/VisualQueryBuilder/components/QueryOptionGroup.js.map +1 -0
- package/dist/components/VisualQueryBuilder/components/RawQuery.js +25 -0
- package/dist/components/VisualQueryBuilder/components/RawQuery.js.map +1 -0
- package/dist/components/VisualQueryBuilder/index.js +29 -0
- package/dist/components/VisualQueryBuilder/index.js.map +1 -0
- package/dist/components/VisualQueryBuilder/types.js +10 -0
- package/dist/components/VisualQueryBuilder/types.js.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/datasource/SqlDatasource.js.map +1 -1
- package/dist/hooks/useDebounce.js +2 -0
- package/dist/hooks/useDebounce.js.map +1 -1
- package/dist/index.js +1 -6
- package/dist/index.js.map +1 -1
- package/dist/src/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.d.ts +8 -0
- package/dist/src/components/ConfigEditor/AdvancedSettings/index.d.ts +1 -0
- package/dist/src/components/ConfigEditor/Auth/Auth.d.ts +18 -0
- package/dist/src/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.d.ts +14 -0
- package/dist/src/components/ConfigEditor/Auth/auth-method/BasicAuth.d.ts +17 -0
- package/dist/src/components/ConfigEditor/Auth/custom-headers/CustomHeader.d.ts +10 -0
- package/dist/src/components/ConfigEditor/Auth/custom-headers/CustomHeaders.d.ts +8 -0
- package/dist/src/components/ConfigEditor/Auth/index.d.ts +4 -0
- package/dist/src/components/ConfigEditor/Auth/styles.d.ts +4 -0
- package/dist/src/components/ConfigEditor/Auth/tls/SelfSignedCertificate.d.ts +13 -0
- package/dist/src/components/ConfigEditor/Auth/tls/SkipTLSVerification.d.ts +7 -0
- package/dist/src/components/ConfigEditor/Auth/tls/TLSClientAuth.d.ts +20 -0
- package/dist/src/components/ConfigEditor/Auth/tls/TLSSettings.d.ts +11 -0
- package/dist/src/components/ConfigEditor/Auth/tls/TLSSettingsSection.d.ts +9 -0
- package/dist/src/components/ConfigEditor/Auth/types.d.ts +28 -0
- package/dist/src/components/ConfigEditor/Auth/utils.d.ts +12 -0
- package/dist/src/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.d.ts +8 -0
- package/dist/src/components/ConfigEditor/ConfigSection/ConfigSection.d.ts +5 -0
- package/dist/src/components/ConfigEditor/ConfigSection/ConfigSubSection.d.ts +5 -0
- package/dist/src/components/ConfigEditor/ConfigSection/GenericConfigSection.d.ts +10 -0
- package/dist/src/components/ConfigEditor/ConfigSection/index.d.ts +3 -0
- package/dist/src/components/ConfigEditor/Connection/ConnectionSettings.d.ts +13 -0
- package/dist/src/components/ConfigEditor/Connection/index.d.ts +1 -0
- package/dist/src/components/ConfigEditor/DataSourceDescription.d.ts +9 -0
- package/dist/src/components/ConfigEditor/index.d.ts +7 -2
- package/dist/src/components/ConfigEditor/types.d.ts +3 -0
- package/dist/src/components/DataLinks/DataLink.d.ts +1 -1
- package/dist/src/components/QueryEditor/EditorField.d.ts +1 -0
- package/dist/src/components/QueryEditor/EditorList.d.ts +1 -1
- package/dist/src/components/QueryEditor/EditorStack.d.ts +13 -0
- package/dist/src/components/QueryEditor/InputGroup.d.ts +6 -2
- package/dist/src/components/QueryEditor/index.d.ts +1 -1
- package/dist/src/components/QueryEditor/query-editor-raw/QueryEditorRaw.d.ts +1 -1
- package/dist/src/components/QueryEditor/types.d.ts +1 -6
- package/dist/src/components/QueryEditor/visual-query-builder/VisualEditor.d.ts +1 -2
- package/dist/src/components/SQLEditor/components/SQLEditor.d.ts +29 -0
- package/dist/src/components/SQLEditor/index.d.ts +7 -0
- package/dist/src/components/SQLEditor/mocks/Monaco.d.ts +3 -0
- package/dist/src/components/SQLEditor/mocks/TextModel.d.ts +7 -0
- package/dist/src/components/SQLEditor/mocks/queries/multiLineFullQuery.d.ts +2 -0
- package/dist/src/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.d.ts +2 -0
- package/dist/src/components/SQLEditor/mocks/queries/multiLineMultipleColumns.d.ts +2 -0
- package/dist/src/components/SQLEditor/mocks/queries/singleLineEmptyQuery.d.ts +2 -0
- package/dist/src/components/SQLEditor/mocks/queries/singleLineFullQuery.d.ts +2 -0
- package/dist/src/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.d.ts +2 -0
- package/dist/src/components/SQLEditor/mocks/queries/singleLineMultipleColumns.d.ts +2 -0
- package/dist/src/components/SQLEditor/mocks/queries/singleLineTwoQueries.d.ts +2 -0
- package/dist/src/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.d.ts +2 -0
- package/dist/src/components/SQLEditor/mocks/testData.d.ts +9 -0
- package/dist/src/components/SQLEditor/standardSql/definition.d.ts +3 -0
- package/dist/src/components/SQLEditor/standardSql/getStandardSuggestions.d.ts +6 -0
- package/dist/src/components/SQLEditor/standardSql/getStatementPosition.d.ts +5 -0
- package/dist/src/components/SQLEditor/standardSql/language.d.ts +23 -0
- package/dist/src/components/SQLEditor/standardSql/macros.d.ts +2 -0
- package/dist/src/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.d.ts +4 -0
- package/dist/src/components/SQLEditor/standardSql/standardSuggestionsRegistry.d.ts +7 -0
- package/dist/src/components/SQLEditor/standardSql/statementPositionResolversRegistry.d.ts +2 -0
- package/dist/src/components/SQLEditor/standardSql/suggestionsKindRegistry.d.ts +7 -0
- package/dist/src/components/SQLEditor/standardSql/types.d.ts +33 -0
- package/dist/src/components/SQLEditor/test-utils/index.d.ts +7 -0
- package/dist/src/components/SQLEditor/test-utils/statementPosition.d.ts +3 -0
- package/dist/src/components/SQLEditor/test-utils/types.d.ts +12 -0
- package/dist/src/components/SQLEditor/types.d.ts +249 -0
- package/dist/src/components/SQLEditor/utils/LinkedToken.d.ts +29 -0
- package/dist/src/components/SQLEditor/utils/commands.d.ts +4 -0
- package/dist/src/components/SQLEditor/utils/debugger.d.ts +5 -0
- package/dist/src/components/SQLEditor/utils/getSuggestionKind.d.ts +7 -0
- package/dist/src/components/SQLEditor/utils/linkedTokenBuilder.d.ts +4 -0
- package/dist/src/components/SQLEditor/utils/toCompletionItem.d.ts +2 -0
- package/dist/src/components/SQLEditor/utils/tokenUtils.d.ts +14 -0
- package/dist/src/components/SQLEditor/utils/types.d.ts +11 -0
- package/dist/src/components/VisualQueryBuilder/QueryModellerBase.d.ts +18 -0
- package/dist/src/components/VisualQueryBuilder/components/LabelFilterItem.d.ts +18 -0
- package/dist/src/components/VisualQueryBuilder/components/LabelFilters.d.ts +14 -0
- package/dist/src/components/VisualQueryBuilder/components/OperationEditor.d.ts +19 -0
- package/dist/src/components/VisualQueryBuilder/components/OperationEditorBody.d.ts +22 -0
- package/dist/src/components/VisualQueryBuilder/components/OperationExplainedBox.d.ts +7 -0
- package/dist/src/components/VisualQueryBuilder/components/OperationHeader.d.ts +14 -0
- package/dist/src/components/VisualQueryBuilder/components/OperationInfoButton.d.ts +9 -0
- package/dist/src/components/VisualQueryBuilder/components/OperationList.d.ts +15 -0
- package/dist/src/components/VisualQueryBuilder/components/OperationListExplained.d.ts +17 -0
- package/dist/src/components/VisualQueryBuilder/components/OperationParamEditor.d.ts +4 -0
- package/dist/src/components/VisualQueryBuilder/components/OperationsEditorRow.d.ts +2 -0
- package/dist/src/components/VisualQueryBuilder/components/QueryBuilderHints.d.ts +20 -0
- package/dist/src/components/VisualQueryBuilder/components/QueryEditorModeToggle.d.ts +8 -0
- package/dist/src/components/VisualQueryBuilder/components/QueryHeaderSwitch.d.ts +7 -0
- package/dist/src/components/VisualQueryBuilder/components/QueryOptionGroup.d.ts +9 -0
- package/dist/src/components/VisualQueryBuilder/components/RawQuery.d.ts +12 -0
- package/dist/src/components/VisualQueryBuilder/index.d.ts +13 -0
- package/dist/src/components/VisualQueryBuilder/types.d.ts +89 -0
- package/dist/src/components/index.d.ts +5 -3
- package/dist/src/datasource/SqlDatasource.d.ts +0 -3
- package/dist/src/index.d.ts +0 -3
- package/dist/src/utils/changeset/functions.d.ts +1 -1
- package/dist/test/mocks/Datasource.js +1 -1
- package/dist/test/mocks/Datasource.js.map +1 -1
- package/dist/test/mocks/Plugin.js +2 -11
- package/dist/test/mocks/Plugin.js.map +1 -1
- package/dist/test/mocks/utils.js.map +1 -1
- package/dist/utils/changeset/functions.js +1 -1
- package/dist/utils/changeset/functions.js.map +1 -1
- package/dist/utils/changeset/index.js +20 -20
- package/dist/utils/changeset/index.js.map +1 -1
- package/package.json +29 -13
- package/dist/8x/fixtures/index.js +0 -7
- package/dist/8x/fixtures/index.js.map +0 -1
- package/dist/8x/fixtures/select.js +0 -43
- package/dist/8x/fixtures/select.js.map +0 -1
- package/dist/8x/index.js +0 -5
- package/dist/8x/index.js.map +0 -1
- package/dist/components/ConfigEditor/InlineLabel.js +0 -24
- package/dist/components/ConfigEditor/InlineLabel.js.map +0 -1
- package/dist/components/QueryEditor/ErrorBoundary.js +0 -23
- package/dist/components/QueryEditor/ErrorBoundary.js.map +0 -1
- package/dist/components/QueryEditor/Stack.js +0 -27
- package/dist/components/QueryEditor/Stack.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/Stack.js +0 -27
- package/dist/components/QueryEditor/visual-query-builder/Stack.js.map +0 -1
- package/dist/src/8x/fixtures/index.d.ts +0 -1
- package/dist/src/8x/fixtures/select.d.ts +0 -11
- package/dist/src/8x/index.d.ts +0 -1
- package/dist/src/components/ConfigEditor/InlineLabel.d.ts +0 -7
- package/dist/src/components/QueryEditor/ErrorBoundary.d.ts +0 -14
- package/dist/src/components/QueryEditor/Stack.d.ts +0 -10
- package/dist/src/components/QueryEditor/visual-query-builder/Stack.d.ts +0 -10
- package/dist/src/test/mocks/TestDatasource.d.ts +0 -6
- package/dist/src/test/mocks/style.d.ts +0 -1
- package/dist/src/test/setupTests.d.ts +0 -1
- package/dist/src/utils/compatFeatures.d.ts +0 -9
- package/dist/src/utils/compatibility.d.ts +0 -13
- package/dist/src/utils/index.d.ts +0 -3
- package/dist/src/utils/testDatasource.d.ts +0 -19
- package/dist/test/mocks/TestDatasource.js +0 -24
- package/dist/test/mocks/TestDatasource.js.map +0 -1
- package/dist/test/mocks/style.js +0 -5
- package/dist/test/mocks/style.js.map +0 -1
- package/dist/test/setupTests.js +0 -17
- package/dist/test/setupTests.js.map +0 -1
- package/dist/utils/compatFeatures.js +0 -20
- package/dist/utils/compatFeatures.js.map +0 -1
- package/dist/utils/compatibility.js +0 -31
- package/dist/utils/compatibility.js.map +0 -1
- package/dist/utils/index.js +0 -8
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/testDatasource.js +0 -30
- package/dist/utils/testDatasource.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DataSourceApi, TimeRange } from '@grafana/data';
|
|
3
|
+
import { QueryBuilderOperation, VisualQuery, VisualQueryModeller } from '../types';
|
|
4
|
+
export interface Props<T extends VisualQuery> {
|
|
5
|
+
query: T;
|
|
6
|
+
datasource: DataSourceApi;
|
|
7
|
+
onChange: (query: T) => void;
|
|
8
|
+
onRunQuery: () => void;
|
|
9
|
+
queryModeller: VisualQueryModeller;
|
|
10
|
+
explainMode?: boolean;
|
|
11
|
+
highlightedOp?: QueryBuilderOperation;
|
|
12
|
+
timeRange?: TimeRange;
|
|
13
|
+
isConflictingOperation?: (operation: QueryBuilderOperation, otherOperations: QueryBuilderOperation[]) => boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function OperationList<T extends VisualQuery>({ query, datasource, queryModeller, onChange, onRunQuery, highlightedOp, timeRange, isConflictingOperation, }: Props<T>): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Grammar } from 'prismjs';
|
|
3
|
+
import { QueryBuilderOperation, VisualQuery, VisualQueryModeller } from '../types';
|
|
4
|
+
interface Props<T extends VisualQuery> {
|
|
5
|
+
query: T;
|
|
6
|
+
queryModeller: VisualQueryModeller;
|
|
7
|
+
explainMode?: boolean;
|
|
8
|
+
stepNumber: number;
|
|
9
|
+
language: {
|
|
10
|
+
grammar: Grammar;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
onMouseEnter?: (op: QueryBuilderOperation, index: number) => void;
|
|
14
|
+
onMouseLeave?: (op: QueryBuilderOperation, index: number) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function OperationListExplained<T extends VisualQuery>({ query, queryModeller, stepNumber, language, onMouseEnter, onMouseLeave, }: Props<T>): JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { QueryBuilderOperationParamDef, QueryBuilderOperationParamEditorProps } from '../types';
|
|
3
|
+
export declare function getOperationParamEditor(paramDef: QueryBuilderOperationParamDef): FunctionComponent<QueryBuilderOperationParamEditorProps>;
|
|
4
|
+
export declare function getOperationParamId(operationId: string, paramIndex: number): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DataSourceApi, PanelData, DataQuery } from '@grafana/data';
|
|
3
|
+
import { VisualQuery, VisualQueryModeller } from '../types';
|
|
4
|
+
interface Props<TVisualQuery extends VisualQuery, TDataQuery extends DataQuery> {
|
|
5
|
+
query: TVisualQuery;
|
|
6
|
+
datasource: DataSourceApi<TDataQuery>;
|
|
7
|
+
queryModeller: VisualQueryModeller;
|
|
8
|
+
buildVisualQueryFromString: (queryString: string) => {
|
|
9
|
+
query: TVisualQuery;
|
|
10
|
+
};
|
|
11
|
+
buildDataQueryFromQueryString: (queryString: string) => TDataQuery;
|
|
12
|
+
buildQueryStringFromDataQuery: (dataQuery: TDataQuery) => string;
|
|
13
|
+
onChange: (update: TVisualQuery) => void;
|
|
14
|
+
data?: PanelData;
|
|
15
|
+
}
|
|
16
|
+
export declare const QueryBuilderHints: {
|
|
17
|
+
<TVisualQuery extends VisualQuery, TDataQuery extends DataQuery>({ datasource, query: visualQuery, onChange, data, queryModeller, buildVisualQueryFromString, buildDataQueryFromQueryString, buildQueryStringFromDataQuery, }: Props<TVisualQuery, TDataQuery>): JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { QueryEditorMode } from '../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
mode: QueryEditorMode;
|
|
5
|
+
onChange: (mode: QueryEditorMode) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function QueryEditorModeToggle({ mode, onChange }: Props): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { QueryStats } from '../types';
|
|
3
|
+
interface Props {
|
|
4
|
+
title: string;
|
|
5
|
+
collapsedInfo: string[];
|
|
6
|
+
queryStats?: QueryStats | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function QueryOptionGroup({ title, children, collapsedInfo, queryStats }: React.PropsWithChildren<Props>): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Grammar } from 'prismjs';
|
|
3
|
+
interface Props {
|
|
4
|
+
query: string;
|
|
5
|
+
language: {
|
|
6
|
+
grammar: Grammar;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function RawQuery({ query, language, className }: Props): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { QueryModellerBase } from './QueryModellerBase';
|
|
2
|
+
export { LabelFilters } from './components/LabelFilters';
|
|
3
|
+
export { OperationExplainedBox } from './components/OperationExplainedBox';
|
|
4
|
+
export { OperationList } from './components/OperationList';
|
|
5
|
+
export { OperationListExplained } from './components/OperationListExplained';
|
|
6
|
+
export { OperationsEditorRow } from './components/OperationsEditorRow';
|
|
7
|
+
export { QueryBuilderHints } from './components/QueryBuilderHints';
|
|
8
|
+
export { QueryEditorModeToggle } from './components/QueryEditorModeToggle';
|
|
9
|
+
export { QueryHeaderSwitch } from './components/QueryHeaderSwitch';
|
|
10
|
+
export { QueryOptionGroup } from './components/QueryOptionGroup';
|
|
11
|
+
export { RawQuery } from './components/RawQuery';
|
|
12
|
+
export type { QueryBuilderOperationParamEditorProps, QueryBuilderLabelFilter, QueryBuilderOperation, QueryBuilderOperationParamValue, QueryBuilderOperationDefinition, QueryBuilderOperationParamDef, VisualQueryModeller, VisualQueryBinary, VisualQuery, QueryStats } from './types';
|
|
13
|
+
export { QueryEditorMode, BINARY_OPERATIONS_KEY } from './types';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { DataSourceApi, RegistryItem, SelectableValue, TimeRange } from '@grafana/data';
|
|
3
|
+
export interface QueryBuilderLabelFilter {
|
|
4
|
+
label: string;
|
|
5
|
+
op: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export interface QueryBuilderOperation {
|
|
9
|
+
id: string;
|
|
10
|
+
params: QueryBuilderOperationParamValue[];
|
|
11
|
+
}
|
|
12
|
+
export interface QueryBuilderOperationDefinition<T = any> extends RegistryItem {
|
|
13
|
+
documentation?: string;
|
|
14
|
+
params: QueryBuilderOperationParamDef[];
|
|
15
|
+
defaultParams: QueryBuilderOperationParamValue[];
|
|
16
|
+
category: string;
|
|
17
|
+
hideFromList?: boolean;
|
|
18
|
+
alternativesKey?: string;
|
|
19
|
+
/** Can be used to control operation placement when adding a new operations, lower are placed first */
|
|
20
|
+
orderRank?: number;
|
|
21
|
+
renderer: QueryBuilderOperationRenderer;
|
|
22
|
+
addOperationHandler: QueryBuilderAddOperationHandler<T>;
|
|
23
|
+
paramChangedHandler?: QueryBuilderOnParamChangedHandler;
|
|
24
|
+
explainHandler?: QueryBuilderExplainOperationHandler;
|
|
25
|
+
changeTypeHandler?: (op: QueryBuilderOperation, newDef: QueryBuilderOperationDefinition<T>) => QueryBuilderOperation;
|
|
26
|
+
}
|
|
27
|
+
type QueryBuilderAddOperationHandler<T> = (def: QueryBuilderOperationDefinition, query: T, modeller: VisualQueryModeller) => T;
|
|
28
|
+
type QueryBuilderExplainOperationHandler = (op: QueryBuilderOperation, def?: QueryBuilderOperationDefinition) => string;
|
|
29
|
+
type QueryBuilderOnParamChangedHandler = (index: number, operation: QueryBuilderOperation, operationDef: QueryBuilderOperationDefinition) => QueryBuilderOperation;
|
|
30
|
+
type QueryBuilderOperationRenderer = (model: QueryBuilderOperation, def: QueryBuilderOperationDefinition, innerQuery: string) => string;
|
|
31
|
+
export type QueryBuilderOperationParamValue = string | number | boolean;
|
|
32
|
+
export interface QueryBuilderOperationParamDef {
|
|
33
|
+
name: string;
|
|
34
|
+
type: 'string' | 'number' | 'boolean';
|
|
35
|
+
options?: string[] | number[] | Array<SelectableValue<string>>;
|
|
36
|
+
hideName?: boolean;
|
|
37
|
+
restParam?: boolean;
|
|
38
|
+
optional?: boolean;
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
minWidth?: number;
|
|
42
|
+
editor?: FunctionComponent<QueryBuilderOperationParamEditorProps>;
|
|
43
|
+
runQueryOnEnter?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface QueryBuilderOperationParamEditorProps {
|
|
46
|
+
value?: QueryBuilderOperationParamValue;
|
|
47
|
+
paramDef: QueryBuilderOperationParamDef;
|
|
48
|
+
/** Parameter index */
|
|
49
|
+
index: number;
|
|
50
|
+
operation: QueryBuilderOperation;
|
|
51
|
+
operationId: string;
|
|
52
|
+
query: any;
|
|
53
|
+
datasource: DataSourceApi;
|
|
54
|
+
timeRange?: TimeRange;
|
|
55
|
+
onChange: (index: number, value: QueryBuilderOperationParamValue) => void;
|
|
56
|
+
onRunQuery: () => void;
|
|
57
|
+
queryModeller: VisualQueryModeller;
|
|
58
|
+
}
|
|
59
|
+
export declare enum QueryEditorMode {
|
|
60
|
+
Code = "code",
|
|
61
|
+
Builder = "builder"
|
|
62
|
+
}
|
|
63
|
+
export type QueryStats = {
|
|
64
|
+
bytes: number;
|
|
65
|
+
message?: string;
|
|
66
|
+
};
|
|
67
|
+
export interface VisualQueryModeller {
|
|
68
|
+
getOperationsForCategory(category: string): QueryBuilderOperationDefinition[];
|
|
69
|
+
getAlternativeOperations(key: string): QueryBuilderOperationDefinition[];
|
|
70
|
+
getCategories(): string[];
|
|
71
|
+
getOperationDefinition(id: string): QueryBuilderOperationDefinition | undefined;
|
|
72
|
+
renderQuery(query: VisualQuery, nested?: boolean): string;
|
|
73
|
+
renderLabels(labels: QueryBuilderLabelFilter[]): string;
|
|
74
|
+
innerQueryPlaceholder: string;
|
|
75
|
+
}
|
|
76
|
+
export interface VisualQueryBinary<T> {
|
|
77
|
+
operator: string;
|
|
78
|
+
vectorMatchesType?: 'on' | 'ignoring';
|
|
79
|
+
vectorMatches?: string;
|
|
80
|
+
query: T;
|
|
81
|
+
}
|
|
82
|
+
export declare const BINARY_OPERATIONS_KEY = "Binary operations";
|
|
83
|
+
export interface VisualQuery {
|
|
84
|
+
metric?: string;
|
|
85
|
+
labels: QueryBuilderLabelFilter[];
|
|
86
|
+
operations: QueryBuilderOperation[];
|
|
87
|
+
binaryQueries?: Array<VisualQueryBinary<VisualQuery>>;
|
|
88
|
+
}
|
|
89
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { AsyncButtonCascader } from './AsyncButtonCascader/AsyncButtonCascader';
|
|
2
2
|
export { QueryEditorRow } from './QueryEditorRow/QueryEditorRow';
|
|
3
|
-
export { DebounceInput, DebounceInputProps
|
|
4
|
-
export { Segment, SegmentProps
|
|
3
|
+
export { DebounceInput, DebounceInputProps } from './DebounceInput/DebounceInput';
|
|
4
|
+
export { Segment, SegmentProps } from './Segment/Segment';
|
|
5
5
|
export { DatePicker, DatePickerProps } from './DatePicker/DatePicker';
|
|
6
|
-
export { DatePickerWithInput, DatePickerWithInputProps, formatDate
|
|
6
|
+
export { DatePickerWithInput, DatePickerWithInputProps, formatDate } from './DatePickerWithInput/DatePickerWithInput';
|
|
7
7
|
export * from './DataSourcePicker/DataSourcePicker';
|
|
8
8
|
export * from './DataLinks';
|
|
9
9
|
export * from './Cascader/Cascader';
|
|
@@ -11,3 +11,5 @@ export { InlineSwitch, CertificationKey } from '@grafana/ui';
|
|
|
11
11
|
export * from './QueryEditor';
|
|
12
12
|
export * from './ConfigEditor';
|
|
13
13
|
export { CustomHeadersSettings } from './CustomHeadersSettings/CustomHeadersSettings';
|
|
14
|
+
export * from './VisualQueryBuilder';
|
|
15
|
+
export * from './SQLEditor';
|
|
@@ -54,9 +54,6 @@ interface MetricFindQueryOptions extends SearchFilterOptions {
|
|
|
54
54
|
}
|
|
55
55
|
export declare const SEARCH_FILTER_VARIABLE = "__searchFilter";
|
|
56
56
|
export declare const containsSearchFilter: (query: string | unknown) => boolean;
|
|
57
|
-
export interface SearchFilterOptions {
|
|
58
|
-
searchFilter?: string;
|
|
59
|
-
}
|
|
60
57
|
export declare const getSearchFilterScopedVar: (args: {
|
|
61
58
|
query: string;
|
|
62
59
|
wildcardChar: string;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ const mockDatasourceInstanceSettings = () => ({
|
|
|
71
71
|
database: (0, chance_1.Chance)().word(),
|
|
72
72
|
basicAuth: (0, chance_1.Chance)().word(),
|
|
73
73
|
withCredentials: (0, utils_1.generateBoolean)(),
|
|
74
|
-
access: (0, chance_1.Chance)().pickone([
|
|
74
|
+
access: (0, chance_1.Chance)().pickone(['direct', 'proxy']),
|
|
75
75
|
readOnly: false,
|
|
76
76
|
});
|
|
77
77
|
exports.mockDatasourceInstanceSettings = mockDatasourceInstanceSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Datasource.js","sourceRoot":"","sources":["../../../src/test/mocks/Datasource.ts"],"names":[],"mappings":";;;AACA,8CAAyD;AACzD,mCAAgC;AAChC,qCAAoD;AACpD,mCAAuD;AAEvD,MAAM,cAAe,SAAQ,+BAAqB;IAAlD;;QACE,wBAAwB;QACxB,UAAK,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAClB,gBAAW,GAAG,IAAA,mBAAW,EAAC,uBAAe,CAAC,CAAC;QAC3C,2BAAsB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACnC,gBAAW,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACxB,iBAAY,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACzB,oBAAe,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC5B,mBAAc,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3B,gBAAgB;QAChB,QAAG,GAAG,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE,CAAC;QACtB,SAAI,GAAG,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE,CAAC;QACvB,OAAE,GAAG,CAAC,CAAC;QACP,SAAI,GAAG,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE,CAAC;QACvB,aAAQ,GAAG,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE,CAAC;QAC3B,kBAAa,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC1B,SAAI,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACjB,kBAAa,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAA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IAAI,EAAE,IAAA,iCAAwB,GAAE;IAChC,GAAG,EAAE,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE;IACpB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE;IACzB,QAAQ,EAAE,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE;IACzB,QAAQ,EAAE,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE;IACzB,SAAS,EAAE,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE;IAC1B,eAAe,EAAE,IAAA,uBAAe,GAAE;IAClC,MAAM,EAAE,IAAA,eAAM,GAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7C,QAAQ,EAAE,KAAK;CAChB,CAAC,CAAC;AAfU,QAAA,8BAA8B,kCAexC"}
|
|
@@ -78,12 +78,7 @@ const mockPluginInclude = () => ({
|
|
|
78
78
|
component: (0, chance_1.Chance)().word(),
|
|
79
79
|
});
|
|
80
80
|
exports.mockPluginInclude = mockPluginInclude;
|
|
81
|
-
const mockPluginType = () => (0, chance_1.Chance)().pickone([
|
|
82
|
-
data_1.PluginType.panel,
|
|
83
|
-
data_1.PluginType.datasource,
|
|
84
|
-
data_1.PluginType.app,
|
|
85
|
-
data_1.PluginType.renderer,
|
|
86
|
-
]);
|
|
81
|
+
const mockPluginType = () => (0, chance_1.Chance)().pickone([data_1.PluginType.panel, data_1.PluginType.datasource, data_1.PluginType.app, data_1.PluginType.renderer]);
|
|
87
82
|
exports.mockPluginType = mockPluginType;
|
|
88
83
|
const mockPluginIncludeType = () => (0, chance_1.Chance)().pickone([
|
|
89
84
|
data_1.PluginIncludeType.dashboard,
|
|
@@ -92,11 +87,7 @@ const mockPluginIncludeType = () => (0, chance_1.Chance)().pickone([
|
|
|
92
87
|
data_1.PluginIncludeType.datasource,
|
|
93
88
|
]);
|
|
94
89
|
exports.mockPluginIncludeType = mockPluginIncludeType;
|
|
95
|
-
const mockPluginState = () => (0, chance_1.Chance)().pickone([
|
|
96
|
-
data_1.PluginState.alpha,
|
|
97
|
-
data_1.PluginState.beta,
|
|
98
|
-
data_1.PluginState.deprecated,
|
|
99
|
-
]);
|
|
90
|
+
const mockPluginState = () => (0, chance_1.Chance)().pickone([data_1.PluginState.alpha, data_1.PluginState.beta, data_1.PluginState.deprecated]);
|
|
100
91
|
exports.mockPluginState = mockPluginState;
|
|
101
92
|
const mockPluginDependencies = () => ({
|
|
102
93
|
grafanaVersion: (0, chance_1.Chance)().word(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../../src/test/mocks/Plugin.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAChC,wCAUuB;AACvB,mCAA0C;AAEnC,MAAM,wBAAwB,GAAG,GAAyB,EAAE,CAAC,CAAC;IACnE,OAAO,EAAE,IAAA,uBAAe,GAAE;IAC1B,OAAO,EAAE,IAAA,uBAAe,GAAE;IAC1B,IAAI,EAAE,IAAA,uBAAe,GAAE;IACvB,WAAW,EAAE,IAAA,uBAAe,GAAE;IAC9B,QAAQ,EAAE,IAAA,uBAAe,GAAE;IAC3B,OAAO,EAAE,IAAA,uBAAe,GAAE;IAC1B,KAAK,EAAE,IAAA,uBAAe,GAAE;IACxB,YAAY,EAAE,IAAA,uBAAe,GAAE;IAC/B,QAAQ,EAAE,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE;IACzB,YAAY,EAAE;QACZ,YAAY,EAAE,IAAA,uBAAe,GAAE;QAC/B,aAAa,EAAE,IAAA,uBAAe,GAAE;QAChC,WAAW,EAAE,IAAA,uBAAe,GAAE;KAC/B;IACD,IAAI,EAAE,CAAC;IACP,SAAS,EAAE,IAAA,uBAAe,GAAE;IAC5B,UAAU,EAAE,IAAA,uBAAe,GAAE;IAC7B,EAAE,EAAE,IAAA,eAAM,GAAE,CAAC,IAAI,EAAE;IACnB,IAAI,EAAE,IAAA,eAAM,G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MAAM,yBAAyB,GAAG,GAA0B,EAAE,CACnE,IAAA,eAAM,GAAE,CAAC,OAAO,CAAC;IACf,4BAAqB,CAAC,QAAQ;IAC9B,4BAAqB,CAAC,KAAK;IAC3B,4BAAqB,CAAC,OAAO;IAC7B,4BAAqB,CAAC,QAAQ;IAC9B,4BAAqB,CAAC,OAAO;CAC9B,CAAC,CAAC;AAPQ,QAAA,yBAAyB,6BAOjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/test/mocks/utils.ts"],"names":[],"mappings":";;;;AAAA,mCAAgC;AAChC,kDAAoE;AACpE,qFAAoD;AAE7C,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,IAAA,eAAM,GAAE,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAAxD,QAAA,eAAe,mBAAyC;AAE9D,MAAM,WAAW,GAAG,CAAC,EAAY,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/test/mocks/utils.ts"],"names":[],"mappings":";;;;AAAA,mCAAgC;AAChC,kDAAoE;AACpE,qFAAoD;AAE7C,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,IAAA,eAAM,GAAE,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAAxD,QAAA,eAAe,mBAAyC;AAE9D,MAAM,WAAW,GAAG,CAAC,EAAY,EAAE,EAAE,CAAC,IAAA,eAAM,GAAE,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAApE,QAAA,WAAW,eAAyD;AAE1E,MAAM,eAAe,GAAG,CAAC,EAAY,EAAE,QAAQ,GAAG,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAA9F,QAAA,eAAe,mBAA+E;AAE3G,kGAAkG;AAClG,uFAAuF;AACvF,uFAAuF;AACvF,iDAAiD;AAEjD;;;;;GAKG;AACI,MAAM,UAAU,GAAG,CAAC,SAAsB,EAAE,WAAoB,EAAE,EAAE;IACzE,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,SAAS,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IAE3D,uDAAuD;IACvD,iBAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAE5B,4FAA4F;IAC5F,kDAAkD;IAClD,oBAAS,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,aAAa,CAAC,CAAC;AAC5D,CAAC,CAAC;AATW,QAAA,UAAU,cASrB;AAEF;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAAO,SAAsB,EAAE,WAAmB,EAAE,eAAyB,EAAE,EAAE;IAC3G,IAAA,kBAAU,EAAC,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEjE,4BAA4B;IAC5B,MAAM,MAAM,GAAG,MAAM,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,cAAM,EAAC,SAAS,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;IAE7E,oBAAoB;IACpB,oBAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC,CAAA,CAAC;AARW,QAAA,YAAY,gBAQvB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const getReleaseLine = (changeset) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return `- ${changeset.summary}`; });
|
|
5
|
-
const getDependencyReleaseLine = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return
|
|
5
|
+
const getDependencyReleaseLine = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return ''; });
|
|
6
6
|
const defaultChangelogFunctions = {
|
|
7
7
|
getReleaseLine,
|
|
8
8
|
getDependencyReleaseLine,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/utils/changeset/functions.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/utils/changeset/functions.ts"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAmB,CAAO,SAAS,EAAE,EAAE,0DAAC,OAAA,KAAK,SAAS,CAAC,OAAO,EAAE,CAAA,GAAA,CAAC;AAErF,MAAM,wBAAwB,GAA6B,GAAS,EAAE,0DAAC,OAAA,EAAE,CAAA,GAAA,CAAC;AAE1E,MAAM,yBAAyB,GAAuB;IACpD,cAAc;IACd,wBAAwB;CACzB,CAAC;AAEF,kBAAe,yBAAyB,CAAC"}
|
|
@@ -10,19 +10,19 @@ const read_1 = tslib_1.__importDefault(require("@changesets/read"));
|
|
|
10
10
|
const write_1 = tslib_1.__importDefault(require("@changesets/write"));
|
|
11
11
|
const fast_glob_1 = require("fast-glob");
|
|
12
12
|
const changeTypes = {
|
|
13
|
-
feature: { icon:
|
|
14
|
-
fix: { icon:
|
|
15
|
-
docs: { icon:
|
|
16
|
-
chore: { icon:
|
|
17
|
-
tests: { icon:
|
|
18
|
-
refactor: { icon:
|
|
13
|
+
feature: { icon: '🚀', prefix: 'Feature' },
|
|
14
|
+
fix: { icon: '🐛', prefix: 'Fix' },
|
|
15
|
+
docs: { icon: '📝', prefix: 'Documentation' },
|
|
16
|
+
chore: { icon: '⚙️', prefix: 'Chore' },
|
|
17
|
+
tests: { icon: '🧪', prefix: 'Tests' },
|
|
18
|
+
refactor: { icon: '⚙️', prefix: 'Chore' },
|
|
19
19
|
};
|
|
20
20
|
const dir = process.cwd();
|
|
21
21
|
// First two arguments are `ts-node` and this file name.
|
|
22
22
|
// Actual changeset arguments start from the 3rd item.
|
|
23
23
|
const args = process.argv.slice(2);
|
|
24
24
|
(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
-
if (args[0] ===
|
|
25
|
+
if (args[0] === 'version') {
|
|
26
26
|
// If this is a version change we only need to update CHANGELOG.md
|
|
27
27
|
yield runChangesetCmd(args);
|
|
28
28
|
updateChangelogFiles();
|
|
@@ -37,9 +37,9 @@ const args = process.argv.slice(2);
|
|
|
37
37
|
}
|
|
38
38
|
// Asking what's the change type
|
|
39
39
|
const { changeType } = yield (0, prompts_1.default)({
|
|
40
|
-
name:
|
|
41
|
-
type:
|
|
42
|
-
message:
|
|
40
|
+
name: 'changeType',
|
|
41
|
+
type: 'select',
|
|
42
|
+
message: 'What kind of change have you added?',
|
|
43
43
|
choices: Object.entries(changeTypes).map(([key, { icon }]) => ({
|
|
44
44
|
title: `${icon} ${key}`,
|
|
45
45
|
value: key,
|
|
@@ -51,17 +51,17 @@ const args = process.argv.slice(2);
|
|
|
51
51
|
.filter((change) => !changeSetIdsBefore.includes(change.id))
|
|
52
52
|
.map((changeset) => (Object.assign(Object.assign({}, changeset), { summary: `${icon} **${prefix}**: ${changeset.summary}` })))[0];
|
|
53
53
|
// Remove the original changeset file
|
|
54
|
-
yield (0, promises_1.rm)((0, node_path_1.join)(dir,
|
|
54
|
+
yield (0, promises_1.rm)((0, node_path_1.join)(dir, '.changeset', `${newChangeset.id}.md`));
|
|
55
55
|
// Write a new changeset file (includes change type), returns the new id
|
|
56
56
|
const id = yield (0, write_1.default)(newChangeset, dir);
|
|
57
57
|
// Rename new file to previous name
|
|
58
|
-
yield (0, promises_1.rename)((0, node_path_1.join)(dir,
|
|
58
|
+
yield (0, promises_1.rename)((0, node_path_1.join)(dir, '.changeset', `${id}.md`), (0, node_path_1.join)(dir, '.changeset', `${newChangeset.id}.md`));
|
|
59
59
|
}))();
|
|
60
60
|
function runChangesetCmd(args) {
|
|
61
61
|
return new Promise((resolve, reject) => {
|
|
62
|
-
const child = (0, node_child_process_1.fork)((0, node_path_1.join)(dir,
|
|
63
|
-
child.on(
|
|
64
|
-
child.on(
|
|
62
|
+
const child = (0, node_child_process_1.fork)((0, node_path_1.join)(dir, 'node_modules/.bin/changeset'), args);
|
|
63
|
+
child.on('error', reject);
|
|
64
|
+
child.on('close', (exitCode) => {
|
|
65
65
|
if (exitCode === 0) {
|
|
66
66
|
resolve();
|
|
67
67
|
}
|
|
@@ -73,15 +73,15 @@ function runChangesetCmd(args) {
|
|
|
73
73
|
}
|
|
74
74
|
function updateChangelogFiles() {
|
|
75
75
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
const packageJson = JSON.parse(yield (0, promises_1.readFile)((0, node_path_1.join)(dir,
|
|
77
|
-
encoding:
|
|
76
|
+
const packageJson = JSON.parse(yield (0, promises_1.readFile)((0, node_path_1.join)(dir, 'package.json'), {
|
|
77
|
+
encoding: 'utf-8',
|
|
78
78
|
}));
|
|
79
79
|
const packageRoots = packageJson.workspaces
|
|
80
80
|
? yield (0, fast_glob_1.glob)(packageJson.workspaces, { onlyDirectories: true })
|
|
81
81
|
: [dir];
|
|
82
82
|
for (const rootDir of packageRoots) {
|
|
83
|
-
const filePath = (0, node_path_1.join)(rootDir,
|
|
84
|
-
const content = yield (0, promises_1.readFile)(filePath, { encoding:
|
|
83
|
+
const filePath = (0, node_path_1.join)(rootDir, 'CHANGELOG.md');
|
|
84
|
+
const content = yield (0, promises_1.readFile)(filePath, { encoding: 'utf-8' });
|
|
85
85
|
const today = new Date();
|
|
86
86
|
const date = `0${today.getDate()}`.slice(-2);
|
|
87
87
|
const month = `0${today.getMonth() + 1}`.slice(-2);
|
|
@@ -89,7 +89,7 @@ function updateChangelogFiles() {
|
|
|
89
89
|
const formattedDate = `${year}-${month}-${date}`;
|
|
90
90
|
const updatedChangeLog = content
|
|
91
91
|
// Remove unnecessary titles
|
|
92
|
-
.replace(/\s### (Patch|Minor|Major) Changes\s+/gi,
|
|
92
|
+
.replace(/\s### (Patch|Minor|Major) Changes\s+/gi, '')
|
|
93
93
|
// Add `v` prefix to the version and add date
|
|
94
94
|
.replace(/## (\d+\.\d+.\d+)\s+/, `## v$1 - ${formattedDate}\n\n`);
|
|
95
95
|
yield (0, promises_1.writeFile)(filePath, updatedChangeLog);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/changeset/index.ts"],"names":[],"mappings":";;;;AAEA,2DAA0C;AAC1C,+CAAmE;AACnE,yCAAiC;AACjC,8DAA8B;AAC9B,oEAA6C;AAC7C,sEAAgD;AAChD,yCAAiC;AAEjC,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE;IAC1C,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;IAClC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE;IAC7C,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IACtC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IACtC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;CAC1C,CAAC;AACF,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAE1B,wDAAwD;AACxD,sDAAsD;AACtD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,CAAC,GAAS,EAAE;IACV,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE;QACzB,kEAAkE;QAClE,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5B,oBAAoB,EAAE,CAAC;QACvB,OAAO;KACR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CAAC,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;YAC/D,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAEV,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE;YAClC,MAAM,QAAQ,GAAG,IAAA,gBAAI,EAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YAC/C,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAQ,EAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;YAChE,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACnD,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;YACjC,MAAM,aAAa,GAAG,GAAG,IAAI,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YACjD,MAAM,gBAAgB,GAAG,OAAO;gBAC9B,4BAA4B;iBAC3B,OAAO,CAAC,wCAAwC,EAAE,EAAE,CAAC;gBACtD,6CAA6C;iBAC5C,OAAO,CAAC,sBAAsB,EAAE,YAAY,aAAa,MAAM,CAAC,CAAC;YAEpE,MAAM,IAAA,oBAAS,EAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;SAC7C;IACH,CAAC;CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/plugin-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"repository": "git@github.com:grafana/plugin-ui.git",
|
|
5
5
|
"author": "Grafana Labs",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,10 +8,14 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "tsc -p tsconfig.build.json && yarn copy-files",
|
|
10
10
|
"copy-files": "copyfiles -u 1 src/**/*.css dist/",
|
|
11
|
-
"test": "jest",
|
|
11
|
+
"test": "jest --watch",
|
|
12
|
+
"spellcheck": "cspell -c cspell.config.json \"**/*.{ts,tsx,js,md,mdx,yml,yaml,json,scss,css}\"",
|
|
12
13
|
"storybook": "start-storybook -p 6006",
|
|
13
14
|
"storybook:build": "build-storybook",
|
|
14
|
-
"changeset": "ts-node src/utils/changeset/index.ts"
|
|
15
|
+
"changeset": "ts-node src/utils/changeset/index.ts",
|
|
16
|
+
"lint": "eslint --cache --ignore-path ./.gitignore --ext .js,.jsx,.ts,.tsx .",
|
|
17
|
+
"lint:fix": "yarn run lint --fix",
|
|
18
|
+
"typecheck": "tsc --emitDeclarationOnly false --noEmit"
|
|
15
19
|
},
|
|
16
20
|
"bin": {
|
|
17
21
|
"changeset-improved": "./dist/utils/changeset/index.js"
|
|
@@ -19,18 +23,21 @@
|
|
|
19
23
|
"dependencies": {
|
|
20
24
|
"@changesets/read": "^0.5.9",
|
|
21
25
|
"@changesets/write": "^0.2.3",
|
|
22
|
-
"@
|
|
26
|
+
"@hello-pangea/dnd": "^17.0.0",
|
|
23
27
|
"chance": "^1.1.7",
|
|
24
28
|
"fast-glob": "^3.3.1",
|
|
25
29
|
"lodash": "^4.17.21",
|
|
26
30
|
"memoize-one": "^5.1.1",
|
|
31
|
+
"prismjs": "^1.29.0",
|
|
27
32
|
"prompts": "^2.4.2",
|
|
28
33
|
"rc-cascader": "1.0.1",
|
|
29
34
|
"react-awesome-query-builder": "^5.3.1",
|
|
35
|
+
"react-popper-tooltip": "^4.4.2",
|
|
30
36
|
"react-use": "17.3.1",
|
|
31
37
|
"react-virtualized-auto-sizer": "^1.0.6",
|
|
32
38
|
"semver": "^7.5.4",
|
|
33
|
-
"sql-formatter-plus": "^1.3.6"
|
|
39
|
+
"sql-formatter-plus": "^1.3.6",
|
|
40
|
+
"uuid": "^8.3.2"
|
|
34
41
|
},
|
|
35
42
|
"devDependencies": {
|
|
36
43
|
"@babel/core": "^7.12.9",
|
|
@@ -43,8 +50,9 @@
|
|
|
43
50
|
"@changesets/types": "^5.2.1",
|
|
44
51
|
"@grafana/data": "^10.4.0",
|
|
45
52
|
"@grafana/e2e-selectors": "^10.4.0",
|
|
53
|
+
"@grafana/eslint-config": "^7.0.0",
|
|
46
54
|
"@grafana/runtime": "^10.4.0",
|
|
47
|
-
"@grafana/tsconfig": "1.3.0-rc1",
|
|
55
|
+
"@grafana/tsconfig": "^1.3.0-rc1",
|
|
48
56
|
"@grafana/ui": "^10.4.0",
|
|
49
57
|
"@storybook/addon-actions": "^6.5.16",
|
|
50
58
|
"@storybook/addon-essentials": "^6.5.16",
|
|
@@ -58,17 +66,26 @@
|
|
|
58
66
|
"@types/chance": "^1.1.0",
|
|
59
67
|
"@types/lodash": "^4.14.194",
|
|
60
68
|
"@types/memoize-one": "^5.1.2",
|
|
69
|
+
"@types/prismjs": "^1.26.4",
|
|
61
70
|
"@types/prompts": "^2.4.4",
|
|
62
71
|
"@types/react": "17.0.38",
|
|
63
72
|
"@types/react-calendar": "^3.1.2",
|
|
64
73
|
"@types/semver": "^7.5.0",
|
|
65
74
|
"@types/testing-library__jest-dom": "^5.9.5",
|
|
75
|
+
"@types/uuid": "^8.3.2",
|
|
66
76
|
"babel-loader": "^8.2.2",
|
|
67
77
|
"copyfiles": "^2.4.1",
|
|
78
|
+
"cspell": "^8.14.4",
|
|
79
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
80
|
+
"jest": "^29.7.0",
|
|
81
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
68
82
|
"jest-fetch-mock": "^3.0.3",
|
|
83
|
+
"lefthook": "^1.7.18",
|
|
69
84
|
"mockdate": "^3.0.2",
|
|
85
|
+
"prettier": "^3.3.3",
|
|
70
86
|
"react": "18.2.0",
|
|
71
87
|
"react-dom": "18.2.0",
|
|
88
|
+
"react-select-event": "^5.5.1",
|
|
72
89
|
"rxjs": "^7.8.1",
|
|
73
90
|
"ts-jest": "^26.4.4",
|
|
74
91
|
"ts-node": "^10.9.1",
|
|
@@ -76,13 +93,12 @@
|
|
|
76
93
|
},
|
|
77
94
|
"peerDependencies": {
|
|
78
95
|
"@changesets/cli": ">=2.x",
|
|
79
|
-
"@grafana/data": "^10.4.0",
|
|
80
|
-
"@grafana/e2e-selectors": "^10.4.0",
|
|
81
|
-
"@grafana/runtime": "^10.4.0",
|
|
82
|
-
"@grafana/
|
|
83
|
-
"
|
|
84
|
-
"react": "18.2.0",
|
|
85
|
-
"react-dom": "18.2.0",
|
|
96
|
+
"@grafana/data": "^10.4.0 || ^11.0.0",
|
|
97
|
+
"@grafana/e2e-selectors": "^10.4.0 || ^11.0.0",
|
|
98
|
+
"@grafana/runtime": "^10.4.0 || ^11.0.0",
|
|
99
|
+
"@grafana/ui": "^10.4.0 || ^11.0.0",
|
|
100
|
+
"react": "^18.2.0",
|
|
101
|
+
"react-dom": "^18.2.0",
|
|
86
102
|
"rxjs": "^7.8.1"
|
|
87
103
|
},
|
|
88
104
|
"files": [
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateOptions = exports.selectOption = void 0;
|
|
4
|
-
var select_1 = require("./select");
|
|
5
|
-
Object.defineProperty(exports, "selectOption", { enumerable: true, get: function () { return select_1.selectOption; } });
|
|
6
|
-
Object.defineProperty(exports, "generateOptions", { enumerable: true, get: function () { return select_1.generateOptions; } });
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/8x/fixtures/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,sGAAA,YAAY,OAAA;AAAE,yGAAA,eAAe,OAAA"}
|