@tellaro/tql 1.4.0 → 1.4.1
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/src/completionProvider.js +1 -1
- package/dist/src/parser.js +1 -1
- package/dist/src/semanticPreview.d.ts +1 -1
- package/dist/src/validator.js +40 -14
- package/dist/tql.css +1 -1
- package/dist/vue/TqlChart.vue.js +2 -2
- package/dist/vue/TqlChart.vue2.js +109 -113
- package/dist/vue/components/TqlPreview.vue.js +4 -4
- package/dist/vue/useTqlInput.d.ts +54 -0
- package/package.json +1 -1
- package/dist/node_modules/chartjs-plugin-annotation/dist/chartjs-plugin-annotation.esm.js +0 -1655
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./TqlPreview.vue2.js";
|
|
2
2
|
import { TqlPreviewNode as i } from "./TqlPreview.vue2.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3521fa37"]]);
|
|
6
6
|
export {
|
|
7
7
|
i as TqlPreviewNode,
|
|
8
|
-
|
|
8
|
+
m as default
|
|
9
9
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { TqlCompletionItem, TqlFieldSchema, TqlParseResult, TqlSnippet, TqlToken, TqlValidationResult } from '../src/types';
|
|
3
|
+
export interface UseTqlInputOptions {
|
|
4
|
+
modelValue: Ref<string>;
|
|
5
|
+
fieldSchema?: Ref<TqlFieldSchema[] | undefined>;
|
|
6
|
+
snippets?: Ref<TqlSnippet[] | undefined>;
|
|
7
|
+
fieldValues?: Ref<Record<string, string[]> | undefined>;
|
|
8
|
+
validateOnInput?: boolean;
|
|
9
|
+
/** Debounce time for validation in ms (default: 300) */
|
|
10
|
+
debounceMs?: number;
|
|
11
|
+
/** Debounce time for completions in ms (default: 50, faster than validation) */
|
|
12
|
+
completionDebounceMs?: number;
|
|
13
|
+
autocomplete?: boolean;
|
|
14
|
+
onValidation?: (result: TqlValidationResult) => void;
|
|
15
|
+
onParse?: (result: TqlParseResult) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Placeholder position for tab-stop navigation (used in insertCompletion return value)
|
|
19
|
+
*/
|
|
20
|
+
export interface PlaceholderPosition {
|
|
21
|
+
start: number;
|
|
22
|
+
end: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function useTqlInput(options: UseTqlInputOptions): {
|
|
25
|
+
tokens: any;
|
|
26
|
+
parseResult: any;
|
|
27
|
+
validationResult: any;
|
|
28
|
+
cursorPosition: any;
|
|
29
|
+
completionItems: any;
|
|
30
|
+
showAutocomplete: any;
|
|
31
|
+
isValidating: any;
|
|
32
|
+
isValid: any;
|
|
33
|
+
errors: any;
|
|
34
|
+
warnings: any;
|
|
35
|
+
hasErrors: any;
|
|
36
|
+
hasWarnings: any;
|
|
37
|
+
tokenize: () => any;
|
|
38
|
+
parse: () => TqlParseResult;
|
|
39
|
+
validate: () => TqlValidationResult;
|
|
40
|
+
updateCompletions: () => void;
|
|
41
|
+
triggerAutocomplete: () => void;
|
|
42
|
+
hideAutocomplete: () => void;
|
|
43
|
+
handleInput: (value: string) => void;
|
|
44
|
+
handleCursorChange: (position: number) => void;
|
|
45
|
+
insertCompletion: (item: TqlCompletionItem) => {
|
|
46
|
+
query: string;
|
|
47
|
+
newCursorPosition: number;
|
|
48
|
+
placeholders: PlaceholderPosition[];
|
|
49
|
+
};
|
|
50
|
+
insertSnippet: (snippet: TqlSnippet) => string;
|
|
51
|
+
getTokenAtCursor: () => TqlToken | null;
|
|
52
|
+
isPositionInError: (position: number) => boolean;
|
|
53
|
+
getErrorsAtPosition: (position: number) => any;
|
|
54
|
+
};
|