mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
chore(NA): splits types from code on @kbn/interpreter (#121576)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
cc3772c9e8
commit
8357217303
79 changed files with 115 additions and 86 deletions
|
@ -575,6 +575,7 @@
|
|||
"@types/kbn__field-types": "link:bazel-bin/packages/kbn-field-types/npm_module_types",
|
||||
"@types/kbn__i18n": "link:bazel-bin/packages/kbn-i18n/npm_module_types",
|
||||
"@types/kbn__i18n-react": "link:bazel-bin/packages/kbn-i18n-react/npm_module_types",
|
||||
"@types/kbn__interpreter": "link:bazel-bin/packages/kbn-interpreter/npm_module_types",
|
||||
"@types/kbn__mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl/npm_module_types",
|
||||
"@types/kbn__monaco": "link:bazel-bin/packages/kbn-monaco/npm_module_types",
|
||||
"@types/kbn__optimizer": "link:bazel-bin/packages/kbn-optimizer/npm_module_types",
|
||||
|
|
|
@ -93,6 +93,7 @@ filegroup(
|
|||
"//packages/kbn-field-types:build_types",
|
||||
"//packages/kbn-i18n:build_types",
|
||||
"//packages/kbn-i18n-react:build_types",
|
||||
"//packages/kbn-interpreter:build_types",
|
||||
"//packages/kbn-mapbox-gl:build_types",
|
||||
"//packages/kbn-monaco:build_types",
|
||||
"//packages/kbn-optimizer:build_types",
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
|
||||
load("@npm//@bazel/typescript:index.bzl", "ts_config")
|
||||
load("@npm//peggy:index.bzl", "peggy")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
|
||||
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")
|
||||
|
||||
PKG_BASE_NAME = "kbn-interpreter"
|
||||
PKG_REQUIRE_NAME = "@kbn/interpreter"
|
||||
TYPES_PKG_REQUIRE_NAME = "@types/kbn__interpreter"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
|
@ -22,7 +23,6 @@ filegroup(
|
|||
)
|
||||
|
||||
NPM_MODULE_EXTRA_FILES = [
|
||||
"common/package.json",
|
||||
"package.json",
|
||||
]
|
||||
|
||||
|
@ -31,6 +31,7 @@ RUNTIME_DEPS = [
|
|||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"@npm//tslib",
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/lodash",
|
||||
"@npm//@types/node",
|
||||
|
@ -84,7 +85,7 @@ ts_project(
|
|||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
srcs = NPM_MODULE_EXTRA_FILES + [":grammar"],
|
||||
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
|
||||
deps = RUNTIME_DEPS + [":target_node"],
|
||||
package_name = PKG_REQUIRE_NAME,
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
@ -103,3 +104,20 @@ filegroup(
|
|||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
pkg_npm_types(
|
||||
name = "npm_module_types",
|
||||
srcs = SRCS,
|
||||
deps = [":tsc_types"],
|
||||
package_name = TYPES_PKG_REQUIRE_NAME,
|
||||
tsconfig = ":tsconfig",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "build_types",
|
||||
srcs = [
|
||||
":npm_module_types",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"private": true,
|
||||
"main": "../target_node/common/index.js",
|
||||
"types": "../target_types/common/index.d.ts"
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "@kbn/interpreter",
|
||||
"private": "true",
|
||||
"main": "./target_node/index.js",
|
||||
"version": "1.0.0",
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0"
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0",
|
||||
"private": true
|
||||
}
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import { getType } from './get_type';
|
||||
|
||||
describe('ast fromExpression', () => {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { toExpression } from '@kbn/interpreter/common';
|
||||
import { toExpression } from '@kbn/interpreter';
|
||||
|
||||
describe('ast toExpression', () => {
|
||||
describe('single expression', () => {
|
||||
|
|
9
packages/kbn-interpreter/src/index.ts
Normal file
9
packages/kbn-interpreter/src/index.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
export * from './common';
|
|
@ -9,7 +9,7 @@
|
|||
import { ExpressionAstExpression, ExpressionAstArgument } from './types';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const { toExpression } = require('@kbn/interpreter/common');
|
||||
const { toExpression } = require('@kbn/interpreter');
|
||||
|
||||
export function format<T extends ExpressionAstExpression | ExpressionAstArgument>(
|
||||
ast: T,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import { ExpressionAstExpression, ExpressionAstArgument } from './types';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const { parse: parseRaw } = require('@kbn/interpreter/common');
|
||||
const { parse: parseRaw } = require('@kbn/interpreter');
|
||||
|
||||
export function parse<E extends string, S extends 'expression' | 'argument'>(
|
||||
expression: E,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import { uniq } from 'lodash';
|
||||
// @ts-expect-error untyped library
|
||||
import { parse } from '@kbn/interpreter/common';
|
||||
import { parse } from '@kbn/interpreter';
|
||||
import {
|
||||
ExpressionAstExpression,
|
||||
ExpressionAstFunction,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { getType } from '@kbn/interpreter/common';
|
||||
import { getType } from '@kbn/interpreter';
|
||||
import {
|
||||
ExpressionFunctionDefinition,
|
||||
Datatable,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { toExpression } from './embeddable';
|
||||
import { EmbeddableInput } from '../../../../types';
|
||||
import { decode } from '../../../../common/lib/embeddable_dataurl';
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
|
||||
describe('toExpression', () => {
|
||||
describe('by-reference embeddable input', () => {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { toExpression } from './lens';
|
||||
import { SavedLensInput } from '../../../functions/external/saved_lens';
|
||||
import { fromExpression, Ast } from '@kbn/interpreter/common';
|
||||
import { fromExpression, Ast } from '@kbn/interpreter';
|
||||
import { chartPluginMock } from 'src/plugins/charts/public/mocks';
|
||||
|
||||
const baseEmbeddableInput = {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { toExpression as toExpressionString } from '@kbn/interpreter/common';
|
||||
import { toExpression as toExpressionString } from '@kbn/interpreter';
|
||||
import { PaletteRegistry } from 'src/plugins/charts/public';
|
||||
import { SavedLensInput } from '../../../functions/external/saved_lens';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { toExpression } from './map';
|
||||
import { fromExpression, Ast } from '@kbn/interpreter/common';
|
||||
import { fromExpression, Ast } from '@kbn/interpreter';
|
||||
|
||||
const baseSavedMapInput = {
|
||||
id: 'elementId',
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { toExpression } from './visualization';
|
||||
import { fromExpression, Ast } from '@kbn/interpreter/common';
|
||||
import { fromExpression, Ast } from '@kbn/interpreter';
|
||||
|
||||
const baseInput = {
|
||||
id: 'elementId',
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { fromExpression, toExpression, Ast } from '@kbn/interpreter/common';
|
||||
import { fromExpression, toExpression, Ast } from '@kbn/interpreter';
|
||||
import { get } from 'lodash';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
|
|
@ -9,7 +9,7 @@ import { EuiSuperDatePicker, OnTimeChangeProps, EuiSuperDatePickerCommonRange }
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { get } from 'lodash';
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import { UnitStrings } from '../../../../../i18n/units';
|
||||
|
||||
const { quickRanges: strings } = UnitStrings;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import ReactDOM from 'react-dom';
|
||||
import React from 'react';
|
||||
import { toExpression } from '@kbn/interpreter/common';
|
||||
import { toExpression } from '@kbn/interpreter';
|
||||
import { UI_SETTINGS } from '../../../../../../../src/plugins/data/public';
|
||||
import { KibanaThemeProvider } from '../../../../../../../src/plugins/kibana_react/public';
|
||||
import { syncFilterExpression } from '../../../../public/lib/sync_filter_expression';
|
||||
|
|
|
@ -9,7 +9,7 @@ import React, { useState, useCallback, useEffect } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { EuiSelect, EuiFlexItem, EuiFlexGroup } from '@elastic/eui';
|
||||
import { sortBy } from 'lodash';
|
||||
import { getType } from '@kbn/interpreter/common';
|
||||
import { getType } from '@kbn/interpreter';
|
||||
import { templateFromReactComponent } from '../../../../public/lib/template_from_react_component';
|
||||
import { ArgumentStrings } from '../../../../i18n';
|
||||
import { SimpleMathFunction } from './simple_math_function';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { getType } from '@kbn/interpreter/common';
|
||||
import { getType } from '@kbn/interpreter';
|
||||
import { ExpressionAstArgument, ExpressionAstFunction } from 'src/plugins/expressions';
|
||||
import { identifyPalette, ColorPalette, identifyPartialPalette } from '../../../../common/lib';
|
||||
import { ArgumentStrings } from '../../../../i18n';
|
||||
|
|
|
@ -9,7 +9,7 @@ import React, { useState, useEffect } from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import { EuiTextArea, EuiButton, EuiButtonEmpty, EuiFormRow, EuiSpacer } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { fromExpression, toExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression, toExpression } from '@kbn/interpreter';
|
||||
|
||||
const strings = {
|
||||
getApplyButtonLabel: () =>
|
||||
|
|
|
@ -9,7 +9,7 @@ import { Dispatch } from 'redux';
|
|||
import { connect } from 'react-redux';
|
||||
import { set } from '@elastic/safer-lodash-set';
|
||||
|
||||
import { fromExpression, toExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression, toExpression } from '@kbn/interpreter';
|
||||
|
||||
// @ts-expect-error untyped local
|
||||
import { elementsRegistry } from '../../lib/elements_registry';
|
||||
|
|
|
@ -11,7 +11,7 @@ import { omitBy, isNil } from 'lodash';
|
|||
import Style from 'style-it';
|
||||
|
||||
import { ExpressionRenderer } from 'src/plugins/expressions';
|
||||
import { getType } from '@kbn/interpreter/common';
|
||||
import { getType } from '@kbn/interpreter';
|
||||
import { Loading } from '../loading';
|
||||
import { RenderWithFn } from '../render_with_fn';
|
||||
// @ts-expect-error Untyped local
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React, { FC, useState, useCallback, useMemo, useEffect } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import { useExpressionsService } from '../../services';
|
||||
import { getSelectedPage, getSelectedElement } from '../../state/selectors/workpad';
|
||||
// @ts-expect-error
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React, { useCallback } from 'react';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import deepEqual from 'react-fast-compare';
|
||||
import {
|
||||
ExpressionAstExpression,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { compose, withProps } from 'recompose';
|
||||
import { get } from 'lodash';
|
||||
import { toExpression } from '@kbn/interpreter/common';
|
||||
import { toExpression } from '@kbn/interpreter';
|
||||
import { interpretAst } from '../../lib/run_interpreter';
|
||||
import { modelRegistry, viewRegistry, transformRegistry } from '../../expression_types';
|
||||
import { FunctionFormList as Component } from './function_form_list';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { useEffect } from 'react';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import { CANVAS_APP } from '../../../../common/lib';
|
||||
import { decode, encode } from '../../../../common/lib/embeddable_dataurl';
|
||||
import { CanvasElement, CanvasPage } from '../../../../types';
|
||||
|
@ -60,7 +60,7 @@ export const useIncomingEmbeddable = (selectedPage: CanvasPage) => {
|
|||
const updatedInput = { ...originalInput, ...incomingInput };
|
||||
|
||||
const expression = `embeddable config="${encode(updatedInput)}"
|
||||
type="${type}"
|
||||
type="${type}"
|
||||
| render`;
|
||||
|
||||
dispatch(
|
||||
|
@ -77,7 +77,7 @@ export const useIncomingEmbeddable = (selectedPage: CanvasPage) => {
|
|||
dispatch(selectToplevelNodes([embeddableId]));
|
||||
} else {
|
||||
const expression = `embeddable config="${encode(incomingInput)}"
|
||||
type="${type}"
|
||||
type="${type}"
|
||||
| render`;
|
||||
dispatch(addElement(selectedPage.id, { expression }));
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import { shallowEqual, useSelector } from 'react-redux';
|
||||
import { State } from '../../../../types';
|
||||
import { getFiltersByGroups } from '../../../lib/filter';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import { merge } from 'lodash';
|
||||
import { createElement } from 'react';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
// @ts-expect-error unconverted components
|
||||
import { ArgForm } from '../components/arg_form';
|
||||
import { argTypeRegistry } from './arg_type_registry';
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { Registry } from '@kbn/interpreter/common';
|
||||
import { Registry } from '@kbn/interpreter';
|
||||
import { ArgType, ArgTypeProps } from './arg_type';
|
||||
|
||||
class ArgTypeRegistry extends Registry<ArgTypeProps, ArgType> {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import React, { useEffect, useRef, useCallback, ReactPortal, useState, memo } from 'react';
|
||||
import useEffectOnce from 'react-use/lib/useEffectOnce';
|
||||
import deepEqual from 'react-fast-compare';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { BaseForm, BaseFormProps } from './base_form';
|
||||
import { ExpressionFormHandlers } from '../../common/lib';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Registry } from '@kbn/interpreter/common';
|
||||
import { Registry } from '@kbn/interpreter';
|
||||
import { Datasource } from './datasource';
|
||||
import type { Datasource as DatasourceType, DatasourceProps } from './datasource';
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import React, { ReactElement } from 'react';
|
||||
import { EuiCallOut } from '@elastic/eui';
|
||||
import { isPlainObject, uniq, last, compact } from 'lodash';
|
||||
import { Ast, fromExpression } from '@kbn/interpreter/common';
|
||||
import { Ast, fromExpression } from '@kbn/interpreter';
|
||||
import { ArgAddPopover } from '../components/arg_add_popover';
|
||||
// @ts-expect-error unconverted components
|
||||
import { SidebarSection } from '../components/sidebar/sidebar_section';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Registry } from '@kbn/interpreter/common';
|
||||
import { Registry } from '@kbn/interpreter';
|
||||
import { Model } from './model';
|
||||
import type { ModelProps, Model as ModelType } from './model';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Registry } from '@kbn/interpreter/common';
|
||||
import { Registry } from '@kbn/interpreter';
|
||||
import { Transform } from './transform';
|
||||
import type { Transform as TransformType, TransformProps } from './transform';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Registry } from '@kbn/interpreter/common';
|
||||
import { Registry } from '@kbn/interpreter';
|
||||
import { View } from './view';
|
||||
import type { View as ViewType, ViewProps } from './view';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import { get } from 'lodash';
|
||||
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/public';
|
||||
import { interpretAst } from '../lib/run_interpreter';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { castProvider } from '@kbn/interpreter/common';
|
||||
import { castProvider } from '@kbn/interpreter';
|
||||
import { ExpressionFunctionDefinition } from 'src/plugins/expressions/public';
|
||||
import { getFunctionHelp, getFunctionErrors } from '../../i18n';
|
||||
import { InitializeArguments } from '.';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { includes } from 'lodash';
|
||||
import { getType } from '@kbn/interpreter/common';
|
||||
import { getType } from '@kbn/interpreter';
|
||||
|
||||
/*
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Registry } from '@kbn/interpreter/common';
|
||||
import { Registry } from '@kbn/interpreter';
|
||||
import { Element } from './element';
|
||||
|
||||
class ElementsRegistry extends Registry {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import { flowRight, get, groupBy } from 'lodash';
|
||||
import {
|
||||
Filter as FilterType,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ExpressionFunctionAST } from '@kbn/interpreter/common';
|
||||
import { ExpressionFunctionAST } from '@kbn/interpreter';
|
||||
import { adaptCanvasFilter } from './filter_adapters';
|
||||
|
||||
describe('adaptCanvasFilter', () => {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ExpressionFunctionAST } from '@kbn/interpreter/common';
|
||||
import { ExpressionFunctionAST } from '@kbn/interpreter';
|
||||
import { identity } from 'lodash';
|
||||
import { ExpressionAstArgument, Filter, FilterType } from '../../types';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { get, mapValues, map } from 'lodash';
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
|
||||
export function parseSingleFunctionChain(filterString) {
|
||||
const ast = fromExpression(filterString);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { fromExpression, getType } from '@kbn/interpreter/common';
|
||||
import { fromExpression, getType } from '@kbn/interpreter';
|
||||
import { pluck } from 'rxjs/operators';
|
||||
import { ExpressionValue, ExpressionAstExpression } from 'src/plugins/expressions/public';
|
||||
import { pluginServices } from '../services';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import immutable from 'object-path-immutable';
|
||||
import { get } from 'lodash';
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Registry } from '@kbn/interpreter/common';
|
||||
import { Registry } from '@kbn/interpreter';
|
||||
import { Tag, TagSpec } from './tag';
|
||||
|
||||
class TagRegistry extends Registry<TagSpec, Tag> {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Registry } from '@kbn/interpreter/common';
|
||||
import { Registry } from '@kbn/interpreter';
|
||||
import { Template } from './template';
|
||||
|
||||
class TemplateRegistry extends Registry {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Registry } from '@kbn/interpreter/common';
|
||||
import { Registry } from '@kbn/interpreter';
|
||||
import { Transition } from '../transitions/transition';
|
||||
|
||||
class TransitionsRegistry extends Registry {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { addRegistries, register } from '@kbn/interpreter/common';
|
||||
import { addRegistries, register } from '@kbn/interpreter';
|
||||
// @ts-expect-error untyped local
|
||||
import { elementsRegistry } from './lib/elements_registry';
|
||||
// @ts-expect-error untyped local
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { createAction } from 'redux-actions';
|
||||
import immutable from 'object-path-immutable';
|
||||
import { get, pick, cloneDeep, without } from 'lodash';
|
||||
import { toExpression, safeElementFromExpression } from '@kbn/interpreter/common';
|
||||
import { toExpression, safeElementFromExpression } from '@kbn/interpreter';
|
||||
import { createThunk } from '../../lib/create_thunk';
|
||||
import {
|
||||
getPages,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { fromExpression, toExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression, toExpression } from '@kbn/interpreter';
|
||||
import { handleActions } from 'redux-actions';
|
||||
import { State } from '../../../types';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { get, omit } from 'lodash';
|
||||
import { safeElementFromExpression, fromExpression } from '@kbn/interpreter/common';
|
||||
import { safeElementFromExpression, fromExpression } from '@kbn/interpreter';
|
||||
import { CanvasRenderedWorkpad } from '../../../shareable_runtime/types';
|
||||
import { append } from '../../lib/modify_path';
|
||||
import { getAssets } from './assets';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { fromExpression, toExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression, toExpression } from '@kbn/interpreter';
|
||||
import { PersistableStateService } from '../../../../../src/plugins/kibana_utils/common';
|
||||
import { SavedObjectReference } from '../../../../../src/core/server';
|
||||
import { WorkpadAttributes } from '../routes/workpad/workpad_attributes';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import sinon from 'sinon';
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import { createWorkpadRouteContext } from './workpad_route_context';
|
||||
import { RequestHandlerContext, SavedObjectReference } from 'src/core/server';
|
||||
import { savedObjectsClientMock } from 'src/core/server/mocks';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { buildExpression } from '../../../../../src/plugins/expressions/public';
|
||||
import { createMockDatasource, createMockFramePublicAPI, DatasourceMock } from '../mocks';
|
||||
import { DatatableVisualizationState, getDatatableVisualization } from './visualization';
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { I18nProvider } from '@kbn/i18n-react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import type { PaletteRegistry } from 'src/plugins/charts/public';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
|
||||
export function buildExpression(): Ast {
|
||||
return {
|
||||
|
|
|
@ -32,7 +32,7 @@ import { EditorFrame, EditorFrameProps } from './editor_frame';
|
|||
import { DatasourcePublicAPI, DatasourceSuggestion, Visualization } from '../../types';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { coreMock } from 'src/core/public/mocks';
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import {
|
||||
createMockVisualization,
|
||||
createMockDatasource,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Ast, fromExpression, ExpressionFunctionAST } from '@kbn/interpreter/common';
|
||||
import { Ast, fromExpression, ExpressionFunctionAST } from '@kbn/interpreter';
|
||||
import { DatasourceStates } from '../../state_management';
|
||||
import { Visualization, DatasourcePublicAPI, DatasourceMap } from '../../types';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { SavedObjectReference } from 'kibana/public';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import memoizeOne from 'memoize-one';
|
||||
import {
|
||||
Datasource,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { IconType } from '@elastic/eui/src/components/icon/icon';
|
||||
import { Datatable } from 'src/plugins/expressions';
|
||||
import { PaletteOutput } from 'src/plugins/charts/public';
|
||||
|
|
|
@ -21,7 +21,7 @@ import {
|
|||
EuiAccordion,
|
||||
} from '@elastic/eui';
|
||||
import { IconType } from '@elastic/eui/src/components/icon/icon';
|
||||
import { Ast, toExpression } from '@kbn/interpreter/common';
|
||||
import { Ast, toExpression } from '@kbn/interpreter';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import classNames from 'classnames';
|
||||
import { ExecutionContextSearch } from 'src/plugins/data/public';
|
||||
|
|
|
@ -26,7 +26,7 @@ jest.mock('../../../debounced_component', () => {
|
|||
import { WorkspacePanel } from './workspace_panel';
|
||||
import { ReactWrapper } from 'enzyme';
|
||||
import { DragDrop, ChildDragDropProvider } from '../../../drag_drop';
|
||||
import { fromExpression } from '@kbn/interpreter/common';
|
||||
import { fromExpression } from '@kbn/interpreter';
|
||||
import { coreMock } from 'src/core/public/mocks';
|
||||
import { esFilters, IndexPattern } from '../../../../../../../src/plugins/data/public';
|
||||
import type { FieldSpec } from '../../../../../../../src/plugins/data/common';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import React, { useState, useEffect, useMemo, useContext, useCallback } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { toExpression } from '@kbn/interpreter/common';
|
||||
import { toExpression } from '@kbn/interpreter';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import {
|
||||
EuiEmptyPrompt,
|
||||
|
|
|
@ -21,7 +21,7 @@ import type { PaletteOutput } from 'src/plugins/charts/public';
|
|||
import type { Start as InspectorStart } from 'src/plugins/inspector/public';
|
||||
|
||||
import { Subscription } from 'rxjs';
|
||||
import { toExpression, Ast } from '@kbn/interpreter/common';
|
||||
import { toExpression, Ast } from '@kbn/interpreter';
|
||||
import { RenderMode } from 'src/plugins/expressions';
|
||||
import { map, distinctUntilChanged, skip } from 'rxjs/operators';
|
||||
import fastIsEqual from 'fast-deep-equal';
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import type { Capabilities, HttpSetup, ThemeServiceStart } from 'kibana/public';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { RecursiveReadonly } from '@kbn/utility-types';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { UsageCollectionSetup } from 'src/plugins/usage_collection/public';
|
||||
import { IndexPatternsContract, TimefilterContract } from '../../../../../src/plugins/data/public';
|
||||
import { ReactExpressionRendererType } from '../../../../../src/plugins/expressions/public';
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from 'react';
|
|||
import { render } from 'react-dom';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FormattedMessage, I18nProvider } from '@kbn/i18n-react';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { Position } from '@elastic/charts';
|
||||
import { ThemeServiceStart } from 'kibana/public';
|
||||
import { KibanaThemeProvider } from '../../../../../src/plugins/kibana_react/public';
|
||||
|
|
|
@ -12,7 +12,7 @@ import { DatasourcePublicAPI, Operation, Datasource, FramePublicAPI } from '../t
|
|||
import { coreMock } from 'src/core/public/mocks';
|
||||
import { IndexPatternPersistedState, IndexPatternPrivateState } from './types';
|
||||
import { dataPluginMock } from '../../../../../src/plugins/data/public/mocks';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { chartPluginMock } from '../../../../../src/plugins/charts/public/mocks';
|
||||
import { getFieldByNameFactory } from './pure_helpers';
|
||||
import {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import type { ExpressionFunctionAST } from '@kbn/interpreter/common';
|
||||
import type { ExpressionFunctionAST } from '@kbn/interpreter';
|
||||
import memoizeOne from 'memoize-one';
|
||||
import { LayerType, layerTypes } from '../../../../../common';
|
||||
import type { TimeScaleUnit } from '../../../../../common/expressions';
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from 'react';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { I18nProvider } from '@kbn/i18n-react';
|
||||
import { render } from 'react-dom';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { ThemeServiceStart } from 'kibana/public';
|
||||
import { KibanaThemeProvider } from '../../../../../src/plugins/kibana_react/public';
|
||||
import { ColorMode } from '../../../../../src/plugins/charts/common';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { Ast } from '@kbn/interpreter/common';
|
||||
import type { Ast } from '@kbn/interpreter';
|
||||
import type { PaletteRegistry } from 'src/plugins/charts/public';
|
||||
import type { Operation, DatasourcePublicAPI } from '../types';
|
||||
import { DEFAULT_PERCENT_DECIMALS, EMPTY_SIZE_RATIOS } from './constants';
|
||||
|
|
|
@ -9,7 +9,7 @@ import React from 'react';
|
|||
import { render } from 'react-dom';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { FormattedMessage, I18nProvider } from '@kbn/i18n-react';
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { DatatableRow } from 'src/plugins/expressions';
|
||||
import type { GaugeArguments } from '../../../../../../src/plugins/chart_expressions/expression_gauge/common';
|
||||
import {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { Position } from '@elastic/charts';
|
||||
import { chartPluginMock } from '../../../../../src/plugins/charts/public/mocks';
|
||||
import { getXyVisualization } from './xy_visualization';
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { Ast } from '@kbn/interpreter/common';
|
||||
import { Ast } from '@kbn/interpreter';
|
||||
import { ScaleType } from '@elastic/charts';
|
||||
import { PaletteRegistry } from 'src/plugins/charts/public';
|
||||
import { State } from './types';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { fromExpression, toExpression, Ast, ExpressionFunctionAST } from '@kbn/interpreter/common';
|
||||
import { fromExpression, toExpression, Ast, ExpressionFunctionAST } from '@kbn/interpreter';
|
||||
import {
|
||||
SavedObjectMigrationMap,
|
||||
SavedObjectMigrationFn,
|
||||
|
|
|
@ -5864,6 +5864,10 @@
|
|||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@types/kbn__interpreter@link:bazel-bin/packages/kbn-interpreter/npm_module_types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
||||
"@types/kbn__mapbox-gl@link:bazel-bin/packages/kbn-mapbox-gl/npm_module_types":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue