@spectric/ui 0.0.25 → 0.0.26

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.
@@ -64,6 +64,7 @@ export interface InputProps {
64
64
  * The sets the autocomplete for the input.
65
65
  */
66
66
  autocomplete?: HTMLInputElement["autocomplete"];
67
+ spellcheck?: HTMLInputElement["spellcheck"];
67
68
  }
68
69
  export declare class SpectricInput extends LitElement implements InputProps {
69
70
  checked?: boolean;
@@ -121,6 +122,10 @@ export declare class SpectricInput extends LitElement implements InputProps {
121
122
  * The sets the autocomplete for the input.
122
123
  */
123
124
  autocomplete: HTMLInputElement["autocomplete"];
125
+ /**
126
+ * The sets the autocomplete for the input.
127
+ */
128
+ spellcheck: HTMLInputElement["spellcheck"];
124
129
  get selectionStart(): number | null;
125
130
  /**
126
131
  * The value of the input.
@@ -27,7 +27,7 @@ export declare enum SupportedLanguages {
27
27
  AST = "AST"
28
28
  }
29
29
  type SupportedLanguagesTypes = `${SupportedLanguages}`;
30
- interface QueryEventMap {
30
+ export interface QueryEventMap {
31
31
  change: (event: CustomEvent<string | kuery.KueryNode | JsonObject>) => void;
32
32
  }
33
33
  export interface IQueryProps {
@@ -82,10 +82,10 @@ export declare class SpectricQuery extends LitElement implements IQueryProps {
82
82
  * The value of the input.
83
83
  */
84
84
  value: string;
85
- outputLanguage: SupportedLanguagesTypes;
85
+ outputLanguage?: SupportedLanguagesTypes;
86
86
  private completions;
87
87
  private completionIndex;
88
- fields: FieldTypes[];
88
+ fields?: FieldTypes[];
89
89
  _autocomplete?: PopoverElement;
90
90
  _valueHelper?: PopoverElement;
91
91
  _asyncAutocomplete: Promise<HTMLDivElement>;
@@ -104,7 +104,7 @@ export declare class SpectricQuery extends LitElement implements IQueryProps {
104
104
  _parseQuery: (e?: InputEvent | undefined) => void;
105
105
  getValuesForField: (field: string, text: string) => Promise<LabelValuesOrStrings>;
106
106
  autoComplete(suggestion: Suggestion): Promise<void>;
107
- protected updated(changed: PropertyValues): void;
107
+ protected update(changed: PropertyValues): void;
108
108
  _selectCompletion: () => Promise<void>;
109
109
  _handleArrows: (e: KeyboardEvent) => void;
110
110
  protected render(): import('lit-html').TemplateResult<1>;
@@ -5,7 +5,7 @@ import { FilterEvent } from './cell';
5
5
  import { ButtonSizesTypes } from '../Button';
6
6
  export declare const TableElementTag = "spectric-table";
7
7
  export type { TableProps, TableEvents };
8
- export type DomRenderable = HTMLElement | TemplateResult | string | number | null | undefined;
8
+ export type DomRenderable = HTMLElement | TemplateResult | TemplateResult<any>[] | string | number | null | undefined;
9
9
  export declare enum TableSelectOptions {
10
10
  multi = "multi",
11
11
  single = "single",
@@ -92,6 +92,10 @@ export declare class SpectricTableElement<T = any> extends LitElement implements
92
92
  * Needed for virtualization
93
93
  */
94
94
  fontSize: number;
95
+ /**
96
+ * Function that allows you to set the row class name programatically
97
+ */
98
+ getRowClass: (_row: T, index: number) => "" | "odd";
95
99
  protected cellActionButtonSize: ButtonSizesTypes;
96
100
  getCellActionButtonSize(): "small" | "large" | "medium" | "xsmall" | "xxsmall" | "tiny";
97
101
  static getDefaultDataSorterAndPaginatior<T>(data: T[]): (props: TableDataOptions<T>) => T[];
@@ -1,3 +1,4 @@
1
+ import { PropertyValues } from 'lit';
1
2
  import { HTMLElementTagWithEvents, ReactElementWithPropsAndEvents } from '../types';
2
3
  import { ColumnSettings, SpectricTableElement } from './table';
3
4
  import { DisposableElement } from '../../classes/DisposibleElement';
@@ -18,7 +19,7 @@ export declare class TableVirtualBodyElement<T> extends DisposableElement implem
18
19
  table: SpectricTableElement<T>;
19
20
  columnsMeasured: boolean;
20
21
  constructor();
21
- protected updated(): void;
22
+ protected update(changedProperties: PropertyValues): void;
22
23
  protected createRenderRoot(): HTMLElement | DocumentFragment;
23
24
  protected render(): unknown;
24
25
  }
@@ -471,7 +471,7 @@
471
471
  },
472
472
  {
473
473
  "name": "spectric-input",
474
- "description": "Events:\n\n * `change` {`Event`} - \n\nAttributes:\n\n * `checked` {`boolean | undefined`} - \n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"popup-date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\" | \"checkbox\" | \"range\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1> | undefined`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.\n\nProperties:\n\n * `checked` {`boolean | undefined`} - \n\n * `size` {`\"large\" | \"medium\" | \"small\" | \"xsmall\" | \"xxsmall\" | \"tiny\" | undefined`} - \n\n * `files` {`FileList | null`} - \n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `_value` {`string | number | boolean`} - The internal value.\n\n * `_showPassword` {`boolean`} - \n\n * `selectionStart` {`number | null`} - \n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `_handleInput` - Handles `oninput` event on the `<input>`.\n\n * `_input` {`HTMLInputElement | undefined`} - The underlying input element\n\n * `handleTogglePasswordVisibility` - \n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"popup-date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\" | \"checkbox\" | \"range\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1> | undefined`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.",
474
+ "description": "Events:\n\n * `change` {`Event`} - \n\nAttributes:\n\n * `checked` {`boolean | undefined`} - \n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"popup-date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\" | \"checkbox\" | \"range\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1> | undefined`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.\n\n * `spellcheck` {`boolean`} - The sets the autocomplete for the input.\n\nProperties:\n\n * `checked` {`boolean | undefined`} - \n\n * `size` {`\"large\" | \"medium\" | \"small\" | \"xsmall\" | \"xxsmall\" | \"tiny\" | undefined`} - \n\n * `files` {`FileList | null`} - \n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `_value` {`string | number | boolean`} - The internal value.\n\n * `_showPassword` {`boolean`} - \n\n * `selectionStart` {`number | null`} - \n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `_handleInput` - Handles `oninput` event on the `<input>`.\n\n * `_input` {`HTMLInputElement | undefined`} - The underlying input element\n\n * `handleTogglePasswordVisibility` - \n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"popup-date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\" | \"checkbox\" | \"range\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1> | undefined`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.\n\n * `spellcheck` {`boolean`} - The sets the autocomplete for the input.",
475
475
  "attributes": [
476
476
  {
477
477
  "name": "checked",
@@ -1901,6 +1901,11 @@
1901
1901
  }
1902
1902
  ]
1903
1903
  },
1904
+ {
1905
+ "name": "spellcheck",
1906
+ "description": "`spellcheck` {`boolean`} - The sets the autocomplete for the input.\n\nProperty: spellcheck\n\nDefault: true",
1907
+ "valueSet": "v"
1908
+ },
1904
1909
  {
1905
1910
  "name": "onchange",
1906
1911
  "description": "`change` {`Event`} - "
@@ -1960,11 +1965,11 @@
1960
1965
  },
1961
1966
  {
1962
1967
  "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 * `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",
1968
+ "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\" | undefined`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[] | undefined`} - 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\" | undefined`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[] | undefined`} - 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
1969
  "attributes": [
1965
1970
  {
1966
1971
  "name": "outputLanguage",
1967
- "description": "`outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\"`} - The output of the query in a specific format\n\nProperty: outputLanguage\n\nDefault: AST",
1972
+ "description": "`outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\" | undefined`} - The output of the query in a specific format\n\nProperty: outputLanguage\n\nDefault: AST",
1968
1973
  "values": [
1969
1974
  {
1970
1975
  "name": "toMongo"
@@ -1986,7 +1991,8 @@
1986
1991
  },
1987
1992
  {
1988
1993
  "name": "fields",
1989
- "description": "`fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\nProperty: fields\n\nDefault: "
1994
+ "description": "`fields` {`FieldTypes[] | undefined`} - Fields that are used for the auto complete\n\nProperty: fields\n\nDefault: ",
1995
+ "values": []
1990
1996
  },
1991
1997
  {
1992
1998
  "name": "placeholder",
@@ -2074,7 +2080,7 @@
2074
2080
  },
2075
2081
  {
2076
2082
  "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 * `cellActionButtonSize` {`\"large\" | \"medium\" | \"small\" | \"xsmall\" | \"xxsmall\" | \"tiny\"`} - \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[]`} - ",
2083
+ "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 * `getRowClass` - Function that allows you to set the row class name programatically\n\n * `cellActionButtonSize` {`\"large\" | \"medium\" | \"small\" | \"xsmall\" | \"xxsmall\" | \"tiny\"`} - \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
2084
  "attributes": [
2079
2085
  {
2080
2086
  "name": "fontSize",