myrta-ui 17.0.75 → 17.0.77
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/esm2022/lib/components/form/formula-editor/enums/error-messages.enum.mjs +16 -0
- package/esm2022/lib/components/form/formula-editor/enums/formula-editor-size.enum.mjs +7 -0
- package/esm2022/lib/components/form/formula-editor/formula-editor.component.mjs +342 -0
- package/esm2022/lib/components/form/formula-editor/formula-editor.module.mjs +44 -0
- package/esm2022/lib/components/form/formula-editor/helpers/check-errors.helper.mjs +73 -0
- package/esm2022/lib/components/form/formula-editor/helpers/create-tags.helper.mjs +17 -0
- package/esm2022/lib/components/form/formula-editor/models/check-error-result.model.mjs +2 -0
- package/esm2022/lib/components/form/formula-editor/models/formula-editor.model.mjs +2 -0
- package/esm2022/lib/components/form/formula-editor/models/index.mjs +4 -0
- package/esm2022/lib/components/form/formula-editor/models/white-list-item.model.mjs +2 -0
- package/esm2022/lib/components/form/json-editor/json-editor.component.mjs +1 -1
- package/esm2022/lib/components/form/json-editor/json-editor.module.mjs +1 -1
- package/esm2022/lib/components/form/select/helpers/clean-selected-items.helper.mjs +3 -5
- package/esm2022/lib/components/form/select/helpers/get-inner-items.helper.mjs +4 -4
- package/esm2022/lib/components/form/select/models/select-inner-item.model.mjs +1 -1
- package/esm2022/lib/components/form/select/select.component.mjs +4 -4
- package/esm2022/lib/components/paginator/paginator.component.mjs +2 -1
- package/esm2022/lib/helpers/is-number.helper.mjs +7 -0
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/myrta-ui.mjs +499 -18
- package/fesm2022/myrta-ui.mjs.map +1 -1
- package/lib/components/form/formula-editor/enums/error-messages.enum.d.ts +8 -0
- package/lib/components/form/formula-editor/enums/formula-editor-size.enum.d.ts +6 -0
- package/lib/components/form/formula-editor/formula-editor.component.d.ts +74 -0
- package/lib/components/form/formula-editor/formula-editor.module.d.ts +13 -0
- package/lib/components/form/formula-editor/helpers/check-errors.helper.d.ts +6 -0
- package/lib/components/form/formula-editor/helpers/create-tags.helper.d.ts +5 -0
- package/lib/components/form/formula-editor/models/check-error-result.model.d.ts +5 -0
- package/lib/components/form/formula-editor/models/formula-editor.model.d.ts +5 -0
- package/lib/components/form/formula-editor/models/index.d.ts +3 -0
- package/lib/components/form/formula-editor/models/white-list-item.model.d.ts +5 -0
- package/lib/components/form/select/helpers/clean-selected-items.helper.d.ts +2 -6
- package/lib/components/form/select/helpers/get-inner-items.helper.d.ts +1 -1
- package/lib/components/form/select/models/select-inner-item.model.d.ts +1 -0
- package/lib/components/form/select/select.component.d.ts +2 -4
- package/lib/helpers/is-number.helper.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { Field } from '../../../services';
|
|
4
|
+
import { WhiteListItemModel, CheckErrorResultModel } from './models';
|
|
5
|
+
import { FormulaEditorValueTypes, FormulaEditorValueWithId } from './models';
|
|
6
|
+
import { FormulaEditorSizesTypes } from './enums/formula-editor-size.enum';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class FormulaEditorComponent implements ControlValueAccessor {
|
|
9
|
+
private document;
|
|
10
|
+
private _detector;
|
|
11
|
+
private eRef;
|
|
12
|
+
private _range;
|
|
13
|
+
private _selection;
|
|
14
|
+
private _cursorPosition;
|
|
15
|
+
private searchText;
|
|
16
|
+
private _operatorList;
|
|
17
|
+
private _bracketList;
|
|
18
|
+
private _itemList;
|
|
19
|
+
private _modifiedItemList;
|
|
20
|
+
value: string;
|
|
21
|
+
visibleValue: string;
|
|
22
|
+
isFocused: boolean;
|
|
23
|
+
errorModel: CheckErrorResultModel;
|
|
24
|
+
uuid: string;
|
|
25
|
+
fields: Field[];
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
readonly: boolean;
|
|
28
|
+
placeholder: string;
|
|
29
|
+
customClasses: string;
|
|
30
|
+
size: FormulaEditorSizesTypes;
|
|
31
|
+
invalid: boolean;
|
|
32
|
+
invalidMessage: string | string[];
|
|
33
|
+
checkInvalid: true | false | null;
|
|
34
|
+
set items(items: WhiteListItemModel[]);
|
|
35
|
+
inputElement: ElementRef<HTMLInputElement>;
|
|
36
|
+
changed: EventEmitter<FormulaEditorValueTypes>;
|
|
37
|
+
blurred: EventEmitter<FormulaEditorValueWithId>;
|
|
38
|
+
modelChange: EventEmitter<FormulaEditorValueWithId>;
|
|
39
|
+
constructor(document: Document, _detector: ChangeDetectorRef, eRef: ElementRef);
|
|
40
|
+
get getErrorMessage(): string | string[];
|
|
41
|
+
get filteredList(): WhiteListItemModel[];
|
|
42
|
+
get getInvalid(): boolean;
|
|
43
|
+
get readonlyClass(): string;
|
|
44
|
+
get checkValidClasses(): string;
|
|
45
|
+
get getClasses(): string;
|
|
46
|
+
get getIconClass(): string;
|
|
47
|
+
get canClean(): boolean;
|
|
48
|
+
private get _inputValue();
|
|
49
|
+
writeValue(outsideValue: FormulaEditorValueTypes): void;
|
|
50
|
+
onInput(event: Event): void;
|
|
51
|
+
onFocus(event: Event): void;
|
|
52
|
+
onClear(): void;
|
|
53
|
+
onBlur(event: Event): void;
|
|
54
|
+
onKeyup(event: any): void;
|
|
55
|
+
insertTag(whiteListItem: WhiteListItemModel): void;
|
|
56
|
+
updateVisibleValue(insideValue: string): void;
|
|
57
|
+
updateValue(insideValue: string): void;
|
|
58
|
+
private _modifiedValue;
|
|
59
|
+
private _transformValue;
|
|
60
|
+
private _checkErrors;
|
|
61
|
+
private _toggleError;
|
|
62
|
+
private _disableError;
|
|
63
|
+
private _insertPositionText;
|
|
64
|
+
private _storeCursorPosition;
|
|
65
|
+
private _restoreCursorPosition;
|
|
66
|
+
private _placeCaretAtEnd;
|
|
67
|
+
clickOut(event: Event): void;
|
|
68
|
+
registerOnChange(fn: any): void;
|
|
69
|
+
registerOnTouched(fn: () => {}): void;
|
|
70
|
+
private onChange;
|
|
71
|
+
private onTouched;
|
|
72
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormulaEditorComponent, never>;
|
|
73
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormulaEditorComponent, "mrx-formula-editor", never, { "fields": { "alias": "fields"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "customClasses": { "alias": "customClasses"; "required": false; }; "size": { "alias": "size"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "invalidMessage": { "alias": "invalidMessage"; "required": false; }; "checkInvalid": { "alias": "checkInvalid"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "changed": "changed"; "blurred": "blurred"; "modelChange": "modelChange"; }, never, never, false, never>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./formula-editor.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../../chars-left/chars-left.module";
|
|
5
|
+
import * as i4 from "../../error-message/error-message.module";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "../../save-state/save-state.module";
|
|
8
|
+
import * as i7 from "../../../pipes/safe/safe.module";
|
|
9
|
+
export declare class FormulaEditorModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormulaEditorModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormulaEditorModule, [typeof i1.FormulaEditorComponent], [typeof i2.CommonModule, typeof i3.CharsLeftModule, typeof i4.ErrorMessageModule, typeof i5.FormsModule, typeof i6.SaveStateModule, typeof i7.SafeModule], [typeof i1.FormulaEditorComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FormulaEditorModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CheckErrorResultModel } from '../models/check-error-result.model';
|
|
2
|
+
import { WhiteListItemModel } from '../models/white-list-item.model';
|
|
3
|
+
export declare const checkInterpretationErrors: (error: boolean) => CheckErrorResultModel;
|
|
4
|
+
export declare const checkBracketErrors: (array: string[]) => CheckErrorResultModel;
|
|
5
|
+
export declare const checkSequenceErrors: (array: string[], operatorList: string[], bracketList: string[]) => CheckErrorResultModel;
|
|
6
|
+
export declare const checkDividerErrors: (array: string[], list: WhiteListItemModel[]) => CheckErrorResultModel;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const createTag: (content: string) => string;
|
|
2
|
+
export declare const createOperator: (content: string) => string;
|
|
3
|
+
export declare const createNumber: (content: string) => string;
|
|
4
|
+
export declare const createBracket: (content: string) => string;
|
|
5
|
+
export declare const createTagOutside: (content: string) => string;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import { SelectInnerItemModel } from '../models/select-inner-item.model';
|
|
2
|
-
export declare const cleanSelectItems: (innerList: SelectInnerItemModel[]) =>
|
|
3
|
-
|
|
4
|
-
}[];
|
|
5
|
-
export declare const cleanSelectItem: ({ __id, __selected, ...rest }: SelectInnerItemModel) => {
|
|
6
|
-
[name: string]: any;
|
|
7
|
-
};
|
|
2
|
+
export declare const cleanSelectItems: (innerList: SelectInnerItemModel[]) => any[];
|
|
3
|
+
export declare const cleanSelectItem: (innerItem: SelectInnerItemModel) => any;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SelectItemModel } from '../models/select-item.model';
|
|
2
2
|
import { SelectInnerItemModel } from '../models/select-inner-item.model';
|
|
3
|
-
export declare const getInnerItems: (items: SelectItemModel[], selectedItems
|
|
3
|
+
export declare const getInnerItems: (items: SelectItemModel[], selectedItems: SelectItemModel[] | undefined, bindValue: string | null) => SelectInnerItemModel[];
|
|
@@ -68,15 +68,13 @@ export declare class SelectComponent implements ControlValueAccessor, OnInit {
|
|
|
68
68
|
get getSelectedLabels(): SelectInnerItemModel[];
|
|
69
69
|
get filteredItems(): SelectInnerItemModel[];
|
|
70
70
|
get isInvalidMessage(): boolean;
|
|
71
|
-
onSelect(item:
|
|
71
|
+
onSelect(item: SelectInnerItemModel): void;
|
|
72
72
|
clearItem(item: SelectInnerItemModel): void;
|
|
73
73
|
onUnselect(item: SelectInnerItemModel): void;
|
|
74
74
|
onOpen(event: MouseEvent): void;
|
|
75
75
|
onClear(event: MouseEvent): void;
|
|
76
76
|
togglePopup(isOpen: boolean): void;
|
|
77
|
-
getCleanSelectItem(item: SelectInnerItemModel):
|
|
78
|
-
[name: string]: any;
|
|
79
|
-
};
|
|
77
|
+
getCleanSelectItem(item: SelectInnerItemModel): any;
|
|
80
78
|
asOption(option: SelectInnerItemModel): SelectInnerItemModel;
|
|
81
79
|
asLabel(label: SelectInnerItemModel): SelectInnerItemModel;
|
|
82
80
|
writeValue(selected?: any | any[]): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isAn: (value: any) => boolean;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -149,6 +149,9 @@ export * from './lib/components/form/radio-group/models/radio-group.model';
|
|
|
149
149
|
export * from './lib/components/form/switch/switch.module';
|
|
150
150
|
export * from './lib/components/form/switch/switch.component';
|
|
151
151
|
export * from './lib/components/form/switch/switch.enum';
|
|
152
|
+
export * from './lib/components/form/formula-editor/formula-editor.module';
|
|
153
|
+
export * from './lib/components/form/formula-editor/formula-editor.component';
|
|
154
|
+
export * from './lib/components/form/formula-editor/models';
|
|
152
155
|
export * from './lib/components/wrappers/widget-wrapper/widget-wrapper.module';
|
|
153
156
|
export * from './lib/components/wrappers/widget-wrapper/widget-wrapper.component';
|
|
154
157
|
export * from './lib/components/wrappers/content-wrapper/content-wrapper.module';
|