@spectric/ui 0.0.23 → 0.0.24

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.
@@ -62,6 +62,7 @@ export declare const toLabelValue: (value: LabelValueOrString) => {
62
62
  label: string;
63
63
  value: string;
64
64
  };
65
+ export declare const GeospatialOperators: Record<string, LabelValue>;
65
66
  /**
66
67
  * The Query component will take Opensearch Dashboard Query language and transform it into various outputs
67
68
  */
@@ -69,6 +70,7 @@ export declare class SpectricQuery extends LitElement implements IQueryProps {
69
70
  private uuid;
70
71
  placeholder: string;
71
72
  valueHelper: any;
73
+ highlightedSyntax: any;
72
74
  constructor();
73
75
  protected createRenderRoot(): HTMLElement | DocumentFragment;
74
76
  /**
@@ -1,7 +1,8 @@
1
1
  export { DQLSyntaxError } from './kuery_syntax_error';
2
2
  export { nodeTypes } from './node_types';
3
3
  export * from './ast';
4
- export { fromKueryExpression as parse, toOpenSearchQuery as toDSL } from './ast';
4
+ export { fromKueryExpression as parse, toOpenSearchQuery as toDSL, } from './ast';
5
5
  export { toCql } from '../outputTypes/toCQL';
6
6
  export { toMongo } from '../outputTypes/toMongo';
7
+ export { toHTML } from '../outputTypes/toHTML';
7
8
  export * from './types';
@@ -0,0 +1,15 @@
1
+ import { FieldTypes, KueryNode } from '../..';
2
+ export declare const KQL_WILDCARD_SYMBOL = "@kuery-wildcard@";
3
+ export declare const KQL_NODE_TYPE_WILDCARD = "wildcard";
4
+ export type FunctionName = "is" | "and" | "or" | "not" | "range" | "exists" | "nested";
5
+ export declare const functions: {
6
+ is: (node: KueryNode, fields?: FieldTypes[]) => string;
7
+ and: (node: KueryNode, fields?: FieldTypes[]) => string;
8
+ or: (node: KueryNode, fields?: FieldTypes[]) => string;
9
+ not: (node: KueryNode, fields?: FieldTypes[]) => string;
10
+ range: (node: KueryNode) => string;
11
+ exists: (node: KueryNode) => string;
12
+ nested: (node: KueryNode) => string;
13
+ geospatial: (node: KueryNode) => string;
14
+ };
15
+ export declare const toHTML: (node: KueryNode, fields?: FieldTypes[]) => string;
@@ -1960,7 +1960,7 @@
1960
1960
  },
1961
1961
  {
1962
1962
  "name": "spectric-query",
1963
- "description": "The Query component will take Opensearch Dashboard Query language and transform it into various outputs\n\nEvents:\n\n * `change` {`CustomEvent<any>`} - \n\nAttributes:\n\n * `outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\"`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\n * `placeholder` {`string`} - Input placeholder\n\nProperties:\n\n * `valueHelper` - \n\n * `_value` {`string`} - The internal value.\n\n * `suggestion` {`Suggestion | undefined`} - \n\n * `completions` {`Completion[]`} - \n\n * `completionIndex` {`number`} - \n\n * `_autocomplete` {`PopoverElement | undefined`} - \n\n * `_valueHelper` {`PopoverElement | undefined`} - \n\n * `_asyncAutocomplete` {`Promise<HTMLDivElement>`} - \n\n * `_input` {`SpectricInput`} - The underlying input element\n\n * `_checkClickLocation` - \n\n * `_setValue` - \n\n * `_showValueHelper` - Value helper is a popover above the query bar that will help users set/change/clear the value if it is complex (like date time or geoshape)\n\n * `_getSuggestion` - \n\n * `_parseQuery` - \n\n * `_selectCompletion` - \n\n * `_handleArrows` - \n\n * `uuid` {`string`} - \n\n * `outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\"`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\n * `getValuesForField` - Callback that will provide values for specific fields\n\n * `placeholder` {`string`} - Input placeholder",
1963
+ "description": "The Query component will take Opensearch Dashboard Query language and transform it into various outputs\n\nEvents:\n\n * `change` {`CustomEvent<any>`} - \n\nAttributes:\n\n * `outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\"`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\n * `placeholder` {`string`} - Input placeholder\n\nProperties:\n\n * `valueHelper` - \n\n * `highlightedSyntax` - \n\n * `_value` {`string`} - The internal value.\n\n * `suggestion` {`Suggestion | undefined`} - \n\n * `completions` {`Completion[]`} - \n\n * `completionIndex` {`number`} - \n\n * `_autocomplete` {`PopoverElement | undefined`} - \n\n * `_valueHelper` {`PopoverElement | undefined`} - \n\n * `_asyncAutocomplete` {`Promise<HTMLDivElement>`} - \n\n * `_input` {`SpectricInput`} - The underlying input element\n\n * `_checkClickLocation` - \n\n * `_setValue` - \n\n * `_showValueHelper` - Value helper is a popover above the query bar that will help users set/change/clear the value if it is complex (like date time or geoshape)\n\n * `_getSuggestion` - \n\n * `_parseQuery` - \n\n * `_selectCompletion` - \n\n * `_handleArrows` - \n\n * `uuid` {`string`} - \n\n * `outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\"`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\n * `getValuesForField` - Callback that will provide values for specific fields\n\n * `placeholder` {`string`} - Input placeholder",
1964
1964
  "attributes": [
1965
1965
  {
1966
1966
  "name": "outputLanguage",
@@ -2257,7 +2257,7 @@
2257
2257
  },
2258
2258
  {
2259
2259
  "name": "spectric-storybook-example-content",
2260
- "description": "Attributes:\n\n * `frameWidth` {`number`} - \n\nProperties:\n\n * `frameWidth` {`number`} - \n\n * `query` {`SpectricQuery`} - \n\n * `dataSorter` - \n\n * `dialogOpen` {`boolean`} - \n\n * `tableData` {`TestData[]`} - \n\n * `columns` - \n\n * `pagination` {`PaginationProps`} - \n\n * `_handleFilter` - \n\n * `_handlePaginationChange` - ",
2260
+ "description": "Attributes:\n\n * `frameWidth` {`number`} - \n\nProperties:\n\n * `frameWidth` {`number`} - \n\n * `query` {`SpectricQuery`} - \n\n * `dataSorter` - \n\n * `dialogOpen` {`boolean`} - \n\n * `tableData` {`TestData[]`} - \n\n * `columns` {`ColumnSettings<TestData>[]`} - \n\n * `pagination` {`PaginationProps`} - \n\n * `_handleFilter` - \n\n * `_handlePaginationChange` - ",
2261
2261
  "attributes": [
2262
2262
  {
2263
2263
  "name": "frameWidth",
package/dist/index.d.ts CHANGED
@@ -23,6 +23,10 @@ declare const module: {
23
23
  label: string;
24
24
  value: string;
25
25
  };
26
+ GeospatialOperators: Record<string, {
27
+ label?: string;
28
+ value: string;
29
+ }>;
26
30
  SpectricQuery: typeof components.SpectricQuery;
27
31
  nodeTypes: import('./components/query_bar/querylanguage/kuery').NodeTypes;
28
32
  SpectricPanel: typeof components.SpectricPanel;