@spectric/ui 0.0.20 → 0.0.22
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/components/Banner.d.ts +1 -1
- package/dist/components/dialog/dialog.d.ts +2 -1
- package/dist/components/pagination/pagination.d.ts +1 -1
- package/dist/components/query_bar/QueryBar.d.ts +31 -11
- package/dist/components/query_bar/dateTimePopup.d.ts +2 -0
- package/dist/components/query_bar/geojsonPopup.d.ts +2 -0
- package/dist/components/query_bar/querylanguage/kuery/functions/geospatial.d.ts +19 -0
- package/dist/components/query_bar/querylanguage/outputTypes/toCQL.d.ts +2 -1
- package/dist/components/query_bar/querylanguage/outputTypes/toMongo.d.ts +6 -1
- package/dist/components/symbols.d.ts +6 -0
- package/dist/components/table/cell.d.ts +2 -2
- package/dist/components/table/header.d.ts +2 -1
- package/dist/components/table/table.d.ts +14 -7
- package/dist/custom-elements.json +8 -8
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +4556 -2834
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +424 -248
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +6 -1
- package/src/components/Banner.ts +46 -31
- package/src/components/dialog/dialog.css.ts +29 -29
- package/src/components/dialog/dialog.ts +165 -135
- package/src/components/input.ts +49 -39
- package/src/components/pagination/pagination.ts +167 -113
- package/src/components/query_bar/QueryBar.ts +441 -185
- package/src/components/query_bar/dateTimePopup.ts +54 -0
- package/src/components/query_bar/geojsonPopup.ts +44 -0
- package/src/components/query_bar/querylanguage/kuery/ast/_generated_/kuery.js +1836 -2745
- package/src/components/query_bar/querylanguage/kuery/ast/ast.ts +15 -13
- package/src/components/query_bar/querylanguage/kuery/ast/kuery.peg +92 -126
- package/src/components/query_bar/querylanguage/kuery/functions/geospatial.ts +25 -0
- package/src/components/query_bar/querylanguage/kuery/functions/index.ts +9 -7
- package/src/components/query_bar/querylanguage/outputTypes/toCQL.ts +56 -34
- package/src/components/query_bar/querylanguage/outputTypes/toMongo.ts +46 -34
- package/src/components/symbols.ts +6 -0
- package/src/components/table/__tests__/table.spec.ts +143 -55
- package/src/components/table/cell.ts +188 -145
- package/src/components/table/header.ts +163 -152
- package/src/components/table/table.css +4 -2
- package/src/components/table/table.ts +415 -262
- package/src/components/table/virtualBody.ts +170 -115
- package/src/components/tooltip/popover.ts +263 -225
- package/src/stories/Dialog.stories.ts +59 -0
- package/src/stories/QueryBar.stories.ts +46 -37
- package/src/stories/fixtures/data.ts +195 -36
- package/src/stories/table.stories.ts +70 -22
|
@@ -24,7 +24,7 @@ export declare class SpectricBanner extends LitElement implements BannerProps {
|
|
|
24
24
|
protected render(): unknown;
|
|
25
25
|
}
|
|
26
26
|
export interface BannerEventMap {
|
|
27
|
-
|
|
27
|
+
bannerDismissed: (event: CustomEvent<BannerProps>) => void;
|
|
28
28
|
}
|
|
29
29
|
declare global {
|
|
30
30
|
interface HTMLElementTagNameMap {
|
|
@@ -13,6 +13,7 @@ interface DialogProps {
|
|
|
13
13
|
/**
|
|
14
14
|
* Dialog Element
|
|
15
15
|
* @slot title - sets the title of the dialog attribute/property can also be use for setting the title to a string
|
|
16
|
+
* @slot footer - Space at the bottom of the dialog that you can put buttons or other tools
|
|
16
17
|
*/
|
|
17
18
|
export declare class DialogElement extends LitElement implements DialogProps {
|
|
18
19
|
static styles: CSSResultGroup;
|
|
@@ -33,7 +34,7 @@ export declare class DialogElement extends LitElement implements DialogProps {
|
|
|
33
34
|
protected render(): unknown;
|
|
34
35
|
}
|
|
35
36
|
interface DialogEvents {
|
|
36
|
-
|
|
37
|
+
close: (event: CustomEvent) => void;
|
|
37
38
|
}
|
|
38
39
|
declare global {
|
|
39
40
|
interface HTMLElementTagNameMap {
|
|
@@ -34,7 +34,7 @@ export declare class PaginationElement extends LitElement implements PaginationP
|
|
|
34
34
|
protected render(): unknown;
|
|
35
35
|
}
|
|
36
36
|
interface PaginationEvents {
|
|
37
|
-
|
|
37
|
+
change: (event: CustomEvent<PaginationChangeProps>) => void;
|
|
38
38
|
}
|
|
39
39
|
declare global {
|
|
40
40
|
interface HTMLElementTagNameMap {
|
|
@@ -6,17 +6,17 @@ import { PopoverElement } from '../tooltip/popover';
|
|
|
6
6
|
import * as kuery from "./querylanguage/kuery";
|
|
7
7
|
export type FieldTypes = {
|
|
8
8
|
name: string;
|
|
9
|
-
type: "string" | "number" | "boolean";
|
|
10
|
-
format?: "date-time";
|
|
9
|
+
type: "string" | "number" | "boolean" | "integer" | "object";
|
|
10
|
+
format?: "date-time" | "geojson";
|
|
11
11
|
};
|
|
12
|
-
type SuggestionType =
|
|
12
|
+
type SuggestionType = "conjunction" | "field" | "operator" | "value" | "geo_value";
|
|
13
13
|
type Suggestion = {
|
|
14
14
|
fieldName: string;
|
|
15
15
|
end: number;
|
|
16
16
|
prefix: string;
|
|
17
17
|
start: number;
|
|
18
18
|
suffix: string;
|
|
19
|
-
suggestionTypes:
|
|
19
|
+
suggestionTypes: SuggestionType[];
|
|
20
20
|
text: string;
|
|
21
21
|
type: "cursor";
|
|
22
22
|
};
|
|
@@ -28,7 +28,7 @@ export declare enum SupportedLanguages {
|
|
|
28
28
|
}
|
|
29
29
|
type SupportedLanguagesTypes = `${SupportedLanguages}`;
|
|
30
30
|
interface QueryEventMap {
|
|
31
|
-
|
|
31
|
+
change: (event: CustomEvent<string | kuery.KueryNode | JsonObject>) => void;
|
|
32
32
|
}
|
|
33
33
|
export interface IQueryProps {
|
|
34
34
|
/**
|
|
@@ -46,23 +46,34 @@ export interface IQueryProps {
|
|
|
46
46
|
/**
|
|
47
47
|
* Callback that will provide values for specific fields
|
|
48
48
|
*/
|
|
49
|
-
getValuesForField?: (field: string, text: string) => Promise<
|
|
49
|
+
getValuesForField?: (field: string, text: string) => Promise<LabelValuesOrStrings>;
|
|
50
50
|
/**
|
|
51
51
|
* Input placeholder
|
|
52
52
|
*/
|
|
53
53
|
placeholder?: string;
|
|
54
54
|
}
|
|
55
|
+
type LabelValue = {
|
|
56
|
+
label?: string;
|
|
57
|
+
value: string;
|
|
58
|
+
};
|
|
59
|
+
export type LabelValueOrString = LabelValue | string;
|
|
60
|
+
export type LabelValuesOrStrings = (LabelValue | string)[];
|
|
61
|
+
export declare const toLabelValue: (value: LabelValueOrString) => {
|
|
62
|
+
label: string;
|
|
63
|
+
value: string;
|
|
64
|
+
};
|
|
55
65
|
/**
|
|
56
66
|
* The Query component will take Opensearch Dashboard Query language and transform it into various outputs
|
|
57
67
|
*/
|
|
58
68
|
export declare class SpectricQuery extends LitElement implements IQueryProps {
|
|
59
69
|
private uuid;
|
|
60
70
|
placeholder: string;
|
|
71
|
+
valueHelper: any;
|
|
61
72
|
constructor();
|
|
62
73
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
63
74
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
75
|
+
* The internal value.
|
|
76
|
+
*/
|
|
66
77
|
protected _value: string;
|
|
67
78
|
private suggestion?;
|
|
68
79
|
/**
|
|
@@ -74,13 +85,22 @@ export declare class SpectricQuery extends LitElement implements IQueryProps {
|
|
|
74
85
|
private completionIndex;
|
|
75
86
|
fields: FieldTypes[];
|
|
76
87
|
_autocomplete?: PopoverElement;
|
|
88
|
+
_valueHelper?: PopoverElement;
|
|
77
89
|
_asyncAutocomplete: Promise<HTMLDivElement>;
|
|
78
90
|
/**
|
|
79
|
-
|
|
80
|
-
|
|
91
|
+
* The underlying input element
|
|
92
|
+
*/
|
|
81
93
|
protected _input: SpectricInput;
|
|
94
|
+
_checkClickLocation: (e: MouseEvent) => Promise<void>;
|
|
95
|
+
_setValue: (value: string | undefined, suggestion: Suggestion) => void;
|
|
96
|
+
/**
|
|
97
|
+
* 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)
|
|
98
|
+
* @param suggestion
|
|
99
|
+
*/
|
|
100
|
+
_showValueHelper: (suggestion: Suggestion) => Promise<void>;
|
|
101
|
+
_getSuggestion: () => Suggestion;
|
|
82
102
|
_parseQuery: (e?: InputEvent | undefined) => void;
|
|
83
|
-
getValuesForField: (field: string, text: string) => Promise<
|
|
103
|
+
getValuesForField: (field: string, text: string) => Promise<LabelValuesOrStrings>;
|
|
84
104
|
autoComplete(suggestion: Suggestion): Promise<void>;
|
|
85
105
|
protected updated(changed: PropertyValues): void;
|
|
86
106
|
_selectCompletion: () => Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { KueryNode } from '../types';
|
|
2
|
+
export declare function toOpenSearchQuery(node: KueryNode): {
|
|
3
|
+
bool: {
|
|
4
|
+
must: ({
|
|
5
|
+
exists: {
|
|
6
|
+
field: any;
|
|
7
|
+
};
|
|
8
|
+
geo_shape?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
geo_shape: {
|
|
11
|
+
[x: number]: {
|
|
12
|
+
relation: any;
|
|
13
|
+
shape: import('geojson').GeoJSON;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
exists?: undefined;
|
|
17
|
+
})[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FieldTypes, KueryNode } from '../..';
|
|
2
2
|
export declare const KQL_WILDCARD_SYMBOL = "@kuery-wildcard@";
|
|
3
3
|
export declare const KQL_NODE_TYPE_WILDCARD = "wildcard";
|
|
4
|
-
export type FunctionName =
|
|
4
|
+
export type FunctionName = "is" | "and" | "or" | "not" | "range" | "exists" | "nested";
|
|
5
5
|
export declare const functions: {
|
|
6
6
|
is: (node: KueryNode, fields?: FieldTypes[]) => string;
|
|
7
7
|
and: (node: KueryNode, fields?: FieldTypes[]) => string;
|
|
@@ -10,5 +10,6 @@ export declare const functions: {
|
|
|
10
10
|
range: (node: KueryNode) => string;
|
|
11
11
|
exists: (node: KueryNode) => string;
|
|
12
12
|
nested: (node: KueryNode) => string;
|
|
13
|
+
geospatial: (node: KueryNode) => string;
|
|
13
14
|
};
|
|
14
15
|
export declare const toCql: (node: KueryNode, fields?: FieldTypes[]) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FieldTypes, KueryNode } from '../..';
|
|
2
2
|
export declare const KQL_WILDCARD_SYMBOL = "@kuery-wildcard@";
|
|
3
3
|
export declare const KQL_NODE_TYPE_WILDCARD = "wildcard";
|
|
4
|
-
export type FunctionName =
|
|
4
|
+
export type FunctionName = "is" | "and" | "or" | "not" | "range" | "exists" | "nested";
|
|
5
5
|
export declare const functions: {
|
|
6
6
|
is: (node: KueryNode) => any;
|
|
7
7
|
and: (node: KueryNode) => any;
|
|
@@ -16,5 +16,10 @@ export declare const functions: {
|
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
nested: (node: KueryNode) => string;
|
|
19
|
+
geospatial: (node: KueryNode) => {
|
|
20
|
+
[x: number]: {
|
|
21
|
+
$geoWithin: import('geojson').GeoJSON;
|
|
22
|
+
};
|
|
23
|
+
} | undefined;
|
|
19
24
|
};
|
|
20
25
|
export declare const toMongo: (node: KueryNode, fields?: FieldTypes[]) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const EDIT = "\uD83D\uDD89";
|
|
2
|
+
export declare const DELETE = "\uD83D\uDDD1";
|
|
3
|
+
export declare const ARROW_LEFT = "\uD83E\uDC08";
|
|
4
|
+
export declare const ARROW_RIGHT = "\uD83E\uDC0A";
|
|
5
|
+
export declare const ARROW_UP = "\uD83E\uDC09";
|
|
6
|
+
export declare const ARROW_DOWN = "\uD83E\uDC0B";
|
|
@@ -30,12 +30,12 @@ export declare class TableCellElement<T> extends LitElement implements CellProps
|
|
|
30
30
|
_emitFilter(filter: FilterEvent<T>): void;
|
|
31
31
|
_handleFilterOut: () => void;
|
|
32
32
|
_handleFilterFor: () => void;
|
|
33
|
-
|
|
33
|
+
_displayOverflowTooltip: () => void;
|
|
34
34
|
getRenderedValue(): any;
|
|
35
35
|
protected render(): unknown;
|
|
36
36
|
}
|
|
37
37
|
interface TableBodyEvents {
|
|
38
|
-
|
|
38
|
+
filter: (event: CustomEvent<ColumnSettings<any>>) => void;
|
|
39
39
|
}
|
|
40
40
|
declare global {
|
|
41
41
|
interface HTMLElementTagNameMap {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLElementTagWithEvents, ReactElementWithPropsAndEvents } from '../types';
|
|
2
|
-
import { ColumnSettings } from './table';
|
|
2
|
+
import { ColumnSettings, SpectricTableElement } from './table';
|
|
3
3
|
import { DisposableElement } from '../../classes';
|
|
4
4
|
export declare const TableHeaderElementTag = "spectric-table-header";
|
|
5
5
|
interface HeaderProps<T> {
|
|
@@ -11,6 +11,7 @@ interface HeaderProps<T> {
|
|
|
11
11
|
export declare class TableHeaderElement<T> extends DisposableElement implements HeaderProps<T> {
|
|
12
12
|
columns: ColumnSettings<T>[];
|
|
13
13
|
private _resizeStart?;
|
|
14
|
+
table: SpectricTableElement<T>;
|
|
14
15
|
constructor();
|
|
15
16
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
16
17
|
_handleSortChange: (column: ColumnSettings<T>) => void;
|
|
@@ -4,7 +4,7 @@ import { PaginationChangeProps, PaginationProps } from '../pagination';
|
|
|
4
4
|
import { FilterEvent } from './cell';
|
|
5
5
|
export declare const TableElementTag = "spectric-table";
|
|
6
6
|
export type { TableProps, TableEvents };
|
|
7
|
-
export type DomRenderable = HTMLElement | TemplateResult | string | number | null;
|
|
7
|
+
export type DomRenderable = HTMLElement | TemplateResult | string | number | null | undefined;
|
|
8
8
|
export declare enum TableSelectOptions {
|
|
9
9
|
multi = "multi",
|
|
10
10
|
single = "single",
|
|
@@ -33,7 +33,8 @@ export type ColumnSettings<T> = {
|
|
|
33
33
|
sortable?: boolean;
|
|
34
34
|
sortDirection?: TableSortDirectionTypes;
|
|
35
35
|
filterable?: boolean;
|
|
36
|
-
|
|
36
|
+
disableCellOverflowTooltip?: boolean;
|
|
37
|
+
title?: DomRenderable | ((table: SpectricTableElement<T>) => DomRenderable);
|
|
37
38
|
/**
|
|
38
39
|
* Key to used for getting data from an object for a cell
|
|
39
40
|
*/
|
|
@@ -92,18 +93,24 @@ export declare class SpectricTableElement<T = any> extends LitElement implements
|
|
|
92
93
|
private __DO_NOT_USE_filter;
|
|
93
94
|
private selected;
|
|
94
95
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
96
|
+
private forceRefreshofSelectionColumn;
|
|
97
|
+
setSelected(selected: T[]): void;
|
|
98
|
+
getSelected(): T[];
|
|
95
99
|
deselectAll(): void;
|
|
96
100
|
selectAll(): void;
|
|
101
|
+
scrollToRow(row: T | number): Promise<void>;
|
|
102
|
+
_getRowHeight: () => number;
|
|
97
103
|
_handleSelectAllChange: (e: DomEvent<HTMLInputElement>) => void;
|
|
104
|
+
private selectColumnConfig;
|
|
98
105
|
protected update(changedProperties: PropertyValues): void;
|
|
99
106
|
protected render(): unknown;
|
|
100
107
|
}
|
|
101
108
|
interface TableEvents {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
change: (event: CustomEvent<TableDataOptions<any>>) => void;
|
|
110
|
+
paginationChange: (event: CustomEvent<PaginationChangeProps>) => void;
|
|
111
|
+
filter: (event: CustomEvent<FilterEvent<any>>) => void;
|
|
112
|
+
sortChange: (event: CustomEvent<ColumnSettings<any>>) => void;
|
|
113
|
+
selected: (event: CustomEvent<any[]>) => void;
|
|
107
114
|
}
|
|
108
115
|
declare global {
|
|
109
116
|
interface HTMLElementTagNameMap {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"name": "spectric-button",
|
|
82
|
-
"description": "Attributes:\n\n * `variant` {`\"text\" | \"primary\" | \"secondary\"`} - Is this the principal call to action on the page?\n\n * `backgroundColor` {`string | undefined`} - What background color to use\n\n * `size` {`\"large\" | \"medium\" | \"small\" | \"xsmall\" | \"xxsmall\" | \"tiny\"`} - How large should the button be?\n\n * `label` {`string | undefined`} - \n\n * `disabled` {`boolean`} - \n\n * `danger` {`boolean`} - \n\n * `icon` {`boolean`} - \n\n * `tooltip` {`DomRenderable
|
|
82
|
+
"description": "Attributes:\n\n * `variant` {`\"text\" | \"primary\" | \"secondary\"`} - Is this the principal call to action on the page?\n\n * `backgroundColor` {`string | undefined`} - What background color to use\n\n * `size` {`\"large\" | \"medium\" | \"small\" | \"xsmall\" | \"xxsmall\" | \"tiny\"`} - How large should the button be?\n\n * `label` {`string | undefined`} - \n\n * `disabled` {`boolean`} - \n\n * `danger` {`boolean`} - \n\n * `icon` {`boolean`} - \n\n * `tooltip` {`DomRenderable`} - \n\n * `tooltipPosition` {`\"top\" | \"bottom\" | \"left\" | \"right\" | \"mouse\" | undefined`} - \n\nProperties:\n\n * `styles` {`CSSResultGroup | undefined`} - \n\n * `_onClick` - \n\n * `variant` {`\"text\" | \"primary\" | \"secondary\"`} - Is this the principal call to action on the page?\n\n * `backgroundColor` {`string | undefined`} - What background color to use\n\n * `size` {`\"large\" | \"medium\" | \"small\" | \"xsmall\" | \"xxsmall\" | \"tiny\"`} - How large should the button be?\n\n * `label` {`string | undefined`} - \n\n * `disabled` {`boolean`} - \n\n * `danger` {`boolean`} - \n\n * `icon` {`boolean`} - \n\n * `tooltip` {`DomRenderable`} - \n\n * `tooltipPosition` {`\"top\" | \"bottom\" | \"left\" | \"right\" | \"mouse\" | undefined`} - \n\n * `_disposables` {`Set<IDisposable>`} - \n\n * `_isDisposed` {`boolean`} - \n\n * `_disposableListeners` {`{ target: DisposableTarget; event: string; handler: any; options?: AddEventListenerOptions | undefined; }[]`} - \n\n * `_connected` {`boolean`} - ",
|
|
83
83
|
"attributes": [
|
|
84
84
|
{
|
|
85
85
|
"name": "variant",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
"name": "tooltip",
|
|
150
|
-
"description": "`tooltip` {`DomRenderable
|
|
150
|
+
"description": "`tooltip` {`DomRenderable`} - \n\nProperty: tooltip",
|
|
151
151
|
"values": []
|
|
152
152
|
},
|
|
153
153
|
{
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
},
|
|
433
433
|
{
|
|
434
434
|
"name": "spectric-dialog",
|
|
435
|
-
"description": "Dialog Element\n\nEvents:\n\n * `close` {`CustomEvent<unknown>`} - \n\nSlots:\n\n * `title` {} - sets the title of the dialog attribute/property can also be use for setting the title to a string\n\nAttributes:\n\n * `open` {`boolean`} - \n\n * `dismissable` {`boolean`} - \n\n * `hideBackdrop` {`boolean`} - \n\n * `title` {`string`} - \n\n * `closeOnEscape` {`boolean`} - \n\n * `closeOnOutsideClick` {`boolean`} - \n\nProperties:\n\n * `styles` {`CSSResultGroup`} - \n\n * `dialogElement` {`Promise<HTMLDialogElement>`} - \n\n * `clickHandler` - \n\n * `_handleKeyDown` - \n\n * `_onClose` - \n\n * `open` {`boolean`} - \n\n * `dismissable` {`boolean`} - \n\n * `hideBackdrop` {`boolean`} - \n\n * `title` {`string`} - \n\n * `closeOnEscape` {`boolean`} - \n\n * `closeOnOutsideClick` {`boolean`} - ",
|
|
435
|
+
"description": "Dialog Element\n\nEvents:\n\n * `close` {`CustomEvent<unknown>`} - \n\nSlots:\n\n * `title` {} - sets the title of the dialog attribute/property can also be use for setting the title to a string\n\n * `footer` {} - Space at the bottom of the dialog that you can put buttons or other tools\n\nAttributes:\n\n * `open` {`boolean`} - \n\n * `dismissable` {`boolean`} - \n\n * `hideBackdrop` {`boolean`} - \n\n * `title` {`string`} - \n\n * `closeOnEscape` {`boolean`} - \n\n * `closeOnOutsideClick` {`boolean`} - \n\nProperties:\n\n * `styles` {`CSSResultGroup`} - \n\n * `dialogElement` {`Promise<HTMLDialogElement>`} - \n\n * `clickHandler` - \n\n * `_handleKeyDown` - \n\n * `_onClose` - \n\n * `open` {`boolean`} - \n\n * `dismissable` {`boolean`} - \n\n * `hideBackdrop` {`boolean`} - \n\n * `title` {`string`} - \n\n * `closeOnEscape` {`boolean`} - \n\n * `closeOnOutsideClick` {`boolean`} - ",
|
|
436
436
|
"attributes": [
|
|
437
437
|
{
|
|
438
438
|
"name": "open",
|
|
@@ -475,7 +475,7 @@
|
|
|
475
475
|
"attributes": [
|
|
476
476
|
{
|
|
477
477
|
"name": "checked",
|
|
478
|
-
"description": "`checked` {`boolean | undefined`} - \n\nProperty: checked",
|
|
478
|
+
"description": "`checked` {`boolean | undefined`} - \n\nProperty: checked\n\nDefault: false",
|
|
479
479
|
"values": []
|
|
480
480
|
},
|
|
481
481
|
{
|
|
@@ -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 * `_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 * `_asyncAutocomplete` {`Promise<HTMLDivElement>`} - \n\n * `_input` {`SpectricInput`} - The underlying input element\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 * `_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",
|
|
@@ -2050,7 +2050,7 @@
|
|
|
2050
2050
|
},
|
|
2051
2051
|
{
|
|
2052
2052
|
"name": "spectric-table-cell",
|
|
2053
|
-
"description": "Pagination Element\n\nEvents:\n\n * `filter` {`CustomEvent<FilterEvent<T>>`} - \n\nProperties:\n\n * `index` {`number`} - \n\n * `columns` {`ColumnSettings<T>[]`} - \n\n * `table` {`SpectricTableElement<T>`} - \n\n * `overflow` {`DomRenderable`} - \n\n * `td` {`HTMLTableCellElement`} - \n\n * `styleRules` {`StyleInfo`} - \n\n * `_handleFilterOut` - \n\n * `_handleFilterFor` - \n\n * `
|
|
2053
|
+
"description": "Pagination Element\n\nEvents:\n\n * `filter` {`CustomEvent<FilterEvent<T>>`} - \n\nProperties:\n\n * `index` {`number`} - \n\n * `columns` {`ColumnSettings<T>[]`} - \n\n * `table` {`SpectricTableElement<T>`} - \n\n * `overflow` {`DomRenderable`} - \n\n * `td` {`HTMLTableCellElement`} - \n\n * `styleRules` {`StyleInfo`} - \n\n * `_handleFilterOut` - \n\n * `_handleFilterFor` - \n\n * `_displayOverflowTooltip` - \n\n * `column` {`ColumnSettings<T>`} - \n\n * `row` {`T`} - ",
|
|
2054
2054
|
"attributes": [
|
|
2055
2055
|
{
|
|
2056
2056
|
"name": "onfilter",
|
|
@@ -2060,7 +2060,7 @@
|
|
|
2060
2060
|
},
|
|
2061
2061
|
{
|
|
2062
2062
|
"name": "spectric-table-header",
|
|
2063
|
-
"description": "Pagination Element\n\nEvents:\n\n * `sortChange` {`CustomEvent<ColumnSettings<T>>`} - \n\n * `columnResize` {`CustomEvent<ColumnSettings<T>>`} - \n\nProperties:\n\n * `_resizeStart` {`{ event: MouseEvent; column: ColumnSettings<T>; } | undefined`} - \n\n * `_handleSortChange` - \n\n * `_handleResizeStart` - \n\n * `_handleResizeEnd` - \n\n * `columns` {`ColumnSettings<T>[]`} - \n\n * `_disposables` {`Set<IDisposable>`} - \n\n * `_isDisposed` {`boolean`} - \n\n * `_disposableListeners` {`{ target: DisposableTarget; event: string; handler: any; options?: AddEventListenerOptions | undefined; }[]`} - \n\n * `_connected` {`boolean`} - ",
|
|
2063
|
+
"description": "Pagination Element\n\nEvents:\n\n * `sortChange` {`CustomEvent<ColumnSettings<T>>`} - \n\n * `columnResize` {`CustomEvent<ColumnSettings<T>>`} - \n\nProperties:\n\n * `_resizeStart` {`{ event: MouseEvent; column: ColumnSettings<T>; } | undefined`} - \n\n * `table` {`SpectricTableElement<T>`} - \n\n * `_handleSortChange` - \n\n * `_handleResizeStart` - \n\n * `_handleResizeEnd` - \n\n * `columns` {`ColumnSettings<T>[]`} - \n\n * `_disposables` {`Set<IDisposable>`} - \n\n * `_isDisposed` {`boolean`} - \n\n * `_disposableListeners` {`{ target: DisposableTarget; event: string; handler: any; options?: AddEventListenerOptions | undefined; }[]`} - \n\n * `_connected` {`boolean`} - ",
|
|
2064
2064
|
"attributes": [
|
|
2065
2065
|
{
|
|
2066
2066
|
"name": "onsortChange",
|
|
@@ -2074,7 +2074,7 @@
|
|
|
2074
2074
|
},
|
|
2075
2075
|
{
|
|
2076
2076
|
"name": "spectric-table",
|
|
2077
|
-
"description": "React example\n<iframe width=\"100%\" height=\"400px\" src=\"https://stackblitz.com/edit/react-ts-2ue7azag?ctl=1&embed=1&file=App.tsx&hideExplorer=1&hideNavigation=1\"/>\n\nEvents:\n\n * `paginationChange` {`CustomEvent<PaginationChangeProps>`} - \n\n * `change` {`CustomEvent<TableDataOptions<T>>`} - \n\n * `filter` {`CustomEvent<FilterEvent<T>>`} - \n\n * `sortChange` {`CustomEvent<ColumnSettings<T>>`} - \n\n * `selected` {`CustomEvent<T[]>`} - \n\nAttributes:\n\n * `fontSize` {`number`} - Needed for virtualization\n\n * `select` {`\"none\" | \"multi\" | \"single\"`} - \n\n * `sort` {`\"multi\" | \"single\"`} - \n\n * `rowHeight` {`number`} - Needed for virtualization\n\n * `sortOrder` {`string[]`} - \n\nProperties:\n\n * `fontSize` {`number`} - Needed for virtualization\n\n * `_handlePaginationChange` - \n\n * `_handleSortChange` - \n\n * `_handleColumnResize` - \n\n * `_emitChange` - \n\n * `__DO_NOT_USE_filter` - \n\n * `selected` {`T[]`} - \n\n * `_handleSelectAllChange` - \n\n * `data` {`T[]`} - \n\n * `select` {`\"none\" | \"multi\" | \"single\"`} - \n\n * `sort` {`\"multi\" | \"single\"`} - \n\n * `rowHeight` {`number`} - Needed for virtualization\n\n * `pagination` {`PaginationProps | undefined`} - \n\n * `columns` {`ColumnSettings<T>[]`} - \n\n * `sortOrder` {`string[]`} - ",
|
|
2077
|
+
"description": "React example\n<iframe width=\"100%\" height=\"400px\" src=\"https://stackblitz.com/edit/react-ts-2ue7azag?ctl=1&embed=1&file=App.tsx&hideExplorer=1&hideNavigation=1\"/>\n\nEvents:\n\n * `paginationChange` {`CustomEvent<PaginationChangeProps>`} - \n\n * `change` {`CustomEvent<TableDataOptions<T>>`} - \n\n * `filter` {`CustomEvent<FilterEvent<T>>`} - \n\n * `sortChange` {`CustomEvent<ColumnSettings<T>>`} - \n\n * `selected` {`CustomEvent<T[]>`} - \n\nAttributes:\n\n * `fontSize` {`number`} - Needed for virtualization\n\n * `select` {`\"none\" | \"multi\" | \"single\"`} - \n\n * `sort` {`\"multi\" | \"single\"`} - \n\n * `rowHeight` {`number`} - Needed for virtualization\n\n * `sortOrder` {`string[]`} - \n\nProperties:\n\n * `fontSize` {`number`} - Needed for virtualization\n\n * `_handlePaginationChange` - \n\n * `_handleSortChange` - \n\n * `_handleColumnResize` - \n\n * `_emitChange` - \n\n * `__DO_NOT_USE_filter` - \n\n * `selected` {`T[]`} - \n\n * `_getRowHeight` - \n\n * `_handleSelectAllChange` - \n\n * `selectColumnConfig` {`ColumnSettings<T>`} - \n\n * `data` {`T[]`} - \n\n * `select` {`\"none\" | \"multi\" | \"single\"`} - \n\n * `sort` {`\"multi\" | \"single\"`} - \n\n * `rowHeight` {`number`} - Needed for virtualization\n\n * `pagination` {`PaginationProps | undefined`} - \n\n * `columns` {`ColumnSettings<T>[]`} - \n\n * `sortOrder` {`string[]`} - ",
|
|
2078
2078
|
"attributes": [
|
|
2079
2079
|
{
|
|
2080
2080
|
"name": "fontSize",
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ declare const module: {
|
|
|
19
19
|
InputVariants: typeof components.InputVariants;
|
|
20
20
|
SpectricInput: typeof components.SpectricInput;
|
|
21
21
|
SupportedLanguages: typeof components.SupportedLanguages;
|
|
22
|
+
toLabelValue: (value: components.LabelValueOrString) => {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
};
|
|
22
26
|
SpectricQuery: typeof components.SpectricQuery;
|
|
23
27
|
nodeTypes: import('./components/query_bar/querylanguage/kuery').NodeTypes;
|
|
24
28
|
SpectricPanel: typeof components.SpectricPanel;
|