@grafana/plugin-ui 0.9.5 → 0.10.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/dist/cjs/index.d.cts +1205 -0
- package/dist/cjs/index.js +9739 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js +80 -0
- package/dist/esm/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/Auth.js +43 -0
- package/dist/esm/components/ConfigEditor/Auth/Auth.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js +132 -0
- package/dist/esm/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/auth-method/BasicAuth.js +82 -0
- package/dist/esm/components/ConfigEditor/Auth/auth-method/BasicAuth.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/custom-headers/CustomHeader.js +91 -0
- package/dist/esm/components/ConfigEditor/Auth/custom-headers/CustomHeader.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js +101 -0
- package/dist/esm/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/styles.js +18 -0
- package/dist/esm/components/ConfigEditor/Auth/styles.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js +58 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/SkipTLSVerification.js +18 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/SkipTLSVerification.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSClientAuth.js +114 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSClientAuth.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSSettings.js +31 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSSettings.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSSettingsSection.js +35 -0
- package/dist/esm/components/ConfigEditor/Auth/tls/TLSSettingsSection.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/types.js +12 -0
- package/dist/esm/components/ConfigEditor/Auth/types.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Auth/utils.js +200 -0
- package/dist/esm/components/ConfigEditor/Auth/utils.js.map +1 -0
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js +38 -0
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js.map +1 -0
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigSection.js +9 -0
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigSection.js.map +1 -0
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigSubSection.js +9 -0
- package/dist/esm/components/ConfigEditor/ConfigSection/ConfigSubSection.js.map +1 -0
- package/dist/esm/components/ConfigEditor/ConfigSection/GenericConfigSection.js +55 -0
- package/dist/esm/components/ConfigEditor/ConfigSection/GenericConfigSection.js.map +1 -0
- package/dist/esm/components/ConfigEditor/Connection/ConnectionSettings.js +53 -0
- package/dist/esm/components/ConfigEditor/Connection/ConnectionSettings.js.map +1 -0
- package/dist/esm/components/ConfigEditor/DataSourceDescription.js +32 -0
- package/dist/esm/components/ConfigEditor/DataSourceDescription.js.map +1 -0
- package/dist/esm/components/ConfigEditor/SecureSocksProxyToggle.js +45 -0
- package/dist/esm/components/ConfigEditor/SecureSocksProxyToggle.js.map +1 -0
- package/dist/esm/components/CustomHeadersSettings/CustomHeadersSettings.js +182 -0
- package/dist/esm/components/CustomHeadersSettings/CustomHeadersSettings.js.map +1 -0
- package/dist/esm/components/DataLinks/DataLink.js +144 -0
- package/dist/esm/components/DataLinks/DataLink.js.map +1 -0
- package/dist/esm/components/DataLinks/DataLinks.js +66 -0
- package/dist/esm/components/DataLinks/DataLinks.js.map +1 -0
- package/dist/esm/components/DataSourcePicker/DataSourcePicker.js +103 -0
- package/dist/esm/components/DataSourcePicker/DataSourcePicker.js.map +1 -0
- package/dist/esm/components/DatePicker/DatePicker.js +39 -0
- package/dist/esm/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/{components → esm/components}/DatePicker/styles.js +20 -21
- package/dist/esm/components/DatePicker/styles.js.map +1 -0
- package/dist/esm/components/DatePickerWithInput/DatePickerWithInput.js +28 -0
- package/dist/esm/components/DatePickerWithInput/DatePickerWithInput.js.map +1 -0
- package/dist/esm/components/DatePickerWithInput/styles.js +16 -0
- package/dist/esm/components/DatePickerWithInput/styles.js.map +1 -0
- package/dist/esm/components/DebounceInput/DebounceInput.js +15 -0
- package/dist/esm/components/DebounceInput/DebounceInput.js.map +1 -0
- package/dist/esm/components/Plugins/PluginSignatureBadge.js +57 -0
- package/dist/esm/components/Plugins/PluginSignatureBadge.js.map +1 -0
- package/dist/esm/components/QueryEditor/AccessoryButton.js +18 -0
- package/dist/esm/components/QueryEditor/AccessoryButton.js.map +1 -0
- package/dist/esm/components/QueryEditor/ConfirmModal.js +26 -0
- package/dist/esm/components/QueryEditor/ConfirmModal.js.map +1 -0
- package/dist/esm/components/QueryEditor/DatasetSelector.js +56 -0
- package/dist/esm/components/QueryEditor/DatasetSelector.js.map +1 -0
- package/dist/esm/components/QueryEditor/EditorField.js +42 -0
- package/dist/esm/components/QueryEditor/EditorField.js.map +1 -0
- package/dist/esm/components/QueryEditor/EditorFieldGroup.js +9 -0
- package/dist/esm/components/QueryEditor/EditorFieldGroup.js.map +1 -0
- package/dist/esm/components/QueryEditor/EditorHeader.js +21 -0
- package/dist/esm/components/QueryEditor/EditorHeader.js.map +1 -0
- package/dist/esm/components/QueryEditor/EditorList.js +28 -0
- package/dist/esm/components/QueryEditor/EditorList.js.map +1 -0
- package/dist/esm/components/QueryEditor/EditorRow.js +22 -0
- package/dist/esm/components/QueryEditor/EditorRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/EditorRows.js +9 -0
- package/dist/esm/components/QueryEditor/EditorRows.js.map +1 -0
- package/dist/esm/components/QueryEditor/EditorStack.js +11 -0
- package/dist/esm/components/QueryEditor/EditorStack.js.map +1 -0
- package/dist/esm/components/QueryEditor/EditorSwitch.js +20 -0
- package/dist/esm/components/QueryEditor/EditorSwitch.js.map +1 -0
- package/dist/esm/components/QueryEditor/FlexItem.js +8 -0
- package/dist/esm/components/QueryEditor/FlexItem.js.map +1 -0
- package/dist/esm/components/QueryEditor/InlineSelect.js +50 -0
- package/dist/esm/components/QueryEditor/InlineSelect.js.map +1 -0
- package/dist/esm/components/QueryEditor/InputGroup.js +63 -0
- package/dist/esm/components/QueryEditor/InputGroup.js.map +1 -0
- package/dist/esm/components/QueryEditor/QueryEditor.js +110 -0
- package/dist/esm/components/QueryEditor/QueryEditor.js.map +1 -0
- package/dist/esm/components/QueryEditor/QueryHeader.js +172 -0
- package/dist/esm/components/QueryEditor/QueryHeader.js.map +1 -0
- package/dist/esm/components/QueryEditor/RunQueryButton.js +42 -0
- package/dist/esm/components/QueryEditor/RunQueryButton.js.map +1 -0
- package/dist/esm/components/QueryEditor/Space.js +35 -0
- package/dist/esm/components/QueryEditor/Space.js.map +1 -0
- package/dist/esm/components/QueryEditor/TableSelector.js +33 -0
- package/dist/esm/components/QueryEditor/TableSelector.js.map +1 -0
- package/dist/esm/components/QueryEditor/defaults.js +25 -0
- package/dist/esm/components/QueryEditor/defaults.js.map +1 -0
- package/dist/esm/components/QueryEditor/expressions.js +17 -0
- package/dist/esm/components/QueryEditor/expressions.js.map +1 -0
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryEditorRaw.js +39 -0
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryEditorRaw.js.map +1 -0
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryToolbox.js +63 -0
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryToolbox.js.map +1 -0
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryValidator.js +72 -0
- package/dist/esm/components/QueryEditor/query-editor-raw/QueryValidator.js.map +1 -0
- package/dist/esm/components/QueryEditor/query-editor-raw/RawEditor.js +96 -0
- package/dist/esm/components/QueryEditor/query-editor-raw/RawEditor.js.map +1 -0
- package/dist/esm/components/QueryEditor/types.js +33 -0
- package/dist/esm/components/QueryEditor/types.js.map +1 -0
- package/dist/esm/components/QueryEditor/utils/formatSQL.js +10 -0
- package/dist/esm/components/QueryEditor/utils/formatSQL.js.map +1 -0
- package/dist/esm/components/QueryEditor/utils/sql.utils.js +93 -0
- package/dist/esm/components/QueryEditor/utils/sql.utils.js.map +1 -0
- package/dist/esm/components/QueryEditor/utils/useSqlChange.js +19 -0
- package/dist/esm/components/QueryEditor/utils/useSqlChange.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/AwesomeQueryBuilder.js +216 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/AwesomeQueryBuilder.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorField.js +44 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorField.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorRow.js +22 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorRows.js +9 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/EditorRows.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/GroupByRow.js +51 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/GroupByRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/OrderByRow.js +70 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/OrderByRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/Preview.js +33 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/Preview.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLGroupByRow.js +14 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLGroupByRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLOrderByRow.js +35 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLOrderByRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLSelectRow.js +19 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLSelectRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLWhereRow.js +40 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SQLWhereRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SelectRow.js +123 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/SelectRow.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/VisualEditor.js +24 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/VisualEditor.js.map +1 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/WhereRow.js +79 -0
- package/dist/esm/components/QueryEditor/visual-query-builder/WhereRow.js.map +1 -0
- package/dist/esm/components/QueryEditorRow/QueryEditorRow.js +11 -0
- package/dist/esm/components/QueryEditorRow/QueryEditorRow.js.map +1 -0
- package/dist/esm/components/SQLEditor/components/SQLEditor.js +339 -0
- package/dist/esm/components/SQLEditor/components/SQLEditor.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/Monaco.js +19 -0
- package/dist/esm/components/SQLEditor/mocks/Monaco.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/TextModel.js +21 -0
- package/dist/esm/components/SQLEditor/mocks/TextModel.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/queries/multiLineFullQuery.js +217 -0
- package/dist/esm/components/SQLEditor/mocks/queries/multiLineFullQuery.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js +232 -0
- package/dist/esm/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js +272 -0
- package/dist/esm/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js +9 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineFullQuery.js +197 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineFullQuery.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js +212 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js +252 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineTwoQueries.js +387 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineTwoQueries.js.map +1 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js +417 -0
- package/dist/esm/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js.map +1 -0
- package/dist/{src/components/SQLEditor/mocks/testData.d.ts → esm/components/SQLEditor/mocks/testData.js} +10 -9
- package/dist/esm/components/SQLEditor/mocks/testData.js.map +1 -0
- package/dist/esm/components/SQLEditor/standardSql/definition.js +19 -0
- package/dist/esm/components/SQLEditor/standardSql/definition.js.map +1 -0
- package/dist/esm/components/SQLEditor/standardSql/getStandardSuggestions.js +20 -0
- package/dist/esm/components/SQLEditor/standardSql/getStandardSuggestions.js.map +1 -0
- package/dist/esm/components/SQLEditor/standardSql/getStatementPosition.js +24 -0
- package/dist/esm/components/SQLEditor/standardSql/getStatementPosition.js.map +1 -0
- package/dist/esm/components/SQLEditor/standardSql/language.js +867 -0
- package/dist/esm/components/SQLEditor/standardSql/language.js.map +1 -0
- package/dist/esm/components/SQLEditor/standardSql/macros.js +58 -0
- package/dist/esm/components/SQLEditor/standardSql/macros.js.map +1 -0
- package/dist/esm/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js +34 -0
- package/dist/esm/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js.map +1 -0
- package/dist/esm/components/SQLEditor/standardSql/standardSuggestionsRegistry.js +367 -0
- package/dist/esm/components/SQLEditor/standardSql/standardSuggestionsRegistry.js.map +1 -0
- package/dist/esm/components/SQLEditor/standardSql/statementPositionResolversRegistry.js +215 -0
- package/dist/esm/components/SQLEditor/standardSql/statementPositionResolversRegistry.js.map +1 -0
- package/dist/esm/components/SQLEditor/standardSql/suggestionsKindRegistry.js +152 -0
- package/dist/esm/components/SQLEditor/standardSql/suggestionsKindRegistry.js.map +1 -0
- package/dist/esm/components/SQLEditor/test-utils/index.js +11 -0
- package/dist/esm/components/SQLEditor/test-utils/index.js.map +1 -0
- package/dist/esm/components/SQLEditor/test-utils/statementPosition.js +45 -0
- package/dist/esm/components/SQLEditor/test-utils/statementPosition.js.map +1 -0
- package/dist/esm/components/SQLEditor/types.js +140 -0
- package/dist/esm/components/SQLEditor/types.js.map +1 -0
- package/dist/esm/components/SQLEditor/utils/LinkedToken.js +145 -0
- package/dist/esm/components/SQLEditor/utils/LinkedToken.js.map +1 -0
- package/dist/esm/components/SQLEditor/utils/commands.js +7 -0
- package/dist/esm/components/SQLEditor/utils/commands.js.map +1 -0
- package/dist/esm/components/SQLEditor/utils/debugger.js +14 -0
- package/dist/esm/components/SQLEditor/utils/debugger.js.map +1 -0
- package/dist/esm/components/SQLEditor/utils/getSuggestionKind.js +16 -0
- package/dist/esm/components/SQLEditor/utils/getSuggestionKind.js.map +1 -0
- package/dist/esm/components/SQLEditor/utils/linkedTokenBuilder.js +45 -0
- package/dist/esm/components/SQLEditor/utils/linkedTokenBuilder.js.map +1 -0
- package/dist/esm/components/SQLEditor/utils/toCompletionItem.js +17 -0
- package/dist/esm/components/SQLEditor/utils/toCompletionItem.js.map +1 -0
- package/dist/esm/components/SQLEditor/utils/tokenUtils.js +36 -0
- package/dist/esm/components/SQLEditor/utils/tokenUtils.js.map +1 -0
- package/dist/esm/components/Segment/Segment.js +24 -0
- package/dist/esm/components/Segment/Segment.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/QueryModellerBase.js +39 -0
- package/dist/esm/components/VisualQueryBuilder/QueryModellerBase.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/LabelFilterItem.js +178 -0
- package/dist/esm/components/VisualQueryBuilder/components/LabelFilterItem.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/LabelFilters.js +70 -0
- package/dist/esm/components/VisualQueryBuilder/components/LabelFilters.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationEditor.js +77 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationEditor.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationEditorBody.js +254 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationEditorBody.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationExplainedBox.js +55 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationExplainedBox.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationHeader.js +107 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationHeader.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationInfoButton.js +87 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationInfoButton.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationList.js +169 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationList.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationListExplained.js +43 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationListExplained.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationParamEditor.js +136 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationParamEditor.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationsEditorRow.js +39 -0
- package/dist/esm/components/VisualQueryBuilder/components/OperationsEditorRow.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/QueryBuilderHints.js +73 -0
- package/dist/esm/components/VisualQueryBuilder/components/QueryBuilderHints.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/QueryEditorModeToggle.js +14 -0
- package/dist/esm/components/VisualQueryBuilder/components/QueryEditorModeToggle.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/QueryHeaderSwitch.js +44 -0
- package/dist/esm/components/VisualQueryBuilder/components/QueryHeaderSwitch.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/QueryOptionGroup.js +97 -0
- package/dist/esm/components/VisualQueryBuilder/components/QueryOptionGroup.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/components/RawQuery.js +30 -0
- package/dist/esm/components/VisualQueryBuilder/components/RawQuery.js.map +1 -0
- package/dist/esm/components/VisualQueryBuilder/types.js +12 -0
- package/dist/esm/components/VisualQueryBuilder/types.js.map +1 -0
- package/dist/esm/datasource/SqlDatasource.js +172 -0
- package/dist/esm/datasource/SqlDatasource.js.map +1 -0
- package/dist/esm/datasource/constants.js +18 -0
- package/dist/esm/datasource/constants.js.map +1 -0
- package/dist/esm/hooks/useDebounce.js +18 -0
- package/dist/esm/hooks/useDebounce.js.map +1 -0
- package/dist/esm/index.d.ts +1205 -0
- package/dist/esm/index.js +57 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +62 -41
- package/dist/components/AsyncButtonCascader/AsyncButtonCascader.js +0 -33
- package/dist/components/AsyncButtonCascader/AsyncButtonCascader.js.map +0 -1
- package/dist/components/Cascader/Cascader.js +0 -6
- package/dist/components/Cascader/Cascader.js.map +0 -1
- package/dist/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js +0 -28
- package/dist/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.js.map +0 -1
- package/dist/components/ConfigEditor/AdvancedSettings/index.js +0 -6
- package/dist/components/ConfigEditor/AdvancedSettings/index.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/Auth.js +0 -24
- package/dist/components/ConfigEditor/Auth/Auth.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js +0 -110
- package/dist/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/auth-method/BasicAuth.js +0 -23
- package/dist/components/ConfigEditor/Auth/auth-method/BasicAuth.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeader.js +0 -41
- package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeader.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js +0 -76
- package/dist/components/ConfigEditor/Auth/custom-headers/CustomHeaders.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/index.js +0 -10
- package/dist/components/ConfigEditor/Auth/index.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/styles.js +0 -19
- package/dist/components/ConfigEditor/Auth/styles.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js +0 -18
- package/dist/components/ConfigEditor/Auth/tls/SelfSignedCertificate.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/tls/SkipTLSVerification.js +0 -11
- package/dist/components/ConfigEditor/Auth/tls/SkipTLSVerification.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/tls/TLSClientAuth.js +0 -22
- package/dist/components/ConfigEditor/Auth/tls/TLSClientAuth.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/tls/TLSSettings.js +0 -25
- package/dist/components/ConfigEditor/Auth/tls/TLSSettings.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/tls/TLSSettingsSection.js +0 -35
- package/dist/components/ConfigEditor/Auth/tls/TLSSettingsSection.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/types.js +0 -11
- package/dist/components/ConfigEditor/Auth/types.js.map +0 -1
- package/dist/components/ConfigEditor/Auth/utils.js +0 -113
- package/dist/components/ConfigEditor/Auth/utils.js.map +0 -1
- package/dist/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js +0 -32
- package/dist/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.js.map +0 -1
- package/dist/components/ConfigEditor/ConfigSection/ConfigSection.js +0 -12
- package/dist/components/ConfigEditor/ConfigSection/ConfigSection.js.map +0 -1
- package/dist/components/ConfigEditor/ConfigSection/ConfigSubSection.js +0 -12
- package/dist/components/ConfigEditor/ConfigSection/ConfigSubSection.js.map +0 -1
- package/dist/components/ConfigEditor/ConfigSection/GenericConfigSection.js +0 -40
- package/dist/components/ConfigEditor/ConfigSection/GenericConfigSection.js.map +0 -1
- package/dist/components/ConfigEditor/ConfigSection/index.js +0 -10
- package/dist/components/ConfigEditor/ConfigSection/index.js.map +0 -1
- package/dist/components/ConfigEditor/Connection/ConnectionSettings.js +0 -26
- package/dist/components/ConfigEditor/Connection/ConnectionSettings.js.map +0 -1
- package/dist/components/ConfigEditor/Connection/index.js +0 -6
- package/dist/components/ConfigEditor/Connection/index.js.map +0 -1
- package/dist/components/ConfigEditor/DataSourceDescription.js +0 -39
- package/dist/components/ConfigEditor/DataSourceDescription.js.map +0 -1
- package/dist/components/ConfigEditor/SecureSocksProxyToggle.js +0 -24
- package/dist/components/ConfigEditor/SecureSocksProxyToggle.js.map +0 -1
- package/dist/components/ConfigEditor/index.js +0 -22
- package/dist/components/ConfigEditor/index.js.map +0 -1
- package/dist/components/ConfigEditor/types.js +0 -3
- package/dist/components/ConfigEditor/types.js.map +0 -1
- package/dist/components/CustomHeadersSettings/CustomHeadersSettings.js +0 -124
- package/dist/components/CustomHeadersSettings/CustomHeadersSettings.js.map +0 -1
- package/dist/components/DataLinks/DataLink.js +0 -79
- package/dist/components/DataLinks/DataLink.js.map +0 -1
- package/dist/components/DataLinks/DataLinks.js +0 -56
- package/dist/components/DataLinks/DataLinks.js.map +0 -1
- package/dist/components/DataLinks/index.js +0 -7
- package/dist/components/DataLinks/index.js.map +0 -1
- package/dist/components/DataLinks/types.js +0 -3
- package/dist/components/DataLinks/types.js.map +0 -1
- package/dist/components/DataSourcePicker/DataSourcePicker.js +0 -88
- package/dist/components/DataSourcePicker/DataSourcePicker.js.map +0 -1
- package/dist/components/DatePicker/DatePicker.js +0 -31
- package/dist/components/DatePicker/DatePicker.js.map +0 -1
- package/dist/components/DatePicker/styles.js.map +0 -1
- package/dist/components/DatePickerWithInput/DatePickerWithInput.js +0 -23
- package/dist/components/DatePickerWithInput/DatePickerWithInput.js.map +0 -1
- package/dist/components/DatePickerWithInput/style.css +0 -8
- package/dist/components/DebounceInput/DebounceInput.js +0 -19
- package/dist/components/DebounceInput/DebounceInput.js.map +0 -1
- package/dist/components/Plugins/PluginSignatureBadge.js +0 -65
- package/dist/components/Plugins/PluginSignatureBadge.js.map +0 -1
- package/dist/components/QueryEditor/AccessoryButton.js +0 -20
- package/dist/components/QueryEditor/AccessoryButton.js.map +0 -1
- package/dist/components/QueryEditor/ConfirmModal.js +0 -28
- package/dist/components/QueryEditor/ConfirmModal.js.map +0 -1
- package/dist/components/QueryEditor/DatasetSelector.js +0 -40
- package/dist/components/QueryEditor/DatasetSelector.js.map +0 -1
- package/dist/components/QueryEditor/EditorField.js +0 -49
- package/dist/components/QueryEditor/EditorField.js.map +0 -1
- package/dist/components/QueryEditor/EditorFieldGroup.js +0 -11
- package/dist/components/QueryEditor/EditorFieldGroup.js.map +0 -1
- package/dist/components/QueryEditor/EditorHeader.js +0 -22
- package/dist/components/QueryEditor/EditorHeader.js.map +0 -1
- package/dist/components/QueryEditor/EditorList.js +0 -27
- package/dist/components/QueryEditor/EditorList.js.map +0 -1
- package/dist/components/QueryEditor/EditorRow.js +0 -24
- package/dist/components/QueryEditor/EditorRow.js.map +0 -1
- package/dist/components/QueryEditor/EditorRows.js +0 -11
- package/dist/components/QueryEditor/EditorRows.js.map +0 -1
- package/dist/components/QueryEditor/EditorStack.js +0 -13
- package/dist/components/QueryEditor/EditorStack.js.map +0 -1
- package/dist/components/QueryEditor/EditorSwitch.js +0 -24
- package/dist/components/QueryEditor/EditorSwitch.js.map +0 -1
- package/dist/components/QueryEditor/FlexItem.js +0 -10
- package/dist/components/QueryEditor/FlexItem.js.map +0 -1
- package/dist/components/QueryEditor/InlineSelect.js +0 -57
- package/dist/components/QueryEditor/InlineSelect.js.map +0 -1
- package/dist/components/QueryEditor/InputGroup.js +0 -66
- package/dist/components/QueryEditor/InputGroup.js.map +0 -1
- package/dist/components/QueryEditor/QueryEditor.js +0 -74
- package/dist/components/QueryEditor/QueryEditor.js.map +0 -1
- package/dist/components/QueryEditor/QueryHeader.js +0 -86
- package/dist/components/QueryEditor/QueryHeader.js.map +0 -1
- package/dist/components/QueryEditor/RunQueryButton.js +0 -19
- package/dist/components/QueryEditor/RunQueryButton.js.map +0 -1
- package/dist/components/QueryEditor/Space.js +0 -36
- package/dist/components/QueryEditor/Space.js.map +0 -1
- package/dist/components/QueryEditor/TableSelector.js +0 -20
- package/dist/components/QueryEditor/TableSelector.js.map +0 -1
- package/dist/components/QueryEditor/defaults.js +0 -20
- package/dist/components/QueryEditor/defaults.js.map +0 -1
- package/dist/components/QueryEditor/expressions.js +0 -18
- package/dist/components/QueryEditor/expressions.js.map +0 -1
- package/dist/components/QueryEditor/index.js +0 -37
- package/dist/components/QueryEditor/index.js.map +0 -1
- package/dist/components/QueryEditor/query-editor-raw/QueryEditorRaw.js +0 -21
- package/dist/components/QueryEditor/query-editor-raw/QueryEditorRaw.js.map +0 -1
- package/dist/components/QueryEditor/query-editor-raw/QueryToolbox.js +0 -59
- package/dist/components/QueryEditor/query-editor-raw/QueryToolbox.js.map +0 -1
- package/dist/components/QueryEditor/query-editor-raw/QueryValidator.js +0 -79
- package/dist/components/QueryEditor/query-editor-raw/QueryValidator.js.map +0 -1
- package/dist/components/QueryEditor/query-editor-raw/RawEditor.js +0 -60
- package/dist/components/QueryEditor/query-editor-raw/RawEditor.js.map +0 -1
- package/dist/components/QueryEditor/types.js +0 -26
- package/dist/components/QueryEditor/types.js.map +0 -1
- package/dist/components/QueryEditor/utils/formatSQL.js +0 -13
- package/dist/components/QueryEditor/utils/formatSQL.js.map +0 -1
- package/dist/components/QueryEditor/utils/sql.utils.js +0 -103
- package/dist/components/QueryEditor/utils/sql.utils.js.map +0 -1
- package/dist/components/QueryEditor/utils/useSqlChange.js +0 -16
- package/dist/components/QueryEditor/utils/useSqlChange.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/AwesomeQueryBuilder.js +0 -109
- package/dist/components/QueryEditor/visual-query-builder/AwesomeQueryBuilder.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/EditorField.js +0 -51
- package/dist/components/QueryEditor/visual-query-builder/EditorField.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/EditorRow.js +0 -24
- package/dist/components/QueryEditor/visual-query-builder/EditorRow.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/EditorRows.js +0 -11
- package/dist/components/QueryEditor/visual-query-builder/EditorRows.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/GroupByRow.js +0 -33
- package/dist/components/QueryEditor/visual-query-builder/GroupByRow.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/OrderByRow.js +0 -50
- package/dist/components/QueryEditor/visual-query-builder/OrderByRow.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/Preview.js +0 -28
- package/dist/components/QueryEditor/visual-query-builder/Preview.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/SQLGroupByRow.js +0 -13
- package/dist/components/QueryEditor/visual-query-builder/SQLGroupByRow.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/SQLOrderByRow.js +0 -34
- package/dist/components/QueryEditor/visual-query-builder/SQLOrderByRow.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/SQLSelectRow.js +0 -19
- package/dist/components/QueryEditor/visual-query-builder/SQLSelectRow.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/SQLWhereRow.js +0 -35
- package/dist/components/QueryEditor/visual-query-builder/SQLWhereRow.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/SelectRow.js +0 -68
- package/dist/components/QueryEditor/visual-query-builder/SelectRow.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/VisualEditor.js +0 -38
- package/dist/components/QueryEditor/visual-query-builder/VisualEditor.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/WhereRow.js +0 -67
- package/dist/components/QueryEditor/visual-query-builder/WhereRow.js.map +0 -1
- package/dist/components/QueryEditor/visual-query-builder/index.js +0 -6
- package/dist/components/QueryEditor/visual-query-builder/index.js.map +0 -1
- package/dist/components/QueryEditorRow/QueryEditorRow.js +0 -16
- package/dist/components/QueryEditorRow/QueryEditorRow.js.map +0 -1
- package/dist/components/SQLEditor/components/SQLEditor.js +0 -330
- package/dist/components/SQLEditor/components/SQLEditor.js.map +0 -1
- package/dist/components/SQLEditor/index.js +0 -25
- package/dist/components/SQLEditor/index.js.map +0 -1
- package/dist/components/SQLEditor/mocks/Monaco.js +0 -23
- package/dist/components/SQLEditor/mocks/Monaco.js.map +0 -1
- package/dist/components/SQLEditor/mocks/TextModel.js +0 -22
- package/dist/components/SQLEditor/mocks/TextModel.js.map +0 -1
- package/dist/components/SQLEditor/mocks/queries/multiLineFullQuery.js +0 -216
- package/dist/components/SQLEditor/mocks/queries/multiLineFullQuery.js.map +0 -1
- package/dist/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js +0 -231
- package/dist/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.js.map +0 -1
- package/dist/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js +0 -271
- package/dist/components/SQLEditor/mocks/queries/multiLineMultipleColumns.js.map +0 -1
- package/dist/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js +0 -8
- package/dist/components/SQLEditor/mocks/queries/singleLineEmptyQuery.js.map +0 -1
- package/dist/components/SQLEditor/mocks/queries/singleLineFullQuery.js +0 -196
- package/dist/components/SQLEditor/mocks/queries/singleLineFullQuery.js.map +0 -1
- package/dist/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js +0 -211
- package/dist/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.js.map +0 -1
- package/dist/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js +0 -251
- package/dist/components/SQLEditor/mocks/queries/singleLineMultipleColumns.js.map +0 -1
- package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueries.js +0 -386
- package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueries.js.map +0 -1
- package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js +0 -416
- package/dist/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.js.map +0 -1
- package/dist/components/SQLEditor/mocks/testData.js +0 -22
- package/dist/components/SQLEditor/mocks/testData.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/definition.js +0 -13
- package/dist/components/SQLEditor/standardSql/definition.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/getStandardSuggestions.js +0 -26
- package/dist/components/SQLEditor/standardSql/getStandardSuggestions.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/getStatementPosition.js +0 -24
- package/dist/components/SQLEditor/standardSql/getStatementPosition.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/language.js +0 -875
- package/dist/components/SQLEditor/standardSql/language.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/macros.js +0 -166
- package/dist/components/SQLEditor/standardSql/macros.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js +0 -30
- package/dist/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/standardSuggestionsRegistry.js +0 -378
- package/dist/components/SQLEditor/standardSql/standardSuggestionsRegistry.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/statementPositionResolversRegistry.js +0 -234
- package/dist/components/SQLEditor/standardSql/statementPositionResolversRegistry.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/suggestionsKindRegistry.js +0 -153
- package/dist/components/SQLEditor/standardSql/suggestionsKindRegistry.js.map +0 -1
- package/dist/components/SQLEditor/standardSql/types.js +0 -3
- package/dist/components/SQLEditor/standardSql/types.js.map +0 -1
- package/dist/components/SQLEditor/test-utils/index.js +0 -11
- package/dist/components/SQLEditor/test-utils/index.js.map +0 -1
- package/dist/components/SQLEditor/test-utils/statementPosition.js +0 -40
- package/dist/components/SQLEditor/test-utils/statementPosition.js.map +0 -1
- package/dist/components/SQLEditor/test-utils/types.js +0 -3
- package/dist/components/SQLEditor/test-utils/types.js.map +0 -1
- package/dist/components/SQLEditor/types.js +0 -139
- package/dist/components/SQLEditor/types.js.map +0 -1
- package/dist/components/SQLEditor/utils/LinkedToken.js +0 -147
- package/dist/components/SQLEditor/utils/LinkedToken.js.map +0 -1
- package/dist/components/SQLEditor/utils/commands.js +0 -8
- package/dist/components/SQLEditor/utils/commands.js.map +0 -1
- package/dist/components/SQLEditor/utils/debugger.js +0 -14
- package/dist/components/SQLEditor/utils/debugger.js.map +0 -1
- package/dist/components/SQLEditor/utils/getSuggestionKind.js +0 -18
- package/dist/components/SQLEditor/utils/getSuggestionKind.js.map +0 -1
- package/dist/components/SQLEditor/utils/linkedTokenBuilder.js +0 -46
- package/dist/components/SQLEditor/utils/linkedTokenBuilder.js.map +0 -1
- package/dist/components/SQLEditor/utils/toCompletionItem.js +0 -10
- package/dist/components/SQLEditor/utils/toCompletionItem.js.map +0 -1
- package/dist/components/SQLEditor/utils/tokenUtils.js +0 -72
- package/dist/components/SQLEditor/utils/tokenUtils.js.map +0 -1
- package/dist/components/SQLEditor/utils/types.js +0 -3
- package/dist/components/SQLEditor/utils/types.js.map +0 -1
- package/dist/components/Segment/Segment.js +0 -19
- package/dist/components/Segment/Segment.js.map +0 -1
- package/dist/components/VisualQueryBuilder/QueryModellerBase.js +0 -35
- package/dist/components/VisualQueryBuilder/QueryModellerBase.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/LabelFilterItem.js +0 -125
- package/dist/components/VisualQueryBuilder/components/LabelFilterItem.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/LabelFilters.js +0 -37
- package/dist/components/VisualQueryBuilder/components/LabelFilters.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/OperationEditor.js +0 -41
- package/dist/components/VisualQueryBuilder/components/OperationEditor.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/OperationEditorBody.js +0 -181
- package/dist/components/VisualQueryBuilder/components/OperationEditorBody.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/OperationExplainedBox.js +0 -64
- package/dist/components/VisualQueryBuilder/components/OperationExplainedBox.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/OperationHeader.js +0 -68
- package/dist/components/VisualQueryBuilder/components/OperationHeader.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/OperationInfoButton.js +0 -71
- package/dist/components/VisualQueryBuilder/components/OperationInfoButton.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/OperationList.js +0 -132
- package/dist/components/VisualQueryBuilder/components/OperationList.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/OperationListExplained.js +0 -22
- package/dist/components/VisualQueryBuilder/components/OperationListExplained.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/OperationParamEditor.js +0 -71
- package/dist/components/VisualQueryBuilder/components/OperationParamEditor.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/OperationsEditorRow.js +0 -24
- package/dist/components/VisualQueryBuilder/components/OperationsEditorRow.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/QueryBuilderHints.js +0 -54
- package/dist/components/VisualQueryBuilder/components/QueryBuilderHints.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/QueryEditorModeToggle.js +0 -17
- package/dist/components/VisualQueryBuilder/components/QueryEditorModeToggle.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/QueryHeaderSwitch.js +0 -32
- package/dist/components/VisualQueryBuilder/components/QueryHeaderSwitch.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/QueryOptionGroup.js +0 -81
- package/dist/components/VisualQueryBuilder/components/QueryOptionGroup.js.map +0 -1
- package/dist/components/VisualQueryBuilder/components/RawQuery.js +0 -25
- package/dist/components/VisualQueryBuilder/components/RawQuery.js.map +0 -1
- package/dist/components/VisualQueryBuilder/index.js +0 -29
- package/dist/components/VisualQueryBuilder/index.js.map +0 -1
- package/dist/components/VisualQueryBuilder/types.js +0 -10
- package/dist/components/VisualQueryBuilder/types.js.map +0 -1
- package/dist/components/index.js +0 -30
- package/dist/components/index.js.map +0 -1
- package/dist/datasource/SqlDatasource.js +0 -161
- package/dist/datasource/SqlDatasource.js.map +0 -1
- package/dist/datasource/constants.js +0 -19
- package/dist/datasource/constants.js.map +0 -1
- package/dist/hooks/useDebounce.js +0 -21
- package/dist/hooks/useDebounce.js.map +0 -1
- package/dist/index.js +0 -13
- package/dist/index.js.map +0 -1
- package/dist/src/components/AsyncButtonCascader/AsyncButtonCascader.d.ts +0 -21
- package/dist/src/components/Cascader/Cascader.d.ts +0 -1
- package/dist/src/components/ConfigEditor/AdvancedSettings/AdvancedHttpSettings.d.ts +0 -8
- package/dist/src/components/ConfigEditor/AdvancedSettings/index.d.ts +0 -1
- package/dist/src/components/ConfigEditor/Auth/Auth.d.ts +0 -18
- package/dist/src/components/ConfigEditor/Auth/auth-method/AuthMethodSettings.d.ts +0 -14
- package/dist/src/components/ConfigEditor/Auth/auth-method/BasicAuth.d.ts +0 -17
- package/dist/src/components/ConfigEditor/Auth/custom-headers/CustomHeader.d.ts +0 -10
- package/dist/src/components/ConfigEditor/Auth/custom-headers/CustomHeaders.d.ts +0 -8
- package/dist/src/components/ConfigEditor/Auth/index.d.ts +0 -4
- package/dist/src/components/ConfigEditor/Auth/styles.d.ts +0 -4
- package/dist/src/components/ConfigEditor/Auth/tls/SelfSignedCertificate.d.ts +0 -13
- package/dist/src/components/ConfigEditor/Auth/tls/SkipTLSVerification.d.ts +0 -7
- package/dist/src/components/ConfigEditor/Auth/tls/TLSClientAuth.d.ts +0 -20
- package/dist/src/components/ConfigEditor/Auth/tls/TLSSettings.d.ts +0 -11
- package/dist/src/components/ConfigEditor/Auth/tls/TLSSettingsSection.d.ts +0 -9
- package/dist/src/components/ConfigEditor/Auth/types.d.ts +0 -28
- package/dist/src/components/ConfigEditor/Auth/utils.d.ts +0 -12
- package/dist/src/components/ConfigEditor/ConfigSection/ConfigDescriptionLink.d.ts +0 -8
- package/dist/src/components/ConfigEditor/ConfigSection/ConfigSection.d.ts +0 -5
- package/dist/src/components/ConfigEditor/ConfigSection/ConfigSubSection.d.ts +0 -5
- package/dist/src/components/ConfigEditor/ConfigSection/GenericConfigSection.d.ts +0 -10
- package/dist/src/components/ConfigEditor/ConfigSection/index.d.ts +0 -3
- package/dist/src/components/ConfigEditor/Connection/ConnectionSettings.d.ts +0 -13
- package/dist/src/components/ConfigEditor/Connection/index.d.ts +0 -1
- package/dist/src/components/ConfigEditor/DataSourceDescription.d.ts +0 -9
- package/dist/src/components/ConfigEditor/SecureSocksProxyToggle.d.ts +0 -10
- package/dist/src/components/ConfigEditor/index.d.ts +0 -9
- package/dist/src/components/ConfigEditor/types.d.ts +0 -15
- package/dist/src/components/CustomHeadersSettings/CustomHeadersSettings.d.ts +0 -27
- package/dist/src/components/DataLinks/DataLink.d.ts +0 -13
- package/dist/src/components/DataLinks/DataLinks.d.ts +0 -8
- package/dist/src/components/DataLinks/index.d.ts +0 -3
- package/dist/src/components/DataLinks/types.d.ts +0 -7
- package/dist/src/components/DataSourcePicker/DataSourcePicker.d.ts +0 -34
- package/dist/src/components/DatePicker/DatePicker.d.ts +0 -8
- package/dist/src/components/DatePicker/styles.d.ts +0 -11
- package/dist/src/components/DatePickerWithInput/DatePickerWithInput.d.ts +0 -9
- package/dist/src/components/DebounceInput/DebounceInput.d.ts +0 -8
- package/dist/src/components/Plugins/PluginSignatureBadge.d.ts +0 -12
- package/dist/src/components/QueryEditor/AccessoryButton.d.ts +0 -6
- package/dist/src/components/QueryEditor/ConfirmModal.d.ts +0 -9
- package/dist/src/components/QueryEditor/DatasetSelector.d.ts +0 -13
- package/dist/src/components/QueryEditor/EditorField.d.ts +0 -12
- package/dist/src/components/QueryEditor/EditorFieldGroup.d.ts +0 -6
- package/dist/src/components/QueryEditor/EditorHeader.d.ts +0 -6
- package/dist/src/components/QueryEditor/EditorList.d.ts +0 -8
- package/dist/src/components/QueryEditor/EditorRow.d.ts +0 -6
- package/dist/src/components/QueryEditor/EditorRows.d.ts +0 -6
- package/dist/src/components/QueryEditor/EditorStack.d.ts +0 -13
- package/dist/src/components/QueryEditor/EditorSwitch.d.ts +0 -3
- package/dist/src/components/QueryEditor/FlexItem.d.ts +0 -7
- package/dist/src/components/QueryEditor/InlineSelect.d.ts +0 -7
- package/dist/src/components/QueryEditor/InputGroup.d.ts +0 -10
- package/dist/src/components/QueryEditor/QueryEditor.d.ts +0 -8
- package/dist/src/components/QueryEditor/QueryHeader.d.ts +0 -17
- package/dist/src/components/QueryEditor/RunQueryButton.d.ts +0 -13
- package/dist/src/components/QueryEditor/Space.d.ts +0 -14
- package/dist/src/components/QueryEditor/TableSelector.d.ts +0 -13
- package/dist/src/components/QueryEditor/defaults.d.ts +0 -3
- package/dist/src/components/QueryEditor/expressions.d.ts +0 -50
- package/dist/src/components/QueryEditor/index.d.ts +0 -17
- package/dist/src/components/QueryEditor/query-editor-raw/QueryEditorRaw.d.ts +0 -15
- package/dist/src/components/QueryEditor/query-editor-raw/QueryToolbox.d.ts +0 -11
- package/dist/src/components/QueryEditor/query-editor-raw/QueryValidator.d.ts +0 -10
- package/dist/src/components/QueryEditor/query-editor-raw/RawEditor.d.ts +0 -10
- package/dist/src/components/QueryEditor/types.d.ts +0 -149
- package/dist/src/components/QueryEditor/utils/formatSQL.d.ts +0 -1
- package/dist/src/components/QueryEditor/utils/sql.utils.d.ts +0 -14
- package/dist/src/components/QueryEditor/utils/useSqlChange.d.ts +0 -10
- package/dist/src/components/QueryEditor/visual-query-builder/AwesomeQueryBuilder.d.ts +0 -7
- package/dist/src/components/QueryEditor/visual-query-builder/EditorField.d.ts +0 -11
- package/dist/src/components/QueryEditor/visual-query-builder/EditorRow.d.ts +0 -6
- package/dist/src/components/QueryEditor/visual-query-builder/EditorRows.d.ts +0 -6
- package/dist/src/components/QueryEditor/visual-query-builder/GroupByRow.d.ts +0 -10
- package/dist/src/components/QueryEditor/visual-query-builder/OrderByRow.d.ts +0 -11
- package/dist/src/components/QueryEditor/visual-query-builder/Preview.d.ts +0 -6
- package/dist/src/components/QueryEditor/visual-query-builder/SQLGroupByRow.d.ts +0 -12
- package/dist/src/components/QueryEditor/visual-query-builder/SQLOrderByRow.d.ts +0 -12
- package/dist/src/components/QueryEditor/visual-query-builder/SQLSelectRow.d.ts +0 -12
- package/dist/src/components/QueryEditor/visual-query-builder/SQLWhereRow.d.ts +0 -12
- package/dist/src/components/QueryEditor/visual-query-builder/SelectRow.d.ts +0 -11
- package/dist/src/components/QueryEditor/visual-query-builder/VisualEditor.d.ts +0 -13
- package/dist/src/components/QueryEditor/visual-query-builder/WhereRow.d.ts +0 -10
- package/dist/src/components/QueryEditor/visual-query-builder/index.d.ts +0 -1
- package/dist/src/components/QueryEditorRow/QueryEditorRow.d.ts +0 -8
- package/dist/src/components/SQLEditor/components/SQLEditor.d.ts +0 -29
- package/dist/src/components/SQLEditor/index.d.ts +0 -7
- package/dist/src/components/SQLEditor/mocks/Monaco.d.ts +0 -3
- package/dist/src/components/SQLEditor/mocks/TextModel.d.ts +0 -7
- package/dist/src/components/SQLEditor/mocks/queries/multiLineFullQuery.d.ts +0 -2
- package/dist/src/components/SQLEditor/mocks/queries/multiLineFullQueryWithAggregation.d.ts +0 -2
- package/dist/src/components/SQLEditor/mocks/queries/multiLineMultipleColumns.d.ts +0 -2
- package/dist/src/components/SQLEditor/mocks/queries/singleLineEmptyQuery.d.ts +0 -2
- package/dist/src/components/SQLEditor/mocks/queries/singleLineFullQuery.d.ts +0 -2
- package/dist/src/components/SQLEditor/mocks/queries/singleLineFullQueryWithAggregation.d.ts +0 -2
- package/dist/src/components/SQLEditor/mocks/queries/singleLineMultipleColumns.d.ts +0 -2
- package/dist/src/components/SQLEditor/mocks/queries/singleLineTwoQueries.d.ts +0 -2
- package/dist/src/components/SQLEditor/mocks/queries/singleLineTwoQueriesWithAggregation.d.ts +0 -2
- package/dist/src/components/SQLEditor/standardSql/definition.d.ts +0 -3
- package/dist/src/components/SQLEditor/standardSql/getStandardSuggestions.d.ts +0 -6
- package/dist/src/components/SQLEditor/standardSql/getStatementPosition.d.ts +0 -5
- package/dist/src/components/SQLEditor/standardSql/language.d.ts +0 -23
- package/dist/src/components/SQLEditor/standardSql/macros.d.ts +0 -2
- package/dist/src/components/SQLEditor/standardSql/standardSQLCompletionItemProvider.d.ts +0 -4
- package/dist/src/components/SQLEditor/standardSql/standardSuggestionsRegistry.d.ts +0 -7
- package/dist/src/components/SQLEditor/standardSql/statementPositionResolversRegistry.d.ts +0 -2
- package/dist/src/components/SQLEditor/standardSql/suggestionsKindRegistry.d.ts +0 -7
- package/dist/src/components/SQLEditor/standardSql/types.d.ts +0 -33
- package/dist/src/components/SQLEditor/test-utils/index.d.ts +0 -7
- package/dist/src/components/SQLEditor/test-utils/statementPosition.d.ts +0 -3
- package/dist/src/components/SQLEditor/test-utils/types.d.ts +0 -12
- package/dist/src/components/SQLEditor/types.d.ts +0 -249
- package/dist/src/components/SQLEditor/utils/LinkedToken.d.ts +0 -29
- package/dist/src/components/SQLEditor/utils/commands.d.ts +0 -4
- package/dist/src/components/SQLEditor/utils/debugger.d.ts +0 -5
- package/dist/src/components/SQLEditor/utils/getSuggestionKind.d.ts +0 -7
- package/dist/src/components/SQLEditor/utils/linkedTokenBuilder.d.ts +0 -4
- package/dist/src/components/SQLEditor/utils/toCompletionItem.d.ts +0 -2
- package/dist/src/components/SQLEditor/utils/tokenUtils.d.ts +0 -14
- package/dist/src/components/SQLEditor/utils/types.d.ts +0 -11
- package/dist/src/components/Segment/Segment.d.ts +0 -8
- package/dist/src/components/VisualQueryBuilder/QueryModellerBase.d.ts +0 -18
- package/dist/src/components/VisualQueryBuilder/components/LabelFilterItem.d.ts +0 -18
- package/dist/src/components/VisualQueryBuilder/components/LabelFilters.d.ts +0 -14
- package/dist/src/components/VisualQueryBuilder/components/OperationEditor.d.ts +0 -20
- package/dist/src/components/VisualQueryBuilder/components/OperationEditorBody.d.ts +0 -23
- package/dist/src/components/VisualQueryBuilder/components/OperationExplainedBox.d.ts +0 -7
- package/dist/src/components/VisualQueryBuilder/components/OperationHeader.d.ts +0 -15
- package/dist/src/components/VisualQueryBuilder/components/OperationInfoButton.d.ts +0 -9
- package/dist/src/components/VisualQueryBuilder/components/OperationList.d.ts +0 -15
- package/dist/src/components/VisualQueryBuilder/components/OperationListExplained.d.ts +0 -17
- package/dist/src/components/VisualQueryBuilder/components/OperationParamEditor.d.ts +0 -4
- package/dist/src/components/VisualQueryBuilder/components/OperationsEditorRow.d.ts +0 -2
- package/dist/src/components/VisualQueryBuilder/components/QueryBuilderHints.d.ts +0 -20
- package/dist/src/components/VisualQueryBuilder/components/QueryEditorModeToggle.d.ts +0 -8
- package/dist/src/components/VisualQueryBuilder/components/QueryHeaderSwitch.d.ts +0 -7
- package/dist/src/components/VisualQueryBuilder/components/QueryOptionGroup.d.ts +0 -9
- package/dist/src/components/VisualQueryBuilder/components/RawQuery.d.ts +0 -12
- package/dist/src/components/VisualQueryBuilder/index.d.ts +0 -13
- package/dist/src/components/VisualQueryBuilder/types.d.ts +0 -91
- package/dist/src/components/index.d.ts +0 -15
- package/dist/src/datasource/SqlDatasource.d.ts +0 -62
- package/dist/src/datasource/constants.d.ts +0 -1
- package/dist/src/hooks/useDebounce.d.ts +0 -2
- package/dist/src/index.d.ts +0 -7
- package/dist/src/test/mocks/DataQuery.d.ts +0 -2
- package/dist/src/test/mocks/Datasource.d.ts +0 -40
- package/dist/src/test/mocks/Plugin.d.ts +0 -10
- package/dist/src/test/mocks/QueryEditorProps.d.ts +0 -4
- package/dist/src/test/mocks/index.d.ts +0 -5
- package/dist/src/test/mocks/utils.d.ts +0 -18
- package/dist/src/utils/changeset/functions.d.ts +0 -3
- package/dist/src/utils/changeset/index.d.ts +0 -2
- package/dist/test/mocks/DataQuery.js +0 -14
- package/dist/test/mocks/DataQuery.js.map +0 -1
- package/dist/test/mocks/Datasource.js +0 -78
- package/dist/test/mocks/Datasource.js.map +0 -1
- package/dist/test/mocks/Plugin.js +0 -105
- package/dist/test/mocks/Plugin.js.map +0 -1
- package/dist/test/mocks/QueryEditorProps.js +0 -46
- package/dist/test/mocks/QueryEditorProps.js.map +0 -1
- package/dist/test/mocks/index.js +0 -9
- package/dist/test/mocks/index.js.map +0 -1
- package/dist/test/mocks/utils.js +0 -48
- package/dist/test/mocks/utils.js.map +0 -1
- package/dist/utils/changeset/functions.js +0 -11
- package/dist/utils/changeset/functions.js.map +0 -1
- package/dist/utils/changeset/index.js +0 -99
- package/dist/utils/changeset/index.js.map +0 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SQLSelectRow = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const react_use_1 = require("react-use");
|
|
7
|
-
const data_1 = require("@grafana/data");
|
|
8
|
-
const SelectRow_1 = require("./SelectRow");
|
|
9
|
-
const useSqlChange_1 = require("../utils/useSqlChange");
|
|
10
|
-
function SQLSelectRow({ fields, query, onQueryChange, db }) {
|
|
11
|
-
const { onSqlChange } = (0, useSqlChange_1.useSqlChange)({ query, onQueryChange, db });
|
|
12
|
-
const state = (0, react_use_1.useAsync)(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
13
|
-
const functions = yield db.functions();
|
|
14
|
-
return functions.map((f) => (0, data_1.toOption)(f.name));
|
|
15
|
-
}), [db]);
|
|
16
|
-
return react_1.default.createElement(SelectRow_1.SelectRow, { columns: fields, sql: query.sql, functions: state.value, onSqlChange: onSqlChange });
|
|
17
|
-
}
|
|
18
|
-
exports.SQLSelectRow = SQLSelectRow;
|
|
19
|
-
//# sourceMappingURL=SQLSelectRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SQLSelectRow.js","sourceRoot":"","sources":["../../../../src/components/QueryEditor/visual-query-builder/SQLSelectRow.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,yCAAqC;AAErC,wCAA0D;AAE1D,2CAAwC;AAGxC,wDAAqD;AASrD,SAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAqB;IAClF,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,2BAAY,EAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAAC;IAEnE,MAAM,KAAK,GAAG,IAAA,oBAAQ,EAAC,GAAS,EAAE;QAChC,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,SAAS,EAAE,CAAC;QACvC,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,eAAQ,EAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAChD,CAAC,CAAA,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAET,OAAO,8BAAC,qBAAS,IAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,GAAI,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,GAAI,CAAC;AAC3G,CAAC;AATD,oCASC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SQLWhereRow = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const useAsync_1 = tslib_1.__importDefault(require("react-use/lib/useAsync"));
|
|
7
|
-
const WhereRow_1 = require("./WhereRow");
|
|
8
|
-
const useSqlChange_1 = require("../utils/useSqlChange");
|
|
9
|
-
function SQLWhereRow({ query, fields, onQueryChange, db }) {
|
|
10
|
-
const state = (0, useAsync_1.default)(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
11
|
-
return mapFieldsToTypes(fields);
|
|
12
|
-
}), [fields]);
|
|
13
|
-
const { onSqlChange } = (0, useSqlChange_1.useSqlChange)({ query, onQueryChange, db });
|
|
14
|
-
return (react_1.default.createElement(WhereRow_1.WhereRow
|
|
15
|
-
// TODO: fix key that's used to force clean render or SQLWhereRow - otherwise it doesn't render operators correctly
|
|
16
|
-
, {
|
|
17
|
-
// TODO: fix key that's used to force clean render or SQLWhereRow - otherwise it doesn't render operators correctly
|
|
18
|
-
key: JSON.stringify(state.value), config: { fields: state.value || {} }, sql: query.sql, onSqlChange: (val) => {
|
|
19
|
-
onSqlChange(val);
|
|
20
|
-
} }));
|
|
21
|
-
}
|
|
22
|
-
exports.SQLWhereRow = SQLWhereRow;
|
|
23
|
-
// needed for awesome query builder
|
|
24
|
-
function mapFieldsToTypes(columns) {
|
|
25
|
-
const fields = {};
|
|
26
|
-
for (const col of columns) {
|
|
27
|
-
fields[col.value] = {
|
|
28
|
-
type: col.raqbFieldType || 'text',
|
|
29
|
-
valueSources: ['value'],
|
|
30
|
-
mainWidgetProps: { customProps: { icon: col.icon } },
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
return fields;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=SQLWhereRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SQLWhereRow.js","sourceRoot":"","sources":["../../../../src/components/QueryEditor/visual-query-builder/SQLWhereRow.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,8EAA8C;AAK9C,yCAAsC;AAGtC,wDAAqD;AASrD,SAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,EAAiB;IAC7E,MAAM,KAAK,GAAG,IAAA,kBAAQ,EAAC,GAAS,EAAE;QAChC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAA,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,2BAAY,EAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAAC;IAEnE,OAAO,CACL,8BAAC,mBAAQ;IACP,mHAAmH;;QAAnH,mHAAmH;QACnH,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAChC,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE,EACrC,GAAG,EAAE,KAAK,CAAC,GAAI,EACf,WAAW,EAAE,CAAC,GAAkB,EAAE,EAAE;YAClC,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC,GACD,CACH,CAAC;AACJ,CAAC;AAlBD,kCAkBC;AAED,mCAAmC;AACnC,SAAS,gBAAgB,CAAC,OAA6B;IACrD,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;QACzB,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG;YAClB,IAAI,EAAE,GAAG,CAAC,aAAa,IAAI,MAAM;YACjC,YAAY,EAAE,CAAC,OAAO,CAAC;YACvB,eAAe,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,EAAE;SACrD,CAAC;KACH;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectRow = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const css_1 = require("@emotion/css");
|
|
6
|
-
const lodash_1 = require("lodash");
|
|
7
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
8
|
-
const data_1 = require("@grafana/data");
|
|
9
|
-
const ui_1 = require("@grafana/ui");
|
|
10
|
-
const EditorField_1 = require("../EditorField");
|
|
11
|
-
const expressions_1 = require("../expressions");
|
|
12
|
-
const sql_utils_1 = require("../utils/sql.utils");
|
|
13
|
-
const EditorStack_1 = require("../EditorStack");
|
|
14
|
-
const asteriskValue = { label: '*', value: '*' };
|
|
15
|
-
function SelectRow({ sql, columns, onSqlChange, functions }) {
|
|
16
|
-
var _a;
|
|
17
|
-
const styles = (0, ui_1.useStyles2)(getStyles);
|
|
18
|
-
const columnsWithAsterisk = [asteriskValue, ...(columns || [])];
|
|
19
|
-
const onColumnChange = (0, react_1.useCallback)((item, index) => (column) => {
|
|
20
|
-
var _a, _b;
|
|
21
|
-
let modifiedItem = Object.assign({}, item);
|
|
22
|
-
if (!((_a = item.parameters) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
23
|
-
modifiedItem.parameters = [{ type: expressions_1.QueryEditorExpressionType.FunctionParameter, name: column.value }];
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
modifiedItem.parameters = item.parameters.map((p) => p.type === expressions_1.QueryEditorExpressionType.FunctionParameter ? Object.assign(Object.assign({}, p), { name: column.value }) : p);
|
|
27
|
-
}
|
|
28
|
-
const newSql = Object.assign(Object.assign({}, sql), { columns: (_b = sql.columns) === null || _b === void 0 ? void 0 : _b.map((c, i) => (i === index ? modifiedItem : c)) });
|
|
29
|
-
onSqlChange(newSql);
|
|
30
|
-
}, [onSqlChange, sql]);
|
|
31
|
-
const onAggregationChange = (0, react_1.useCallback)((item, index) => (aggregation) => {
|
|
32
|
-
var _a;
|
|
33
|
-
const newItem = Object.assign(Object.assign({}, item), { name: aggregation === null || aggregation === void 0 ? void 0 : aggregation.value });
|
|
34
|
-
const newSql = Object.assign(Object.assign({}, sql), { columns: (_a = sql.columns) === null || _a === void 0 ? void 0 : _a.map((c, i) => (i === index ? newItem : c)) });
|
|
35
|
-
onSqlChange(newSql);
|
|
36
|
-
}, [onSqlChange, sql]);
|
|
37
|
-
const removeColumn = (0, react_1.useCallback)((index) => () => {
|
|
38
|
-
const clone = [...sql.columns];
|
|
39
|
-
clone.splice(index, 1);
|
|
40
|
-
const newSql = Object.assign(Object.assign({}, sql), { columns: clone });
|
|
41
|
-
onSqlChange(newSql);
|
|
42
|
-
}, [onSqlChange, sql]);
|
|
43
|
-
const addColumn = (0, react_1.useCallback)(() => {
|
|
44
|
-
const newSql = Object.assign(Object.assign({}, sql), { columns: [...sql.columns, (0, sql_utils_1.createFunctionField)()] });
|
|
45
|
-
onSqlChange(newSql);
|
|
46
|
-
}, [onSqlChange, sql]);
|
|
47
|
-
return (react_1.default.createElement(EditorStack_1.EditorStack, { gap: 2, alignItems: "end", direction: "column" }, (_a = sql.columns) === null || _a === void 0 ? void 0 :
|
|
48
|
-
_a.map((item, index) => (react_1.default.createElement("div", { key: index },
|
|
49
|
-
react_1.default.createElement(EditorStack_1.EditorStack, { gap: 2, alignItems: "end" },
|
|
50
|
-
react_1.default.createElement(EditorField_1.EditorField, { label: "Column", width: 25 },
|
|
51
|
-
react_1.default.createElement(ui_1.Select, { value: getColumnValue(item), options: columnsWithAsterisk, inputId: `select-column-${index}-${(0, lodash_1.uniqueId)()}`, menuShouldPortal: true, allowCustomValue: true, onChange: onColumnChange(item, index) })),
|
|
52
|
-
react_1.default.createElement(EditorField_1.EditorField, { label: "Aggregation", optional: true, width: 25 },
|
|
53
|
-
react_1.default.createElement(ui_1.Select, { value: item.name ? (0, data_1.toOption)(item.name) : null, inputId: `select-aggregation-${index}-${(0, lodash_1.uniqueId)()}`, isClearable: true, menuShouldPortal: true, allowCustomValue: true, options: functions, onChange: onAggregationChange(item, index) })),
|
|
54
|
-
react_1.default.createElement(ui_1.Button, { "aria-label": "Remove", type: "button", icon: "trash-alt", variant: "secondary", size: "md", onClick: removeColumn(index) }))))),
|
|
55
|
-
react_1.default.createElement(ui_1.Button, { type: "button", onClick: addColumn, variant: "secondary", size: "md", icon: "plus", "aria-label": "Add", className: styles.addButton })));
|
|
56
|
-
}
|
|
57
|
-
exports.SelectRow = SelectRow;
|
|
58
|
-
const getStyles = () => {
|
|
59
|
-
return { addButton: (0, css_1.css)({ alignSelf: 'flex-start' }) };
|
|
60
|
-
};
|
|
61
|
-
function getColumnValue({ parameters }) {
|
|
62
|
-
const column = parameters === null || parameters === void 0 ? void 0 : parameters.find((p) => p.type === expressions_1.QueryEditorExpressionType.FunctionParameter);
|
|
63
|
-
if (column === null || column === void 0 ? void 0 : column.name) {
|
|
64
|
-
return (0, data_1.toOption)(column.name);
|
|
65
|
-
}
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=SelectRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectRow.js","sourceRoot":"","sources":["../../../../src/components/QueryEditor/visual-query-builder/SelectRow.tsx"],"names":[],"mappings":";;;;AAAA,sCAAmC;AACnC,mCAAkC;AAClC,uDAA2C;AAE3C,wCAA0D;AAC1D,oCAAyD;AACzD,gDAA6C;AAC7C,gDAA0F;AAE1F,kDAAyD;AACzD,gDAA6C;AAS7C,MAAM,aAAa,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AAEjD,SAAgB,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAkB;;IAChF,MAAM,MAAM,GAAG,IAAA,eAAU,EAAC,SAAS,CAAC,CAAC;IACrC,MAAM,mBAAmB,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;IAEhE,MAAM,cAAc,GAAG,IAAA,mBAAW,EAChC,CAAC,IAAmC,EAAE,KAAa,EAAE,EAAE,CAAC,CAAC,MAA+B,EAAE,EAAE;;QAC1F,IAAI,YAAY,qBAAQ,IAAI,CAAE,CAAC;QAC/B,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,CAAA,EAAE;YAC5B,YAAY,CAAC,UAAU,GAAG,CAAC,EAAE,IAAI,EAAE,uCAAyB,CAAC,iBAAiB,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,EAAW,CAAC,CAAC;SAChH;aAAM;YACL,YAAY,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAClD,CAAC,CAAC,IAAI,KAAK,uCAAyB,CAAC,iBAAiB,CAAC,CAAC,iCAAM,CAAC,KAAE,IAAI,EAAE,MAAM,CAAC,KAAK,IAAG,CAAC,CAAC,CAAC,CAC1F,CAAC;SACH;QAED,MAAM,MAAM,mCACP,GAAG,KACN,OAAO,EAAE,MAAA,GAAG,CAAC,OAAO,0CAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACtE,CAAC;QAEF,WAAW,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC,EACD,CAAC,WAAW,EAAE,GAAG,CAAC,CACnB,CAAC;IAEF,MAAM,mBAAmB,GAAG,IAAA,mBAAW,EACrC,CAAC,IAAmC,EAAE,KAAa,EAAE,EAAE,CAAC,CAAC,WAAoC,EAAE,EAAE;;QAC/F,MAAM,OAAO,mCACR,IAAI,KACP,IAAI,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,GACzB,CAAC;QACF,MAAM,MAAM,mCACP,GAAG,KACN,OAAO,EAAE,MAAA,GAAG,CAAC,OAAO,0CAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACjE,CAAC;QAEF,WAAW,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC,EACD,CAAC,WAAW,EAAE,GAAG,CAAC,CACnB,CAAC;IAEF,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,EAAE;QACtB,MAAM,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,OAAQ,CAAC,CAAC;QAChC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACvB,MAAM,MAAM,mCACP,GAAG,KACN,OAAO,EAAE,KAAK,GACf,CAAC;QACF,WAAW,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC,EACD,CAAC,WAAW,EAAE,GAAG,CAAC,CACnB,CAAC;IAEF,MAAM,SAAS,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACjC,MAAM,MAAM,mCAAuB,GAAG,KAAE,OAAO,EAAE,CAAC,GAAG,GAAG,CAAC,OAAQ,EAAE,IAAA,+BAAmB,GAAE,CAAC,GAAE,CAAC;QAC5F,WAAW,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;IAEvB,OAAO,CACL,8BAAC,yBAAW,IAAC,GAAG,EAAE,CAAC,EAAE,UAAU,EAAC,KAAK,EAAC,SAAS,EAAC,QAAQ,IACrD,MAAA,GAAG,CAAC,OAAO;WAAE,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CACjC,uCAAK,GAAG,EAAE,KAAK;YACb,8BAAC,yBAAW,IAAC,GAAG,EAAE,CAAC,EAAE,UAAU,EAAC,KAAK;gBACnC,8BAAC,yBAAW,IAAC,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE;oBACnC,8BAAC,WAAM,IACL,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,EAC3B,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,iBAAiB,KAAK,IAAI,IAAA,iBAAQ,GAAE,EAAE,EAC/C,gBAAgB,QAChB,gBAAgB,QAChB,QAAQ,EAAE,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,GACrC,CACU;gBAEd,8BAAC,yBAAW,IAAC,KAAK,EAAC,aAAa,EAAC,QAAQ,QAAC,KAAK,EAAE,EAAE;oBACjD,8BAAC,WAAM,IACL,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,eAAQ,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAC7C,OAAO,EAAE,sBAAsB,KAAK,IAAI,IAAA,iBAAQ,GAAE,EAAE,EACpD,WAAW,QACX,gBAAgB,QAChB,gBAAgB,QAChB,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,mBAAmB,CAAC,IAAI,EAAE,KAAK,CAAC,GAC1C,CACU;gBACd,8BAAC,WAAM,kBACM,QAAQ,EACnB,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,WAAW,EAChB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC,GAC5B,CACU,CACV,CACP,CAAC;QACF,8BAAC,WAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,SAAS,EAClB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,IAAI,EACT,IAAI,EAAC,MAAM,gBACA,KAAK,EAChB,SAAS,EAAE,MAAM,CAAC,SAAS,GAC3B,CACU,CACf,CAAC;AACJ,CAAC;AA5GD,8BA4GC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,EAAE,SAAS,EAAE,IAAA,SAAG,EAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;AACzD,CAAC,CAAC;AAEF,SAAS,cAAc,CAAC,EAAE,UAAU,EAAiC;IACnE,MAAM,MAAM,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,uCAAyB,CAAC,iBAAiB,CAAC,CAAC;IAC/F,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE;QAChB,OAAO,IAAA,eAAQ,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KAC9B;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VisualEditor = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const react_use_1 = require("react-use");
|
|
7
|
-
const QueryToolbox_1 = require("../query-editor-raw/QueryToolbox");
|
|
8
|
-
const Preview_1 = require("./Preview");
|
|
9
|
-
const SQLGroupByRow_1 = require("./SQLGroupByRow");
|
|
10
|
-
const SQLOrderByRow_1 = require("./SQLOrderByRow");
|
|
11
|
-
const SQLSelectRow_1 = require("./SQLSelectRow");
|
|
12
|
-
const SQLWhereRow_1 = require("./SQLWhereRow");
|
|
13
|
-
const EditorRow_1 = require("./EditorRow");
|
|
14
|
-
const EditorField_1 = require("./EditorField");
|
|
15
|
-
const EditorRows_1 = require("./EditorRows");
|
|
16
|
-
const VisualEditor = ({ query, db, queryRowFilter, onChange, onValidate, range }) => {
|
|
17
|
-
const state = (0, react_use_1.useAsync)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
-
const fields = yield db.fields(query);
|
|
19
|
-
return fields;
|
|
20
|
-
}), [db, query.dataset, query.table]);
|
|
21
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
22
|
-
react_1.default.createElement(EditorRows_1.EditorRows, null,
|
|
23
|
-
react_1.default.createElement(EditorRow_1.EditorRow, null,
|
|
24
|
-
react_1.default.createElement(SQLSelectRow_1.SQLSelectRow, { fields: state.value || [], query: query, onQueryChange: onChange, db: db })),
|
|
25
|
-
queryRowFilter.filter && (react_1.default.createElement(EditorRow_1.EditorRow, null,
|
|
26
|
-
react_1.default.createElement(EditorField_1.EditorField, { label: "Filter by column value", optional: true },
|
|
27
|
-
react_1.default.createElement(SQLWhereRow_1.SQLWhereRow, { fields: state.value || [], query: query, onQueryChange: onChange, db: db })))),
|
|
28
|
-
queryRowFilter.group && (react_1.default.createElement(EditorRow_1.EditorRow, null,
|
|
29
|
-
react_1.default.createElement(EditorField_1.EditorField, { label: "Group by column" },
|
|
30
|
-
react_1.default.createElement(SQLGroupByRow_1.SQLGroupByRow, { fields: state.value || [], query: query, onQueryChange: onChange, db: db })))),
|
|
31
|
-
queryRowFilter.order && (react_1.default.createElement(EditorRow_1.EditorRow, null,
|
|
32
|
-
react_1.default.createElement(SQLOrderByRow_1.SQLOrderByRow, { fields: state.value || [], query: query, onQueryChange: onChange, db: db }))),
|
|
33
|
-
queryRowFilter.preview && query.rawSql && (react_1.default.createElement(EditorRow_1.EditorRow, null,
|
|
34
|
-
react_1.default.createElement(Preview_1.Preview, { rawSql: query.rawSql })))),
|
|
35
|
-
react_1.default.createElement(QueryToolbox_1.QueryToolbox, { db: db, query: query, onValidate: onValidate, range: range })));
|
|
36
|
-
};
|
|
37
|
-
exports.VisualEditor = VisualEditor;
|
|
38
|
-
//# sourceMappingURL=VisualEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VisualEditor.js","sourceRoot":"","sources":["../../../../src/components/QueryEditor/visual-query-builder/VisualEditor.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,yCAAqC;AAGrC,mEAAgE;AAEhE,uCAAoC;AACpC,mDAAgD;AAChD,mDAAgD;AAChD,iDAA8C;AAC9C,+CAA4C;AAE5C,2CAAwC;AACxC,+CAA4C;AAC5C,6CAA0C;AAWnC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAqB,EAAE,EAAE;IAC5G,MAAM,KAAK,GAAG,IAAA,oBAAQ,EAAC,GAAS,EAAE;QAChC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC;IAChB,CAAC,CAAA,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAErC,OAAO,CACL;QACE,8BAAC,uBAAU;YACT,8BAAC,qBAAS;gBACR,8BAAC,2BAAY,IAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,GAAI,CAChF;YACX,cAAc,CAAC,MAAM,IAAI,CACxB,8BAAC,qBAAS;gBACR,8BAAC,yBAAW,IAAC,KAAK,EAAC,wBAAwB,EAAC,QAAQ;oBAClD,8BAAC,yBAAW,IAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,GAAI,CAC7E,CACJ,CACb;YACA,cAAc,CAAC,KAAK,IAAI,CACvB,8BAAC,qBAAS;gBACR,8BAAC,yBAAW,IAAC,KAAK,EAAC,iBAAiB;oBAClC,8BAAC,6BAAa,IAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,GAAI,CAC/E,CACJ,CACb;YACA,cAAc,CAAC,KAAK,IAAI,CACvB,8BAAC,qBAAS;gBACR,8BAAC,6BAAa,IAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,GAAI,CACjF,CACb;YACA,cAAc,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,IAAI,CACzC,8BAAC,qBAAS;gBACR,8BAAC,iBAAO,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAI,CACvB,CACb,CACU;QACb,8BAAC,2BAAY,IAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAI,CAC3E,CACJ,CAAC;AACJ,CAAC,CAAC;AAxCW,QAAA,YAAY,gBAwCvB"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WhereRow = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const css_1 = require("@emotion/css");
|
|
6
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
-
const react_awesome_query_builder_1 = require("react-awesome-query-builder");
|
|
8
|
-
const AwesomeQueryBuilder_1 = require("./AwesomeQueryBuilder");
|
|
9
|
-
function WhereRow({ sql, config, onSqlChange }) {
|
|
10
|
-
const [tree, setTree] = (0, react_1.useState)();
|
|
11
|
-
const configWithDefaults = (0, react_1.useMemo)(() => (Object.assign(Object.assign({}, AwesomeQueryBuilder_1.raqbConfig), config)), [config]);
|
|
12
|
-
(0, react_1.useEffect)(() => {
|
|
13
|
-
var _a;
|
|
14
|
-
// Set the initial tree
|
|
15
|
-
if (!tree) {
|
|
16
|
-
const initTree = react_awesome_query_builder_1.Utils.checkTree(react_awesome_query_builder_1.Utils.loadTree((_a = sql.whereJsonTree) !== null && _a !== void 0 ? _a : AwesomeQueryBuilder_1.emptyInitTree), configWithDefaults);
|
|
17
|
-
setTree(initTree);
|
|
18
|
-
}
|
|
19
|
-
}, [configWithDefaults, sql.whereJsonTree, tree]);
|
|
20
|
-
(0, react_1.useEffect)(() => {
|
|
21
|
-
if (!sql.whereJsonTree) {
|
|
22
|
-
setTree(react_awesome_query_builder_1.Utils.checkTree(react_awesome_query_builder_1.Utils.loadTree(AwesomeQueryBuilder_1.emptyInitTree), configWithDefaults));
|
|
23
|
-
}
|
|
24
|
-
}, [configWithDefaults, sql.whereJsonTree]);
|
|
25
|
-
const onTreeChange = (0, react_1.useCallback)((changedTree, config) => {
|
|
26
|
-
setTree(changedTree);
|
|
27
|
-
const newSql = Object.assign(Object.assign({}, sql), { whereJsonTree: react_awesome_query_builder_1.Utils.getTree(changedTree), whereString: react_awesome_query_builder_1.Utils.sqlFormat(changedTree, config) });
|
|
28
|
-
onSqlChange(newSql);
|
|
29
|
-
}, [onSqlChange, sql]);
|
|
30
|
-
if (!tree) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
return (react_1.default.createElement(react_awesome_query_builder_1.Query, Object.assign({}, configWithDefaults, { value: tree, onChange: onTreeChange, renderBuilder: (props) => react_1.default.createElement(react_awesome_query_builder_1.Builder, Object.assign({}, props)) })));
|
|
34
|
-
}
|
|
35
|
-
exports.WhereRow = WhereRow;
|
|
36
|
-
function flex(direction) {
|
|
37
|
-
return `
|
|
38
|
-
display: flex;
|
|
39
|
-
gap: 8px;
|
|
40
|
-
flex-direction: ${direction};`;
|
|
41
|
-
}
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
43
|
-
(0, css_1.injectGlobal) `
|
|
44
|
-
.group--header {
|
|
45
|
-
${flex('row')}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.group-or-rule {
|
|
49
|
-
${flex('column')}
|
|
50
|
-
.rule {
|
|
51
|
-
flex-direction: row;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.rule--body {
|
|
56
|
-
${flex('row')}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.group--children {
|
|
60
|
-
${flex('column')}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.group--conjunctions:empty {
|
|
64
|
-
display: none;
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
//# sourceMappingURL=WhereRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WhereRow.js","sourceRoot":"","sources":["../../../../src/components/QueryEditor/visual-query-builder/WhereRow.tsx"],"names":[],"mappings":";;;;AAAA,sCAA4C;AAC5C,uDAAyE;AACzE,6EAA2F;AAE3F,+DAAkE;AAQlE,SAAgB,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAA2B;IAC5E,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,GAAiB,CAAC;IAClD,MAAM,kBAAkB,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,iCAAM,gCAAU,GAAK,MAAM,EAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEnF,IAAA,iBAAS,EAAC,GAAG,EAAE;;QACb,uBAAuB;QACvB,IAAI,CAAC,IAAI,EAAE;YACT,MAAM,QAAQ,GAAG,mCAAK,CAAC,SAAS,CAAC,mCAAK,CAAC,QAAQ,CAAC,MAAA,GAAG,CAAC,aAAa,mCAAI,mCAAa,CAAC,EAAE,kBAAkB,CAAC,CAAC;YACzG,OAAO,CAAC,QAAQ,CAAC,CAAC;SACnB;IACH,CAAC,EAAE,CAAC,kBAAkB,EAAE,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC;IAElD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE;YACtB,OAAO,CAAC,mCAAK,CAAC,SAAS,CAAC,mCAAK,CAAC,QAAQ,CAAC,mCAAa,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC;SAC7E;IACH,CAAC,EAAE,CAAC,kBAAkB,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;IAE5C,MAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,CAAC,WAA0B,EAAE,MAAc,EAAE,EAAE;QAC7C,OAAO,CAAC,WAAW,CAAC,CAAC;QACrB,MAAM,MAAM,mCACP,GAAG,KACN,aAAa,EAAE,mCAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EACzC,WAAW,EAAE,mCAAK,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,GAClD,CAAC;QAEF,WAAW,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC,EACD,CAAC,WAAW,EAAE,GAAG,CAAC,CACnB,CAAC;IAEF,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,8BAAC,mCAAK,oBACA,kBAAkB,IACtB,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,8BAAC,qCAAO,oBAAK,KAAK,EAAI,IAChD,CACH,CAAC;AACJ,CAAC;AA5CD,4BA4CC;AAED,SAAS,IAAI,CAAC,SAAiB;IAC7B,OAAO;;;sBAGa,SAAS,GAAG,CAAC;AACnC,CAAC;AAED,oEAAoE;AACpE,IAAA,kBAAY,EAAA;;MAEN,IAAI,CAAC,KAAK,CAAC;;;;MAIX,IAAI,CAAC,QAAQ,CAAC;;;;;;;MAOd,IAAI,CAAC,KAAK,CAAC;;;;MAIX,IAAI,CAAC,QAAQ,CAAC;;;;;;CAMnB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GroupByRow = void 0;
|
|
4
|
-
var GroupByRow_1 = require("./GroupByRow");
|
|
5
|
-
Object.defineProperty(exports, "GroupByRow", { enumerable: true, get: function () { return GroupByRow_1.GroupByRow; } });
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/QueryEditor/visual-query-builder/index.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAAjC,wGAAA,UAAU,OAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QueryEditorRow = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const QueryEditorRow = (props) => {
|
|
7
|
-
var _a, _b;
|
|
8
|
-
const className = (_a = props.className) !== null && _a !== void 0 ? _a : 'width-8';
|
|
9
|
-
const noFillEnd = (_b = props.noFillEnd) !== null && _b !== void 0 ? _b : false;
|
|
10
|
-
return (react_1.default.createElement("div", { className: "gf-form" },
|
|
11
|
-
props.label && react_1.default.createElement("label", { className: `gf-form-label query-keyword ${className}` }, props.label),
|
|
12
|
-
props.children,
|
|
13
|
-
react_1.default.createElement("div", { className: 'gf-form--grow' }, noFillEnd || react_1.default.createElement("div", { className: 'gf-form-label gf-form-label--grow' }))));
|
|
14
|
-
};
|
|
15
|
-
exports.QueryEditorRow = QueryEditorRow;
|
|
16
|
-
//# sourceMappingURL=QueryEditorRow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QueryEditorRow.js","sourceRoot":"","sources":["../../../src/components/QueryEditorRow/QueryEditorRow.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AASnB,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAE,EAAE;;IAC3D,MAAM,SAAS,GAAW,MAAA,KAAK,CAAC,SAAS,mCAAI,SAAS,CAAC;IACvD,MAAM,SAAS,GAAY,MAAA,KAAK,CAAC,SAAS,mCAAI,KAAK,CAAC;IAEpD,OAAO,CACL,uCAAK,SAAS,EAAC,SAAS;QACrB,KAAK,CAAC,KAAK,IAAI,yCAAO,SAAS,EAAE,+BAA+B,SAAS,EAAE,IAAG,KAAK,CAAC,KAAK,CAAS;QAClG,KAAK,CAAC,QAAQ;QAEf,uCAAK,SAAS,EAAE,eAAe,IAAG,SAAS,IAAI,uCAAK,SAAS,EAAE,mCAAmC,GAAQ,CAAO,CAC7G,CACP,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,cAAc,kBAYzB"}
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerLanguageAndSuggestions = exports.SQLEditor = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const ui_1 = require("@grafana/ui");
|
|
6
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
-
const getStatementPosition_1 = require("../standardSql/getStatementPosition");
|
|
8
|
-
const getStandardSuggestions_1 = require("../standardSql/getStandardSuggestions");
|
|
9
|
-
const suggestionsKindRegistry_1 = require("../standardSql/suggestionsKindRegistry");
|
|
10
|
-
const types_1 = require("../types");
|
|
11
|
-
const getSuggestionKind_1 = require("../utils/getSuggestionKind");
|
|
12
|
-
const linkedTokenBuilder_1 = require("../utils/linkedTokenBuilder");
|
|
13
|
-
const tokenUtils_1 = require("../utils/tokenUtils");
|
|
14
|
-
const commands_1 = require("../utils/commands");
|
|
15
|
-
const uuid_1 = require("uuid");
|
|
16
|
-
const data_1 = require("@grafana/data");
|
|
17
|
-
const standardSuggestionsRegistry_1 = require("../standardSql/standardSuggestionsRegistry");
|
|
18
|
-
const statementPositionResolversRegistry_1 = require("../standardSql/statementPositionResolversRegistry");
|
|
19
|
-
const debugger_1 = require("../utils/debugger");
|
|
20
|
-
const definition_1 = tslib_1.__importDefault(require("../standardSql/definition"));
|
|
21
|
-
const standardSQLCompletionItemProvider_1 = require("../standardSql/standardSQLCompletionItemProvider");
|
|
22
|
-
const STANDARD_SQL_LANGUAGE = 'sql';
|
|
23
|
-
const LANGUAGES_CACHE = new Map();
|
|
24
|
-
const INSTANCE_CACHE = new Map();
|
|
25
|
-
const SQLEditor = ({ children, onBlur, onChange, query, language = { id: STANDARD_SQL_LANGUAGE }, width, height, }) => {
|
|
26
|
-
const monacoRef = (0, react_1.useRef)(null);
|
|
27
|
-
const langUid = (0, react_1.useRef)();
|
|
28
|
-
// create unique language id for each SQLEditor instance
|
|
29
|
-
const id = (0, react_1.useMemo)(() => {
|
|
30
|
-
const uid = (0, uuid_1.v4)();
|
|
31
|
-
const id = `${language.id}-${uid}`;
|
|
32
|
-
langUid.current = id;
|
|
33
|
-
return id;
|
|
34
|
-
}, [language.id]);
|
|
35
|
-
(0, react_1.useEffect)(() => {
|
|
36
|
-
return () => {
|
|
37
|
-
if (langUid.current) {
|
|
38
|
-
INSTANCE_CACHE.delete(langUid.current);
|
|
39
|
-
}
|
|
40
|
-
(0, debugger_1.sqlEditorLog)(`Removing instance cache ${langUid.current}`, false, INSTANCE_CACHE);
|
|
41
|
-
};
|
|
42
|
-
}, []);
|
|
43
|
-
const formatQuery = (0, react_1.useCallback)(() => {
|
|
44
|
-
if (monacoRef.current) {
|
|
45
|
-
monacoRef.current.getAction('editor.action.formatDocument').run();
|
|
46
|
-
}
|
|
47
|
-
}, []);
|
|
48
|
-
const onSqlBlur = (text) => {
|
|
49
|
-
onChange && onChange(text, false);
|
|
50
|
-
onBlur && onBlur(text);
|
|
51
|
-
};
|
|
52
|
-
return (react_1.default.createElement("div", { style: { width } },
|
|
53
|
-
react_1.default.createElement(ui_1.CodeEditor, { height: height || '240px',
|
|
54
|
-
// -2px to compensate for borders width
|
|
55
|
-
width: width ? `${width - 2}px` : undefined, language: id, value: query, onBlur: onSqlBlur, showMiniMap: false, showLineNumbers: true,
|
|
56
|
-
// Using onEditorDidMount instead of onBeforeEditorMount to support Grafana < 8.2.x
|
|
57
|
-
onEditorDidMount: (editor, m) => {
|
|
58
|
-
monacoRef.current = editor;
|
|
59
|
-
editor.onDidChangeModelContent((e) => {
|
|
60
|
-
const text = editor.getValue();
|
|
61
|
-
if (onChange) {
|
|
62
|
-
onChange(text, false);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
editor.addCommand(m.KeyMod.CtrlCmd | m.KeyCode.Enter, () => {
|
|
66
|
-
const text = editor.getValue();
|
|
67
|
-
if (onChange) {
|
|
68
|
-
onChange(text, true);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
editor.onKeyUp((e) => {
|
|
72
|
-
// keyCode 84 is . (DOT)
|
|
73
|
-
if (e.keyCode === 84) {
|
|
74
|
-
editor.trigger(commands_1.TRIGGER_SUGGEST.id, commands_1.TRIGGER_SUGGEST.id, {});
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
(0, exports.registerLanguageAndSuggestions)(m, language, id);
|
|
78
|
-
} }),
|
|
79
|
-
children && children({ formatQuery })));
|
|
80
|
-
};
|
|
81
|
-
exports.SQLEditor = SQLEditor;
|
|
82
|
-
// There's three ways to define Monaco language:
|
|
83
|
-
// 1. Leave language.id empty or set it to 'sql'. This will load a standard sql language definition, including syntax highlighting and tokenization for
|
|
84
|
-
// common Grafana entities such as macros and template variables
|
|
85
|
-
// 2. Provide a custom language and load it via the async LanguageDefinition.loader callback
|
|
86
|
-
// 3. Specify a language.id that exists in the Monaco language registry. A custom completion item provider can still be provided.
|
|
87
|
-
// If not, the standard SQL completion item provider will be used. See available languages here: https://github.com/microsoft/monaco-editor/tree/main/src/basic-languages
|
|
88
|
-
// If a custom language is specified, its LanguageDefinition will be merged with the LanguageDefinition for standard SQL. This allows the consumer to only
|
|
89
|
-
// override parts of the LanguageDefinition, such as for example the completion item provider.
|
|
90
|
-
const resolveLanguage = (monaco, languageDefinitionProp) => {
|
|
91
|
-
if ((languageDefinitionProp === null || languageDefinitionProp === void 0 ? void 0 : languageDefinitionProp.id) !== STANDARD_SQL_LANGUAGE && !languageDefinitionProp.loader) {
|
|
92
|
-
(0, debugger_1.sqlEditorLog)(`Loading language '${languageDefinitionProp === null || languageDefinitionProp === void 0 ? void 0 : languageDefinitionProp.id}' from Monaco registry`, false);
|
|
93
|
-
const allLangs = monaco.languages.getLanguages();
|
|
94
|
-
const custom = allLangs.find(({ id }) => id === (languageDefinitionProp === null || languageDefinitionProp === void 0 ? void 0 : languageDefinitionProp.id));
|
|
95
|
-
if (!custom) {
|
|
96
|
-
throw Error(`Unknown Monaco language ${languageDefinitionProp === null || languageDefinitionProp === void 0 ? void 0 : languageDefinitionProp.id}`);
|
|
97
|
-
}
|
|
98
|
-
return Object.assign(Object.assign({ completionProvider: standardSQLCompletionItemProvider_1.getStandardSQLCompletionProvider }, custom), languageDefinitionProp);
|
|
99
|
-
}
|
|
100
|
-
return Object.assign(Object.assign({}, definition_1.default), languageDefinitionProp);
|
|
101
|
-
};
|
|
102
|
-
const registerLanguageAndSuggestions = (monaco, l, lid) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
103
|
-
const languageDefinition = resolveLanguage(monaco, l);
|
|
104
|
-
if (!languageDefinition.loader) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
const { language, conf } = yield languageDefinition.loader(monaco);
|
|
108
|
-
monaco.languages.register({ id: lid });
|
|
109
|
-
monaco.languages.setMonarchTokensProvider(lid, Object.assign({}, language));
|
|
110
|
-
monaco.languages.setLanguageConfiguration(lid, Object.assign({}, conf));
|
|
111
|
-
if (languageDefinition.formatter) {
|
|
112
|
-
monaco.languages.registerDocumentFormattingEditProvider(lid, {
|
|
113
|
-
provideDocumentFormattingEdits: (model) => {
|
|
114
|
-
var _a;
|
|
115
|
-
const formatted = (_a = l.formatter) === null || _a === void 0 ? void 0 : _a.call(l, model.getValue());
|
|
116
|
-
return [
|
|
117
|
-
{
|
|
118
|
-
range: model.getFullModelRange(),
|
|
119
|
-
text: formatted || '',
|
|
120
|
-
},
|
|
121
|
-
];
|
|
122
|
-
},
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
if (languageDefinition.completionProvider) {
|
|
126
|
-
const customProvider = languageDefinition.completionProvider(monaco, language);
|
|
127
|
-
extendStandardRegistries(l.id, lid, customProvider);
|
|
128
|
-
const languageSuggestionsRegistries = LANGUAGES_CACHE.get(l.id);
|
|
129
|
-
const instanceSuggestionsRegistry = INSTANCE_CACHE.get(lid);
|
|
130
|
-
const completionProvider = (model, position, context, token) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
131
|
-
const currentToken = (0, linkedTokenBuilder_1.linkedTokenBuilder)(monaco, model, position, lid);
|
|
132
|
-
const statementPosition = (0, getStatementPosition_1.getStatementPosition)(currentToken, languageSuggestionsRegistries.positionResolvers);
|
|
133
|
-
const kind = (0, getSuggestionKind_1.getSuggestionKinds)(statementPosition, languageSuggestionsRegistries.suggestionKinds);
|
|
134
|
-
(0, debugger_1.sqlEditorLog)('Statement position', false, statementPosition);
|
|
135
|
-
(0, debugger_1.sqlEditorLog)('Suggestion kinds', false, kind);
|
|
136
|
-
const ctx = {
|
|
137
|
-
position,
|
|
138
|
-
currentToken,
|
|
139
|
-
statementPosition,
|
|
140
|
-
kind,
|
|
141
|
-
range: monaco.Range.fromPositions(position),
|
|
142
|
-
};
|
|
143
|
-
const stdSuggestions = yield (0, getStandardSuggestions_1.getStandardSuggestions)(monaco, currentToken, kind, ctx, instanceSuggestionsRegistry);
|
|
144
|
-
return {
|
|
145
|
-
suggestions: stdSuggestions,
|
|
146
|
-
};
|
|
147
|
-
});
|
|
148
|
-
monaco.languages.registerCompletionItemProvider(lid, Object.assign(Object.assign({}, customProvider), { provideCompletionItems: completionProvider }));
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
exports.registerLanguageAndSuggestions = registerLanguageAndSuggestions;
|
|
152
|
-
function extendStandardRegistries(id, lid, customProvider) {
|
|
153
|
-
var _a;
|
|
154
|
-
if (!LANGUAGES_CACHE.has(id)) {
|
|
155
|
-
initializeLanguageRegistries(id);
|
|
156
|
-
}
|
|
157
|
-
const languageRegistries = LANGUAGES_CACHE.get(id);
|
|
158
|
-
if (!INSTANCE_CACHE.has(lid)) {
|
|
159
|
-
INSTANCE_CACHE.set(lid, new data_1.Registry((0, standardSuggestionsRegistry_1.initStandardSuggestions)(languageRegistries.functions, languageRegistries.operators, languageRegistries.macros)));
|
|
160
|
-
}
|
|
161
|
-
const instanceSuggestionsRegistry = INSTANCE_CACHE.get(lid);
|
|
162
|
-
if (customProvider.supportedFunctions) {
|
|
163
|
-
for (const func of customProvider.supportedFunctions()) {
|
|
164
|
-
const exists = languageRegistries.functions.getIfExists(func.id);
|
|
165
|
-
if (!exists) {
|
|
166
|
-
languageRegistries.functions.register(func);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
if (customProvider.supportedOperators) {
|
|
171
|
-
for (const op of customProvider.supportedOperators()) {
|
|
172
|
-
const exists = languageRegistries.operators.getIfExists(op.id);
|
|
173
|
-
if (!exists) {
|
|
174
|
-
languageRegistries.operators.register(Object.assign(Object.assign({}, op), { name: op.id }));
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
if (customProvider.supportedMacros) {
|
|
179
|
-
for (const macro of customProvider.supportedMacros()) {
|
|
180
|
-
const exists = languageRegistries.macros.getIfExists(macro.id);
|
|
181
|
-
if (!exists) {
|
|
182
|
-
languageRegistries.macros.register(Object.assign(Object.assign({}, macro), { name: macro.id }));
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
if (customProvider.customStatementPlacement) {
|
|
187
|
-
for (const placement of customProvider.customStatementPlacement()) {
|
|
188
|
-
const exists = languageRegistries.positionResolvers.getIfExists(placement.id);
|
|
189
|
-
if (!exists) {
|
|
190
|
-
languageRegistries.positionResolvers.register(Object.assign(Object.assign({}, placement), { id: placement.id, name: placement.id }));
|
|
191
|
-
languageRegistries.suggestionKinds.register({
|
|
192
|
-
id: placement.id,
|
|
193
|
-
name: placement.id,
|
|
194
|
-
kind: [],
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
// Allow extension to the built-in placement resolvers
|
|
199
|
-
const origResolve = exists.resolve;
|
|
200
|
-
exists.resolve = (...args) => {
|
|
201
|
-
const ext = placement.resolve(...args);
|
|
202
|
-
if (placement.overrideDefault) {
|
|
203
|
-
return ext;
|
|
204
|
-
}
|
|
205
|
-
const orig = origResolve(...args);
|
|
206
|
-
return orig || ext;
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
if (customProvider.customSuggestionKinds) {
|
|
212
|
-
for (const kind of customProvider.customSuggestionKinds()) {
|
|
213
|
-
(_a = kind.applyTo) === null || _a === void 0 ? void 0 : _a.forEach((applyTo) => {
|
|
214
|
-
const exists = languageRegistries.suggestionKinds.getIfExists(applyTo);
|
|
215
|
-
if (exists) {
|
|
216
|
-
// avoid duplicates
|
|
217
|
-
if (exists.kind.indexOf(kind.id) === -1) {
|
|
218
|
-
exists.kind.push(kind.id);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
if (kind.overrideDefault) {
|
|
223
|
-
const stbBehavior = instanceSuggestionsRegistry.get(kind.id);
|
|
224
|
-
if (stbBehavior !== undefined) {
|
|
225
|
-
stbBehavior.suggestions = kind.suggestionsResolver;
|
|
226
|
-
continue;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
instanceSuggestionsRegistry.register({
|
|
230
|
-
id: kind.id,
|
|
231
|
-
name: kind.id,
|
|
232
|
-
suggestions: kind.suggestionsResolver,
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
if (customProvider.schemas) {
|
|
237
|
-
const stbBehavior = instanceSuggestionsRegistry.get(types_1.SuggestionKind.Schemas);
|
|
238
|
-
const s = stbBehavior.suggestions;
|
|
239
|
-
stbBehavior.suggestions = (ctx, m) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
240
|
-
const standardSchemas = yield s(ctx, m);
|
|
241
|
-
if (!customProvider.schemas) {
|
|
242
|
-
return [...standardSchemas];
|
|
243
|
-
}
|
|
244
|
-
const customSchemas = yield customProvider.schemas.resolve();
|
|
245
|
-
const customSchemaCompletionItems = customSchemas.map((x) => {
|
|
246
|
-
var _a;
|
|
247
|
-
return ({
|
|
248
|
-
label: x.name,
|
|
249
|
-
insertText: `${(_a = x.completion) !== null && _a !== void 0 ? _a : x.name}.`,
|
|
250
|
-
command: commands_1.TRIGGER_SUGGEST,
|
|
251
|
-
kind: types_1.CompletionItemKind.Module,
|
|
252
|
-
sortText: types_1.CompletionItemPriority.High,
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
return [...standardSchemas, ...customSchemaCompletionItems];
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
if (customProvider.tables) {
|
|
259
|
-
const stbBehavior = instanceSuggestionsRegistry.get(types_1.SuggestionKind.Tables);
|
|
260
|
-
const s = stbBehavior.suggestions;
|
|
261
|
-
stbBehavior.suggestions = (ctx, m) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
var _b, _c, _d, _e, _f;
|
|
263
|
-
const o = yield s(ctx, m);
|
|
264
|
-
const tableToken = (0, tokenUtils_1.getTableToken)(ctx.currentToken);
|
|
265
|
-
const tableNameParser = (_c = (_b = customProvider.tables) === null || _b === void 0 ? void 0 : _b.parseName) !== null && _c !== void 0 ? _c : tokenUtils_1.defaultTableNameParser;
|
|
266
|
-
const tableIdentifier = tableNameParser(tableToken);
|
|
267
|
-
const oo = ((_f = (yield ((_e = (_d = customProvider.tables) === null || _d === void 0 ? void 0 : _d.resolve) === null || _e === void 0 ? void 0 : _e.call(_d, tableIdentifier)))) !== null && _f !== void 0 ? _f : []).map((x) => {
|
|
268
|
-
var _a;
|
|
269
|
-
return ({
|
|
270
|
-
label: x.name,
|
|
271
|
-
// if no custom completion is provided it's safe to move cursor further in the statement
|
|
272
|
-
insertText: `${(_a = x.completion) !== null && _a !== void 0 ? _a : x.name}${x.completion === x.name ? ' $0' : ''}`,
|
|
273
|
-
insertTextRules: types_1.CompletionItemInsertTextRule.InsertAsSnippet,
|
|
274
|
-
command: commands_1.TRIGGER_SUGGEST,
|
|
275
|
-
kind: types_1.CompletionItemKind.Field,
|
|
276
|
-
sortText: types_1.CompletionItemPriority.MediumHigh,
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
return [...o, ...oo];
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
if (customProvider.columns) {
|
|
283
|
-
const stbBehavior = instanceSuggestionsRegistry.get(types_1.SuggestionKind.Columns);
|
|
284
|
-
const s = stbBehavior.suggestions;
|
|
285
|
-
stbBehavior.suggestions = (ctx, m) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
var _g, _h, _j;
|
|
287
|
-
const o = yield s(ctx, m);
|
|
288
|
-
const tableToken = (0, tokenUtils_1.getTableToken)(ctx.currentToken);
|
|
289
|
-
let tableIdentifier;
|
|
290
|
-
const tableNameParser = (_h = (_g = customProvider.tables) === null || _g === void 0 ? void 0 : _g.parseName) !== null && _h !== void 0 ? _h : tokenUtils_1.defaultTableNameParser;
|
|
291
|
-
if (tableToken && tableToken.value) {
|
|
292
|
-
tableIdentifier = tableNameParser(tableToken);
|
|
293
|
-
}
|
|
294
|
-
let oo = [];
|
|
295
|
-
if (tableIdentifier) {
|
|
296
|
-
const columns = yield ((_j = customProvider.columns) === null || _j === void 0 ? void 0 : _j.resolve(tableIdentifier));
|
|
297
|
-
oo = columns
|
|
298
|
-
? columns.map((x) => {
|
|
299
|
-
var _a;
|
|
300
|
-
return ({
|
|
301
|
-
label: x.name,
|
|
302
|
-
insertText: (_a = x.completion) !== null && _a !== void 0 ? _a : x.name,
|
|
303
|
-
kind: types_1.CompletionItemKind.Field,
|
|
304
|
-
sortText: types_1.CompletionItemPriority.High,
|
|
305
|
-
detail: x.type,
|
|
306
|
-
documentation: x.description,
|
|
307
|
-
});
|
|
308
|
-
})
|
|
309
|
-
: [];
|
|
310
|
-
}
|
|
311
|
-
return [...o, ...oo];
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Initializes language specific registries that are treated as singletons
|
|
317
|
-
*/
|
|
318
|
-
function initializeLanguageRegistries(id) {
|
|
319
|
-
if (!LANGUAGES_CACHE.has(id)) {
|
|
320
|
-
LANGUAGES_CACHE.set(id, {
|
|
321
|
-
functions: new data_1.Registry(),
|
|
322
|
-
operators: new data_1.Registry(),
|
|
323
|
-
suggestionKinds: new data_1.Registry(suggestionsKindRegistry_1.initSuggestionsKindRegistry),
|
|
324
|
-
positionResolvers: new data_1.Registry(statementPositionResolversRegistry_1.initStatementPositionResolvers),
|
|
325
|
-
macros: new data_1.Registry(),
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
return LANGUAGES_CACHE.get(id);
|
|
329
|
-
}
|
|
330
|
-
//# sourceMappingURL=SQLEditor.js.map
|