@operato/input 9.0.5 → 9.0.8
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/CHANGELOG.md
CHANGED
@@ -3,6 +3,15 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
### [9.0.8](https://github.com/hatiolab/operato/compare/v9.0.7...v9.0.8) (2025-07-23)
|
7
|
+
|
8
|
+
|
9
|
+
### :bug: Bug Fix
|
10
|
+
|
11
|
+
* add ox-input-formula ([d567309](https://github.com/hatiolab/operato/commit/d56730975288cf665622f184ba8fc4086b860b87))
|
12
|
+
|
13
|
+
|
14
|
+
|
6
15
|
### [9.0.5](https://github.com/hatiolab/operato/compare/v9.0.4...v9.0.5) (2025-07-04)
|
7
16
|
|
8
17
|
|
@@ -0,0 +1,67 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
|
+
*/
|
4
|
+
import '@material/web/icon/icon.js';
|
5
|
+
import '@material/web/button/elevated-button.js';
|
6
|
+
import '@operato/i18n/ox-i18n.js';
|
7
|
+
import { OxFormField } from '@operato/input';
|
8
|
+
type FormulaVariable = {
|
9
|
+
name: string;
|
10
|
+
description?: string;
|
11
|
+
type?: 'number' | 'string' | 'date' | 'metric' | 'kpi';
|
12
|
+
unit?: string;
|
13
|
+
help?: string;
|
14
|
+
example?: string;
|
15
|
+
};
|
16
|
+
type FormulaFunction = {
|
17
|
+
name: string;
|
18
|
+
description: string;
|
19
|
+
template: string;
|
20
|
+
syntax: string;
|
21
|
+
parameters: string[];
|
22
|
+
returnType: string;
|
23
|
+
help?: string;
|
24
|
+
examples?: string[];
|
25
|
+
};
|
26
|
+
/**
|
27
|
+
* Formula editor component for KPI calculations
|
28
|
+
*
|
29
|
+
* Example:
|
30
|
+
*
|
31
|
+
* <ox-input-formula
|
32
|
+
* .value=${formulaValue}
|
33
|
+
* .availableVariables=${variables}
|
34
|
+
* ></ox-input-formula>
|
35
|
+
*/
|
36
|
+
export declare class KpiFormulaEditor extends OxFormField {
|
37
|
+
static styles: import("lit").CSSResult[];
|
38
|
+
value: string;
|
39
|
+
availableVariables: FormulaVariable[];
|
40
|
+
private errorMessage;
|
41
|
+
private isValid;
|
42
|
+
editor: HTMLTextAreaElement;
|
43
|
+
private _changingNow;
|
44
|
+
getValue(): any;
|
45
|
+
setValue(value: any): void;
|
46
|
+
validate(): boolean;
|
47
|
+
getErrorMessage(): string;
|
48
|
+
focus(): void;
|
49
|
+
blur(): void;
|
50
|
+
reset(): void;
|
51
|
+
private readonly operators;
|
52
|
+
private readonly functions;
|
53
|
+
private _normalizeVariableName;
|
54
|
+
firstUpdated(): void;
|
55
|
+
render(): import("lit-html").TemplateResult<1>;
|
56
|
+
updated(changes: any): void;
|
57
|
+
_onChange(e: Event): void;
|
58
|
+
_onFormulaInput(e: Event): void;
|
59
|
+
_insertVariable(variableName: string): void;
|
60
|
+
_insertOperator(operator: string): void;
|
61
|
+
_insertFunction(template: string): void;
|
62
|
+
_showVariableHelp(e: Event, variable: FormulaVariable): void;
|
63
|
+
_showFunctionHelp(e: Event, func: FormulaFunction): void;
|
64
|
+
_validateFormula(): void;
|
65
|
+
_updateValue(): void;
|
66
|
+
}
|
67
|
+
export {};
|