chore(NA): removes server imports from canvas src plugin (#62783)
* chore(NA): remove server imports from canvas src plugin * chore(NA): correctly import types for demodata
This commit is contained in:
parent
eacdbcd4f5
commit
7e3c68bb7a
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
export enum DemoRows {
|
||||
CI = 'ci',
|
||||
SHIRTS = 'shirts',
|
||||
}
|
|
@ -6,14 +6,10 @@
|
|||
|
||||
import { cloneDeep } from 'lodash';
|
||||
import ci from './ci.json';
|
||||
import { DemoRows } from './demo_rows_types';
|
||||
import shirts from './shirts.json';
|
||||
import { getFunctionErrors } from '../../../../i18n';
|
||||
|
||||
export enum DemoRows {
|
||||
CI = 'ci',
|
||||
SHIRTS = 'shirts',
|
||||
}
|
||||
|
||||
export function getDemoRows(arg: string | null) {
|
||||
if (arg === DemoRows.CI) {
|
||||
return cloneDeep(ci);
|
||||
|
|
|
@ -8,7 +8,8 @@ import { sortBy } from 'lodash';
|
|||
import { ExpressionFunctionDefinition } from 'src/plugins/expressions';
|
||||
// @ts-ignore unconverted lib file
|
||||
import { queryDatatable } from '../../../../common/lib/datatable/query';
|
||||
import { DemoRows, getDemoRows } from './get_demo_rows';
|
||||
import { DemoRows } from './demo_rows_types';
|
||||
import { getDemoRows } from './get_demo_rows';
|
||||
import { Filter, Datatable, DatatableColumn, DatatableRow } from '../../../../types';
|
||||
import { getFunctionHelp } from '../../../../i18n';
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n';
|
|||
import { demodata } from '../../../canvas_plugin_src/functions/server/demodata';
|
||||
import { FunctionHelp } from '../function_help';
|
||||
import { FunctionFactory } from '../../../types';
|
||||
import { DemoRows } from '../../../canvas_plugin_src/functions/server/demodata/get_demo_rows';
|
||||
import { DemoRows } from '../../../canvas_plugin_src/functions/server/demodata/demo_rows_types';
|
||||
|
||||
export const help: FunctionHelp<FunctionFactory<typeof demodata>> = {
|
||||
help: i18n.translate('xpack.canvas.functions.demodataHelpText', {
|
||||
|
|
Loading…
Reference in a new issue