@libs-ui/components-inputs-calculator 0.1.1-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/README.md +3 -0
- package/calculator.component.d.ts +41 -0
- package/esm2022/calculator.component.mjs +194 -0
- package/esm2022/index.mjs +3 -0
- package/esm2022/interfaces/index.mjs +2 -0
- package/esm2022/interfaces/input-calculation.interface.mjs +2 -0
- package/esm2022/libs-ui-components-inputs-calculator.mjs +5 -0
- package/esm2022/pipes/get-field-selected.pipe.mjs +17 -0
- package/esm2022/pipes/get-width-input.pipe.mjs +25 -0
- package/fesm2022/libs-ui-components-inputs-calculator.mjs +237 -0
- package/fesm2022/libs-ui-components-inputs-calculator.mjs.map +1 -0
- package/index.d.ts +2 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/input-calculation.interface.d.ts +23 -0
- package/package.json +30 -0
- package/pipes/get-field-selected.pipe.d.ts +8 -0
- package/pipes/get-width-input.pipe.d.ts +7 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { IListDataEmitMultiKey } from '@libs-ui/components-list';
|
|
3
|
+
import { IInputCalculatorConfigField, IInputCalculatorExpression, IInputCalculatorFunctionControlEvent, IInputCalculatorValid } from './interfaces';
|
|
4
|
+
import { IPopoverFunctionControlEvent } from '@libs-ui/components-popover';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class LibsUiComponentsInputsCalculatorComponent implements OnInit {
|
|
7
|
+
protected indexFocus: import("@angular/core").WritableSignal<number | undefined>;
|
|
8
|
+
protected isFocus: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
+
protected listExpressions: import("@angular/core").WritableSignal<IInputCalculatorExpression[]>;
|
|
10
|
+
protected isChangeExpression: import("@angular/core").WritableSignal<boolean>;
|
|
11
|
+
protected error: import("@angular/core").WritableSignal<IInputCalculatorValid | undefined>;
|
|
12
|
+
private inputRef;
|
|
13
|
+
private timeOut;
|
|
14
|
+
private tooltipFunctionControl;
|
|
15
|
+
readonly expressions: import("@angular/core").InputSignal<IInputCalculatorExpression[]>;
|
|
16
|
+
readonly zIndex: import("@angular/core").InputSignal<number>;
|
|
17
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
18
|
+
readonly labelButtonSave: import("@angular/core").InputSignal<string>;
|
|
19
|
+
readonly configField: import("@angular/core").InputSignal<IInputCalculatorConfigField | undefined>;
|
|
20
|
+
readonly ignoreButtonSave: import("@angular/core").InputSignal<boolean>;
|
|
21
|
+
readonly classInclude: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
|
|
22
|
+
readonly classContainerInput: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
|
|
23
|
+
readonly classContainerButton: import("@angular/core").InputSignalWithTransform<string, string | undefined>;
|
|
24
|
+
readonly validRequired: import("@angular/core").InputSignal<IInputCalculatorValid | undefined>;
|
|
25
|
+
readonly outChangeExpressions: import("@angular/core").OutputEmitterRef<IInputCalculatorExpression[]>;
|
|
26
|
+
readonly outFunctionControl: import("@angular/core").OutputEmitterRef<IInputCalculatorFunctionControlEvent>;
|
|
27
|
+
ngOnInit(): void;
|
|
28
|
+
get FunctionsControl(): IInputCalculatorFunctionControlEvent;
|
|
29
|
+
protected handlerClick(event: Event, button: '+' | '-' | '*' | '/' | 'c' | '.' | '(' | ')' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'): void;
|
|
30
|
+
private updateExpressions;
|
|
31
|
+
protected handlerEventKeyUpInput(event: Event): void;
|
|
32
|
+
protected handlerEventKeyInput(event: Event): void;
|
|
33
|
+
protected handlerFocusAndBlurInput(index: number | undefined): void;
|
|
34
|
+
protected handlerClickInput(event: Event): void;
|
|
35
|
+
protected handlerSave(event: Event): void;
|
|
36
|
+
protected handlerSelectedField(event: IListDataEmitMultiKey | undefined, index: number): void;
|
|
37
|
+
protected handlerFunctionControlButton(event: IPopoverFunctionControlEvent, index: number): void;
|
|
38
|
+
private validate;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsInputsCalculatorComponent, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsInputsCalculatorComponent, "libs_ui-components-inputs-calculator", never, { "expressions": { "alias": "expressions"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "labelButtonSave": { "alias": "labelButtonSave"; "required": false; "isSignal": true; }; "configField": { "alias": "configField"; "required": false; "isSignal": true; }; "ignoreButtonSave": { "alias": "ignoreButtonSave"; "required": false; "isSignal": true; }; "classInclude": { "alias": "classInclude"; "required": false; "isSignal": true; }; "classContainerInput": { "alias": "classContainerInput"; "required": false; "isSignal": true; }; "classContainerButton": { "alias": "classContainerButton"; "required": false; "isSignal": true; }; "validRequired": { "alias": "validRequired"; "required": false; "isSignal": true; }; }, { "outChangeExpressions": "outChangeExpressions"; "outFunctionControl": "outFunctionControl"; }, never, never, true, never>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input, output, signal, viewChildren } from '@angular/core';
|
|
2
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
3
|
+
import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
|
|
4
|
+
import { LibsUiComponentsListComponent } from '@libs-ui/components-list';
|
|
5
|
+
import { cloneDeep, UtilsKeyCodeConstant } from '@libs-ui/utils';
|
|
6
|
+
import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
|
|
7
|
+
import { LibsUiComponentsInputsCalculatorGetFieldSelectedPipe } from './pipes/get-field-selected.pipe';
|
|
8
|
+
import { LibsUiComponentsInputsCalculatorGetWidthInputPipe } from './pipes/get-width-input.pipe';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
import * as i1 from "@ngx-translate/core";
|
|
11
|
+
export class LibsUiComponentsInputsCalculatorComponent {
|
|
12
|
+
indexFocus = signal(undefined);
|
|
13
|
+
isFocus = signal(false);
|
|
14
|
+
listExpressions = signal([]);
|
|
15
|
+
isChangeExpression = signal(false);
|
|
16
|
+
error = signal(undefined);
|
|
17
|
+
inputRef = viewChildren('inputRef');
|
|
18
|
+
timeOut = signal(undefined);
|
|
19
|
+
tooltipFunctionControl = signal(new Map());
|
|
20
|
+
expressions = input([]);
|
|
21
|
+
zIndex = input(10);
|
|
22
|
+
placeholder = input('i18n_enter_params');
|
|
23
|
+
labelButtonSave = input('i18n_save_calculation');
|
|
24
|
+
configField = input();
|
|
25
|
+
ignoreButtonSave = input(false);
|
|
26
|
+
classInclude = input('', { transform: (value) => value || '' });
|
|
27
|
+
classContainerInput = input('', { transform: (value) => value || '' });
|
|
28
|
+
classContainerButton = input('', { transform: (value) => value || '' });
|
|
29
|
+
validRequired = input();
|
|
30
|
+
outChangeExpressions = output();
|
|
31
|
+
outFunctionControl = output();
|
|
32
|
+
ngOnInit() {
|
|
33
|
+
this.listExpressions.set(cloneDeep(this.expressions()));
|
|
34
|
+
this.outFunctionControl.emit(this.FunctionsControl);
|
|
35
|
+
}
|
|
36
|
+
get FunctionsControl() {
|
|
37
|
+
return {
|
|
38
|
+
checkIsValid: this.validate.bind(this),
|
|
39
|
+
getData: () => {
|
|
40
|
+
return cloneDeep(this.listExpressions());
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
handlerClick(event, button) {
|
|
45
|
+
event.stopPropagation();
|
|
46
|
+
const expression = { type: 'field', data: button };
|
|
47
|
+
if (button === 'c') {
|
|
48
|
+
if (!this.listExpressions().length || this.indexFocus() === 0) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
return this.updateExpressions(undefined, typeof this.indexFocus() !== 'undefined' ? (this.indexFocus() || 1) - 1 : this.listExpressions().length - 1);
|
|
52
|
+
}
|
|
53
|
+
switch (button) {
|
|
54
|
+
case '+':
|
|
55
|
+
case '-':
|
|
56
|
+
case '*':
|
|
57
|
+
case '/':
|
|
58
|
+
expression.type = 'operation';
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
expression.type = 'value';
|
|
62
|
+
}
|
|
63
|
+
this.updateExpressions(expression, typeof this.indexFocus() !== 'undefined' ? this.indexFocus() || 0 : this.listExpressions().length);
|
|
64
|
+
}
|
|
65
|
+
updateExpressions(item, position, isDelete) {
|
|
66
|
+
this.isChangeExpression.set(true);
|
|
67
|
+
this.listExpressions.update((value) => {
|
|
68
|
+
if (item) {
|
|
69
|
+
value.splice(position || 0, 0, item);
|
|
70
|
+
}
|
|
71
|
+
if (!item) {
|
|
72
|
+
value.splice(position || 0, 1);
|
|
73
|
+
}
|
|
74
|
+
return [...value];
|
|
75
|
+
});
|
|
76
|
+
this.indexFocus.update((value) => {
|
|
77
|
+
if (!item) {
|
|
78
|
+
if (value) {
|
|
79
|
+
value = isDelete ? value : value - 1;
|
|
80
|
+
}
|
|
81
|
+
return value ? value : position;
|
|
82
|
+
}
|
|
83
|
+
if (typeof value === 'undefined') {
|
|
84
|
+
value = this.listExpressions().length;
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
value++;
|
|
88
|
+
return value;
|
|
89
|
+
});
|
|
90
|
+
const indexFocus = this.indexFocus();
|
|
91
|
+
setTimeout(() => {
|
|
92
|
+
if (typeof indexFocus !== 'undefined') {
|
|
93
|
+
this.inputRef()[indexFocus]?.nativeElement.focus();
|
|
94
|
+
}
|
|
95
|
+
}, 100);
|
|
96
|
+
this.validate();
|
|
97
|
+
}
|
|
98
|
+
handlerEventKeyUpInput(event) {
|
|
99
|
+
const keyCode = event.keyCode;
|
|
100
|
+
const value = event.target.value;
|
|
101
|
+
const shiftKey = event.shiftKey;
|
|
102
|
+
if ((([UtilsKeyCodeConstant.EQUALS, UtilsKeyCodeConstant.EIGHT].includes(keyCode) && shiftKey) || ([UtilsKeyCodeConstant.DASH, UtilsKeyCodeConstant.SLASH].includes(keyCode) && !shiftKey)) && value.length === 1) {
|
|
103
|
+
event.target.value = '';
|
|
104
|
+
return this.updateExpressions({ type: 'operation', data: value }, this.indexFocus() || this.listExpressions().length);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
handlerEventKeyInput(event) {
|
|
108
|
+
const keyCode = event.keyCode;
|
|
109
|
+
const value = event.target.value;
|
|
110
|
+
if (keyCode === UtilsKeyCodeConstant.BACKSPACE) {
|
|
111
|
+
if (!value && this.listExpressions().length && (this.indexFocus() || 0) > 0) {
|
|
112
|
+
return this.updateExpressions(undefined, (this.indexFocus() || 0) - 1);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (keyCode === UtilsKeyCodeConstant.DELETE) {
|
|
116
|
+
if (!value && this.listExpressions().length && (this.indexFocus() || 0) < this.listExpressions().length) {
|
|
117
|
+
return this.updateExpressions(undefined, this.indexFocus() || 0, true);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (keyCode === UtilsKeyCodeConstant.ENTER) {
|
|
121
|
+
if (value) {
|
|
122
|
+
event.target.value = '';
|
|
123
|
+
return this.updateExpressions({ type: 'value', data: value }, this.indexFocus() || this.listExpressions().length);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
handlerFocusAndBlurInput(index) {
|
|
128
|
+
if (typeof index !== 'undefined') {
|
|
129
|
+
this.indexFocus.set(index);
|
|
130
|
+
this.isFocus.set(true);
|
|
131
|
+
clearTimeout(this.timeOut());
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.timeOut.set(setTimeout(() => {
|
|
135
|
+
this.isFocus.set(false);
|
|
136
|
+
}, 250));
|
|
137
|
+
}
|
|
138
|
+
handlerClickInput(event) {
|
|
139
|
+
event.stopPropagation();
|
|
140
|
+
if (!this.isFocus()) {
|
|
141
|
+
this.inputRef()[this.inputRef().length - 1].nativeElement.focus();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
handlerSave(event) {
|
|
145
|
+
event.stopPropagation();
|
|
146
|
+
this.isChangeExpression.set(false);
|
|
147
|
+
this.outChangeExpressions.emit(cloneDeep(this.listExpressions()));
|
|
148
|
+
}
|
|
149
|
+
handlerSelectedField(event, index) {
|
|
150
|
+
if (!event?.keys.length) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (index >= 0) {
|
|
154
|
+
this.listExpressions.update((value) => {
|
|
155
|
+
value.forEach((item, i) => {
|
|
156
|
+
if (i === index) {
|
|
157
|
+
if (item.data !== event.keys[0]) {
|
|
158
|
+
this.tooltipFunctionControl().get(index)?.removePopoverOverlay();
|
|
159
|
+
}
|
|
160
|
+
item.data = event.keys[0];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
return [...value];
|
|
164
|
+
});
|
|
165
|
+
this.isChangeExpression.set(true);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this.updateExpressions({ type: 'field', data: event.keys[0] }, typeof this.indexFocus() !== 'undefined' ? this.indexFocus() || 0 : this.listExpressions().length);
|
|
169
|
+
this.tooltipFunctionControl().get(index)?.removePopoverOverlay();
|
|
170
|
+
}
|
|
171
|
+
handlerFunctionControlButton(event, index) {
|
|
172
|
+
this.tooltipFunctionControl.update((value) => {
|
|
173
|
+
value.set(index, event);
|
|
174
|
+
return value;
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
async validate() {
|
|
178
|
+
this.error.set(undefined);
|
|
179
|
+
if (!this.validRequired() || !this.validRequired()?.message) {
|
|
180
|
+
return true;
|
|
181
|
+
}
|
|
182
|
+
if (!this.listExpressions().length) {
|
|
183
|
+
this.error.set({ message: this.validRequired()?.message });
|
|
184
|
+
}
|
|
185
|
+
return this.listExpressions().length ? true : false;
|
|
186
|
+
}
|
|
187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
188
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsInputsCalculatorComponent, isStandalone: true, selector: "libs_ui-components-inputs-calculator", inputs: { expressions: { classPropertyName: "expressions", publicName: "expressions", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, labelButtonSave: { classPropertyName: "labelButtonSave", publicName: "labelButtonSave", isSignal: true, isRequired: false, transformFunction: null }, configField: { classPropertyName: "configField", publicName: "configField", isSignal: true, isRequired: false, transformFunction: null }, ignoreButtonSave: { classPropertyName: "ignoreButtonSave", publicName: "ignoreButtonSave", isSignal: true, isRequired: false, transformFunction: null }, classInclude: { classPropertyName: "classInclude", publicName: "classInclude", isSignal: true, isRequired: false, transformFunction: null }, classContainerInput: { classPropertyName: "classContainerInput", publicName: "classContainerInput", isSignal: true, isRequired: false, transformFunction: null }, classContainerButton: { classPropertyName: "classContainerButton", publicName: "classContainerButton", isSignal: true, isRequired: false, transformFunction: null }, validRequired: { classPropertyName: "validRequired", publicName: "validRequired", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outChangeExpressions: "outChangeExpressions", outFunctionControl: "outFunctionControl" }, viewQueries: [{ propertyName: "inputRef", predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"w-full\">\n <div class=\"p-[8px] rounded-[12px] bg-[#f8f9fa] {{ classInclude() }}\">\n <div class=\"mb-[8px] {{ classContainerInput() }}\">\n <div\n #calculatorInput\n class=\"py-[10px] px-[12px] libs-ui-font-h5r rounded-[8px] bg-[#ffffff] min-h-[160px] h-full border-[1px] {{ error()?.message ? 'libs-ui-border-error-general' : isFocus() ? 'border-[var(--libs-ui-color-light-1)]' : 'border-[#ffffff]' }}\"\n (mouseup)=\"handlerClickInput($event)\">\n <ul class=\"before:content-[''] before:table after:content-[''] after:table after:clear-both\">\n @for (item of listExpressions(); track $index; let i = $index) {\n <li class=\"float-left mb-[8px]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none text-center\"\n [class.ml-[-8px]]=\"i === 0\"\n [style.width.px]=\"inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(i)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n @switch (item.type) {\n @case ('operation') {\n <li class=\"float-left mb-[8px] text-center w-[24px] h-[24px] rounded-[4px] p-[4px] bg-[var(--libs-ui-color-light-2)]\">\n @switch (item.data) {\n @case ('/') {\n <i class=\"libs-ui-icon-divide text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('-') {\n <i class=\"libs-ui-icon-minus text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('+') {\n <i class=\"libs-ui-icon-add text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('*') {\n <i class=\"libs-ui-icon-close text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n }\n </li>\n }\n @case ('value') {\n <li class=\"float-left mb-[8px] text-center rounded-[4px] h-[24px] px-[8px] bg-[#E6E7EA] flex items-center max-w-[calc(100%-8px)]\">\n <libs_ui-components-popover [type]=\"'text'\">{{ item.data }}</libs_ui-components-popover>\n </li>\n }\n @case ('field') {\n @if ({ fieldSelected: item.data | LibsUiComponentsInputsCalculatorGetFieldSelectedPipe: configField()?.getFieldSelected }; as data) {\n <li class=\"float-left mb-[8px]\">\n <libs_ui-components-buttons-button\n class=\"max-w-[172px] block\"\n [label]=\"data.fieldSelected?.name || 'i18n_field_error'\"\n [classInclude]=\"'!justify-center !py-[2px] !px-[7px] !w-full'\"\n [classIconLeft]=\"data.fieldSelected?.icon || 'libs-ui-icon-tooltip-outline'\"\n [classIconRight]=\"'libs-ui-icon-move-right rotate-90'\"\n [classLabel]=\"'libs-ui-font-h5r'\"\n [zIndex]=\"zIndex()\"\n [type]=\"data.fieldSelected ? 'button-primary' : 'button-danger-high'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: false,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: i, key: item.data },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, i)\" />\n </li>\n }\n }\n }\n }\n <li class=\"float-left mb-[8px] max-w-[100%]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none max-w-[100%] {{ listExpressions().length ? 'text-center' : '' }}\"\n [style.width.px]=\"listExpressions().length ? (inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput) : 150\"\n [placeholder]=\"!listExpressions().length ? (placeholder() | translate) : ''\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(listExpressions().length)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n </ul>\n </div>\n @if (error()?.message) {\n <div class=\"libs-ui-text-error mt-[8px] libs-ui-font-h7r\">\n @let constHtmlMessage = error()?.message || ' ';\n {{ constHtmlMessage | translate }}\n </div>\n }\n </div>\n <div class=\"grid grid-cols-4 gap-[8px] {{ classContainerButton() }}\">\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"configField()?.label || 'i18n_select_field'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: true,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: -1 },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, -1)\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-violet'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'Fx'\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-danger-high'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'C'\"\n (outClick)=\"handlerClick($event, 'c')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'('\"\n (outClick)=\"handlerClick($event, '(')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"')'\"\n (outClick)=\"handlerClick($event, ')')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-divide'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '/')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'1'\"\n (outClick)=\"handlerClick($event, '1')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'2'\"\n (outClick)=\"handlerClick($event, '2')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'3'\"\n (outClick)=\"handlerClick($event, '3')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-close'\"\n (outClick)=\"handlerClick($event, '*')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'4'\"\n (outClick)=\"handlerClick($event, '4')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'5'\"\n (outClick)=\"handlerClick($event, '5')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'6'\"\n (outClick)=\"handlerClick($event, '6')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-minus'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '-')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'7'\"\n (outClick)=\"handlerClick($event, '7')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'8'\"\n (outClick)=\"handlerClick($event, '8')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'9'\"\n (outClick)=\"handlerClick($event, '9')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-add'\"\n (outClick)=\"handlerClick($event, '+')\" />\n </div>\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"'0'\"\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n (outClick)=\"handlerClick($event, '0')\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'.'\"\n (outClick)=\"handlerClick($event, '.')\" />\n </div>\n </div>\n </div>\n @if (!ignoreButtonSave()) {\n <div class=\"mt-[16px]\">\n <libs_ui-components-buttons-button\n [label]=\"labelButtonSave()\"\n [disable]=\"!isChangeExpression()\"\n [classInclude]=\"'justify-center w-full'\"\n (outClick)=\"handlerSave($event)\" />\n </div>\n }\n</div>\n\n<ng-template\n #listViewRef\n let-data=\"itemContext\">\n <libs_ui-components-list\n [zIndex]=\"zIndex()\"\n [config]=\"configField()?.listConfig\"\n [maxItemShow]=\"6\"\n [clickExactly]=\"false\"\n [searchConfig]=\"{ noBorder: true, placeholder: configField()?.placeholderInputList || 'i18n_search' }\"\n [multiKeySelected]=\"data.key ? [data.key] : []\"\n (outSelectMultiKey)=\"handlerSelectedField($event, data.index)\"></libs_ui-components-list>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsListComponent, selector: "libs_ui-components-list", inputs: ["hiddenInputSearch", "dropdownTabKeyActive", "keySearch", "paddingLeftItem", "config", "autoSelectedFirstItemCallOutsideBefore", "isSearchOnline", "disable", "disableLabel", "labelConfig", "searchConfig", "searchPadding", "dividerClassInclude", "hasDivider", "buttonsOther", "hasButtonUnSelectOption", "clickExactly", "backgroundListCustom", "maxItemShow", "keySelected", "multiKeySelected", "keysDisableItem", "keysHiddenItem", "focusInputSearch", "skipFocusInputWhenKeySearchStoreUndefined", "functionGetItemsAutoAddList", "validRequired", "showValidateBottom", "zIndex", "loadingIconSize", "templateRefSearchNoData", "resetKeyWhenSelectAllKeyDropdown", "ignoreClassDisableDefaultWhenUseKeysDisableItem"], outputs: ["outSelectKey", "outSelectMultiKey", "outUnSelectMultiKey", "outClickButtonOther", "outFieldKey", "outChangeView", "outKeySearch", "outLoading", "outFunctionsControl", "outChangStageFlagMousePopover", "outLoadItemsComplete"] }, { kind: "pipe", type: LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, name: "LibsUiComponentsInputsCalculatorGetFieldSelectedPipe" }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "pipe", type: LibsUiComponentsInputsCalculatorGetWidthInputPipe, name: "LibsUiComponentsInputsCalculatorGetWidthInputPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
189
|
+
}
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorComponent, decorators: [{
|
|
191
|
+
type: Component,
|
|
192
|
+
args: [{ selector: 'libs_ui-components-inputs-calculator', standalone: true, imports: [TranslateModule, LibsUiComponentsButtonsButtonComponent, LibsUiComponentsListComponent, LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, LibsUiComponentsPopoverComponent, LibsUiComponentsInputsCalculatorGetWidthInputPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"w-full\">\n <div class=\"p-[8px] rounded-[12px] bg-[#f8f9fa] {{ classInclude() }}\">\n <div class=\"mb-[8px] {{ classContainerInput() }}\">\n <div\n #calculatorInput\n class=\"py-[10px] px-[12px] libs-ui-font-h5r rounded-[8px] bg-[#ffffff] min-h-[160px] h-full border-[1px] {{ error()?.message ? 'libs-ui-border-error-general' : isFocus() ? 'border-[var(--libs-ui-color-light-1)]' : 'border-[#ffffff]' }}\"\n (mouseup)=\"handlerClickInput($event)\">\n <ul class=\"before:content-[''] before:table after:content-[''] after:table after:clear-both\">\n @for (item of listExpressions(); track $index; let i = $index) {\n <li class=\"float-left mb-[8px]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none text-center\"\n [class.ml-[-8px]]=\"i === 0\"\n [style.width.px]=\"inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(i)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n @switch (item.type) {\n @case ('operation') {\n <li class=\"float-left mb-[8px] text-center w-[24px] h-[24px] rounded-[4px] p-[4px] bg-[var(--libs-ui-color-light-2)]\">\n @switch (item.data) {\n @case ('/') {\n <i class=\"libs-ui-icon-divide text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('-') {\n <i class=\"libs-ui-icon-minus text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('+') {\n <i class=\"libs-ui-icon-add text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('*') {\n <i class=\"libs-ui-icon-close text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n }\n </li>\n }\n @case ('value') {\n <li class=\"float-left mb-[8px] text-center rounded-[4px] h-[24px] px-[8px] bg-[#E6E7EA] flex items-center max-w-[calc(100%-8px)]\">\n <libs_ui-components-popover [type]=\"'text'\">{{ item.data }}</libs_ui-components-popover>\n </li>\n }\n @case ('field') {\n @if ({ fieldSelected: item.data | LibsUiComponentsInputsCalculatorGetFieldSelectedPipe: configField()?.getFieldSelected }; as data) {\n <li class=\"float-left mb-[8px]\">\n <libs_ui-components-buttons-button\n class=\"max-w-[172px] block\"\n [label]=\"data.fieldSelected?.name || 'i18n_field_error'\"\n [classInclude]=\"'!justify-center !py-[2px] !px-[7px] !w-full'\"\n [classIconLeft]=\"data.fieldSelected?.icon || 'libs-ui-icon-tooltip-outline'\"\n [classIconRight]=\"'libs-ui-icon-move-right rotate-90'\"\n [classLabel]=\"'libs-ui-font-h5r'\"\n [zIndex]=\"zIndex()\"\n [type]=\"data.fieldSelected ? 'button-primary' : 'button-danger-high'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: false,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: i, key: item.data },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, i)\" />\n </li>\n }\n }\n }\n }\n <li class=\"float-left mb-[8px] max-w-[100%]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none max-w-[100%] {{ listExpressions().length ? 'text-center' : '' }}\"\n [style.width.px]=\"listExpressions().length ? (inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput) : 150\"\n [placeholder]=\"!listExpressions().length ? (placeholder() | translate) : ''\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(listExpressions().length)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n </ul>\n </div>\n @if (error()?.message) {\n <div class=\"libs-ui-text-error mt-[8px] libs-ui-font-h7r\">\n @let constHtmlMessage = error()?.message || ' ';\n {{ constHtmlMessage | translate }}\n </div>\n }\n </div>\n <div class=\"grid grid-cols-4 gap-[8px] {{ classContainerButton() }}\">\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"configField()?.label || 'i18n_select_field'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: true,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: -1 },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, -1)\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-violet'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'Fx'\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-danger-high'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'C'\"\n (outClick)=\"handlerClick($event, 'c')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'('\"\n (outClick)=\"handlerClick($event, '(')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"')'\"\n (outClick)=\"handlerClick($event, ')')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-divide'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '/')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'1'\"\n (outClick)=\"handlerClick($event, '1')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'2'\"\n (outClick)=\"handlerClick($event, '2')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'3'\"\n (outClick)=\"handlerClick($event, '3')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-close'\"\n (outClick)=\"handlerClick($event, '*')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'4'\"\n (outClick)=\"handlerClick($event, '4')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'5'\"\n (outClick)=\"handlerClick($event, '5')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'6'\"\n (outClick)=\"handlerClick($event, '6')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-minus'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '-')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'7'\"\n (outClick)=\"handlerClick($event, '7')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'8'\"\n (outClick)=\"handlerClick($event, '8')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'9'\"\n (outClick)=\"handlerClick($event, '9')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-add'\"\n (outClick)=\"handlerClick($event, '+')\" />\n </div>\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"'0'\"\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n (outClick)=\"handlerClick($event, '0')\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'.'\"\n (outClick)=\"handlerClick($event, '.')\" />\n </div>\n </div>\n </div>\n @if (!ignoreButtonSave()) {\n <div class=\"mt-[16px]\">\n <libs_ui-components-buttons-button\n [label]=\"labelButtonSave()\"\n [disable]=\"!isChangeExpression()\"\n [classInclude]=\"'justify-center w-full'\"\n (outClick)=\"handlerSave($event)\" />\n </div>\n }\n</div>\n\n<ng-template\n #listViewRef\n let-data=\"itemContext\">\n <libs_ui-components-list\n [zIndex]=\"zIndex()\"\n [config]=\"configField()?.listConfig\"\n [maxItemShow]=\"6\"\n [clickExactly]=\"false\"\n [searchConfig]=\"{ noBorder: true, placeholder: configField()?.placeholderInputList || 'i18n_search' }\"\n [multiKeySelected]=\"data.key ? [data.key] : []\"\n (outSelectMultiKey)=\"handlerSelectedField($event, data.index)\"></libs_ui-components-list>\n</ng-template>\n" }]
|
|
193
|
+
}] });
|
|
194
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsY3VsYXRvci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvaW5wdXRzL2NhbGN1bGF0b3Ivc3JjL2NhbGN1bGF0b3IuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL2lucHV0cy9jYWxjdWxhdG9yL3NyYy9jYWxjdWxhdG9yLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQWMsS0FBSyxFQUFVLE1BQU0sRUFBRSx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AgICAgICAgICAgPC9saT5cbiAgICAgICAgICAgIEBzd2l0Y2ggKGl0ZW0udHlwZSkge1xuICAgICAgICAgICAgICBAY2FzZSAoJ29wZXJhdGlvbicpIHtcbiAgICAgICAgICAgICAgICA8bGkgY2xhc3M9XCJmbG9hdC1sZWZ0IG1iLVs4cHhdIHRleHQtY2VudGVyIHctWzI0cHhdIGgtWzI0cHhdIHJvdW5kZWQtWzRweF0gcC1bNHB4XSBiZy1bdmFyKC0tbGlicy11aS1jb2xvci1saWdodC0yKV1cIj5cbiAgICAgICAgICAgICAgICAgIEBzd2l0Y2ggKGl0ZW0uZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICBAY2FzZSAoJy8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgPGkgY2xhc3M9XCJsaWJzLXVpLWljb24tZGl2aWRlIHRleHQtWzE2cHhdIGJlZm9yZTohdGV4dC1bdmFyKC0tbGlicy11aS1jb2xvci1kZWZhdWx0KV1cIj48L2k+XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgQGNhc2UgKCctJykge1xuICAgICAgICAgICAgICAgICAgICAgIDxpIGNsYXNzPVwibGlicy11aS1pY29uLW1pbnVzIHRleHQtWzE2cHhdIGJlZm9yZTohdGV4dC1bdmFyKC0tbGlicy11aS1jb2xvci1kZWZhdWx0KV1cIj48L2k+XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgQGNhc2UgKCcrJykge1xuICAgICAgICAgICAgICAgICAgICAgIDxpIGNsYXNzPVwibGlicy11aS1pY29uLWFkZCB0ZXh0LVsxNnB4XSBiZWZvcmU6IXRleHQtW3ZhcigtLWxpYnMtdWktY29sb3ItZGVmYXVsdCldXCI+PC9pPlxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIEBjYXNlICgnKicpIHtcbiAgICAgICAgICAgICAgICAgICAgICA8aSBjbGFzcz1cImxpYnMtdWktaWNvbi1jbG9zZSB0ZXh0LVsxNnB4XSBiZWZvcmU6IXRleHQtW3ZhcigtLWxpYnMtdWktY29sb3ItZGVmYXVsdCldXCI+PC9pPlxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgPC9saT5cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBAY2FzZSAoJ3ZhbHVlJykge1xuICAgICAgICAgICAgICAgIDxsaSBjbGFzcz1cImZsb2F0LWxlZnQgbWItWzhweF0gdGV4dC1jZW50ZXIgcm91bmRlZC1bNHB4XSBoLVsyNHB4XSBweC1bOHB4XSBiZy1bI0U2RTdFQV0gZmxleCBpdGVtcy1jZW50ZXIgbWF4LXctW2NhbGMoMTAwJS04cHgpXVwiPlxuICAgICAgICAgICAgICAgICAgPGxpYnNfdWktY29tcG9uZW50cy1wb3BvdmVyIFt0eXBlXT1cIid0ZXh0J1wiPnt7IGl0ZW0uZGF0YSB9fTwvbGlic191aS1jb21wb25lbnRzLXBvcG92ZXI+XG4gICAgICAgICAgICAgICAgPC9saT5cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBAY2FzZSAoJ2ZpZWxkJykge1xuICAgICAgICAgICAgICAgIEBpZiAoeyBmaWVsZFNlbGVjdGVkOiBpdGVtLmRhdGEgfCBMaWJzVWlDb21wb25lbnRzSW5wdXRzQ2FsY3VsYXRvckdldEZpZWxkU2VsZWN0ZWRQaXBlOiBjb25maWdGaWVsZCgpPy5nZXRGaWVsZFNlbGVjdGVkIH07IGFzIGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgIDxsaSBjbGFzcz1cImZsb2F0LWxlZnQgbWItWzhweF1cIj5cbiAgICAgICAgICAgICAgICAgICAgPGxpYnNfdWktY29tcG9uZW50cy1idXR0b25zLWJ1dHRvblxuICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwibWF4LXctWzE3MnB4XSBibG9ja1wiXG4gICAgICAgICAgICAgICAgICAgICAgW2xhYmVsXT1cImRhdGEuZmllbGRTZWxlY3RlZD8ubmFtZSB8fCAnaTE4bl9maWVsZF9lcnJvcidcIlxuICAgICAgICAgICAgICAgICAgICAgIFtjbGFzc0luY2x1ZGVdPVwiJyFqdXN0aWZ5LWNlbnRlciAhcHktWzJweF0gIXB4LVs3cHhdICF3LWZ1bGwnXCJcbiAgICAgICAgICAgICAgICAgICAgICBbY2xhc3NJY29uTGVmdF09XCJkYXRhLmZpZWxkU2VsZWN0ZWQ/Lmljb24gfHwgJ2xpYnMtdWktaWNvbi10b29sdGlwLW91dGxpbmUnXCJcbiAgICAgICAgICAgICAgICAgICAgICBbY2xhc3NJY29uUmlnaHRdPVwiJ2xpYnMtdWktaWNvbi1tb3ZlLXJpZ2h0IHJvdGF0ZS05MCdcIlxuICAgICAgICAgICAgICAgICAgICAgIFtjbGFzc0xhYmVsXT1cIidsaWJzLXVpLWZvbnQtaDVyJ1wiXG4gICAgICAgICAgICAgICAgICAgICAgW3pJbmRleF09XCJ6SW5kZXgoKVwiXG4gICAgICAgICAgICAgICAgICAgICAgW3R5cGVdPVwiZGF0YS5maWVsZFNlbGVjdGVkID8gJ2J1dHRvbi1wcmltYXJ5JyA6ICdidXR0b24tZGFuZ2VyLWhpZ2gnXCJcbiAgICAgICAgICAgICAgICAgICAgICBbcG9wb3Zlcl09XCJ7XG4gICAgICAgICAgICAgICAgICAgICAgICBtb2RlOiAnY2xpY2stdG9nZ2xlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlnbm9yZUhpZGRlblBvcG92ZXJDb250ZW50V2hlbk1vdXNlTGVhdmU6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgekluZGV4OiB6SW5kZXgoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgYW5pbWF0aW9uQ29uZmlnOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGhCeVBhcmVudDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudEJvcmRlcldpZHRoOiAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhIZWlnaHQ6IDIwNDgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG1heFdpZHRoOiAyMDQ4LFxuICAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3Rpb246ICdib3R0b20nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBkaXJlY3Rpb25EaXN0YW5jZTogMixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGU6IGxpc3RWaWV3UmVmLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtQ29udGV4dDogeyBpbmRleDogaSwga2V5OiBpdGVtLmRhdGEgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpdGVUaGVtZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaWdub3JlQXJyb3c6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzSW5jbHVkZTogJyFyb3VuZGVkLVs0cHhdICF3LVsyNzJweF0nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogeyBtb2RlOiAnc3RhcnQnLCBkaXN0YW5jZTogMCB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICB9XCJcbiAgICAgICAgICAgICAgICAgICAgICAob3V0RnVuY3Rpb25zQ29udHJvbCk9XCJoYW5kbGVyRnVuY3Rpb25Db250cm9sQnV0dG9uKCRldmVudCwgaSlcIiAvPlxuICAgICAgICAgICAgICAgICAgPC9saT5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgPGxpIGNsYXNzPVwiZmxvYXQtbGVmdCBtYi1bOHB4XSBtYXgtdy1bMTAwJV1cIj5cbiAgICAg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ZXJDbGljaygkZXZlbnQsICc1JylcIiAvPlxuICAgICAgPC9kaXY+XG4gICAgICA8ZGl2IGNsYXNzPVwiY29sLVszXVwiPlxuICAgICAgICA8bGlic191aS1jb21wb25lbnRzLWJ1dHRvbnMtYnV0dG9uXG4gICAgICAgICAgW3R5cGVdPVwiJ2J1dHRvbi10aGlyZCdcIlxuICAgICAgICAgIFtjbGFzc0luY2x1ZGVdPVwiJyF3LWZ1bGwgIWp1c3RpZnktY2VudGVyJ1wiXG4gICAgICAgICAgW2xhYmVsXT1cIic2J1wiXG4gICAgICAgICAgKG91dENsaWNrKT1cImhhbmRsZXJDbGljaygkZXZlbnQsICc2JylcIiAvPlxuICAgICAgPC9kaXY+XG4gICAgICA8ZGl2IGNsYXNzPVwiY29sLVs0XVwiPlxuICAgICAgICA8bGlic191aS1jb21wb25lbnRzLWJ1dHRvbnMtYnV0dG9uXG4gICAgICAgICAgW3R5cGVdPVwiJ2J1dHRvbi1zZWNvbmRhcnknXCJcbiAgICAgICAgICBbY2xhc3NJbmNsdWRlXT1cIichdy1mdWxsICFqdXN0aWZ5LWNlbnRlcidcIlxuICAgICAgICAgIFtjbGFzc0ljb25MZWZ0XT1cIidsaWJzLXVpLWljb24tbWludXMnXCJcbiAgICAgICAgICBbaWNvbk9ubHlUeXBlXT1cInRydWVcIlxuICAgICAgICAgIChvdXRDbGljayk9XCJoYW5kbGVyQ2xpY2soJGV2ZW50LCAnLScpXCIgLz5cbiAgICAgIDwvZGl2PlxuICAgICAgPGRpdiBjbGFzcz1cImNvbC1bMV1cIj5cbiAgICAgICAgPGxpYnNfdWktY29tcG9uZW50cy1idXR0b25zLWJ1dHRvblxuICAgICAgICAgIFt0eXBlXT1cIididXR0b24tdGhpcmQnXCJcbiAgICAgICAgICBbY2xhc3NJbmNsdWRlXT1cIichdy1mdWxsICFqdXN0aWZ5LWNlbnRlcidcIlxuICAgICAgICAgIFtsYWJlbF09XCInNydcIlxuICAgICAgICAgIChvdXRDbGljayk9XCJoYW5kbGVyQ2xpY2soJGV2ZW50LCAnNycpXCIgLz5cbiAgICAgIDwvZGl2PlxuICAgICAgPGRpdiBjbGFzcz1cImNvbC1bMl1cIj5cbiAgICAgICAgPGxpYnNfdWktY29tcG9uZW50cy1idXR0b25zLWJ1dHRvblxuICAgICAgICAgIFt0eXBlXT1cIididXR0b24tdGhpcmQnXCJcbiAgICAgICAgICBbY2xhc3NJbmNsdWRlXT1cIichdy1mdWxsICFqdXN0aWZ5LWNlbnRlcidcIlxuICAgICAgICAgIFtsYWJlbF09XCInOCdcIlxuICAgICAgICAgIChvdXRDbGljayk9XCJoYW5kbGVyQ2xpY2soJGV2ZW50LCAnOCcpXCIgLz5cbiAgICAgIDwvZGl2PlxuICAgICAgPGRpdiBjbGFzcz1cImNvbC1bM11cIj5cbiAgICAgICAgPGxpYnNfdWktY29tcG9uZW50cy1idXR0b25zLWJ1dHRvblxuICAgICAgICAgIFt0eXBlXT1cIididXR0b24tdGhpcmQnXCJcbiAgICAgICAgICBbY2xhc3NJbmNsdWRlXT1cIichdy1mdWxsICFqdXN0aWZ5LWNlbnRlcidcIlxuICAgICAgICAgIFtsYWJlbF09XCInOSdcIlxuICAgICAgICAgIChvdXRDbGljayk9XCJoYW5kbGVyQ2xpY2soJGV2ZW50LCAnOScpXCIgLz5cbiAgICAgIDwvZGl2PlxuICAgICAgPGRpdiBjbGFzcz1cImNvbC1bNF1cIj5cbiAgICAgICAgPGxpYnNfdWktY29tcG9uZW50cy1idXR0b25zLWJ1dHRvblxuICAgICAgICAgIFt0eXBlXT1cIididXR0b24tc2Vjb25kYXJ5J1wiXG4gICAgICAgICAgW2NsYXNzSW5jbHVkZV09XCInIXctZnVsbCAhanVzdGlmeS1jZW50ZXInXCJcbiAgICAgICAgICBbaWNvbk9ubHlUeXBlXT1cInRydWVcIlxuICAgICAgICAgIFtjbGFzc0ljb25MZWZ0XT1cIidsaWJzLXVpLWljb24tYWRkJ1wiXG4gICAgICAgICAgKG91dENsaWNrKT1cIm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gICAgICAgKG91dENsaWNrKT1cImhhbmRsZXJTYXZlKCRldmVudClcIiAvPlxuICAgIDwvZGl2PlxuICB9XG48L2Rpdj5cblxuPG5nLXRlbXBsYXRlXG4gICNsaXN0Vmlld1JlZlxuICBsZXQtZGF0YT1cIml0ZW1Db250ZXh0XCI+XG4gIDxsaWJzX3VpLWNvbXBvbmVudHMtbGlzdFxuICAgIFt6SW5kZXhdPVwiekluZGV4KClcIlxuICAgIFtjb25maWddPVwiY29uZmlnRmllbGQoKT8ubGlzdENvbmZpZ1wiXG4gICAgW21heEl0ZW1TaG93XT1cIjZcIlxuICAgIFtjbGlja0V4YWN0bHldPVwiZmFsc2VcIlxuICAgIFtzZWFyY2hDb25maWddPVwieyBub0JvcmRlcjogdHJ1ZSwgcGxhY2Vob2xkZXI6IGNvbmZpZ0ZpZWxkKCk/LnBsYWNlaG9sZGVySW5wdXRMaXN0IHx8ICdpMThuX3NlYXJjaCcgfVwiXG4gICAgW211bHRpS2V5U2VsZWN0ZWRdPVwiZGF0YS5rZXkgPyBbZGF0YS5rZXldIDogW11cIlxuICAgIChvdXRTZWxlY3RNdWx0aUtleSk9XCJoYW5kbGVyU2VsZWN0ZWRGaWVsZCgkZXZlbnQsIGRhdGEuaW5kZXgpXCI+PC9saWJzX3VpLWNvbXBvbmVudHMtbGlzdD5cbjwvbmctdGVtcGxhdGU+XG4iXX0=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './calculator.component';
|
|
2
|
+
export * from './interfaces';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvaW5wdXRzL2NhbGN1bGF0b3Ivc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NhbGN1bGF0b3IuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vaW50ZXJmYWNlcyc7XG4iXX0=
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './input-calculation.interface';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvaW5wdXRzL2NhbGN1bGF0b3Ivc3JjL2ludGVyZmFjZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywrQkFBK0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vaW5wdXQtY2FsY3VsYXRpb24uaW50ZXJmYWNlJztcbiJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtY2FsY3VsYXRpb24uaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL2lucHV0cy9jYWxjdWxhdG9yL3NyYy9pbnRlcmZhY2VzL2lucHV0LWNhbGN1bGF0aW9uLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSUxpc3RDb25maWdJdGVtIH0gZnJvbSAnQGxpYnMtdWkvY29tcG9uZW50cy1saXN0JztcblxuZXhwb3J0IGludGVyZmFjZSBJSW5wdXRDYWxjdWxhdG9yRXhwcmVzc2lvbiB7XG4gIHR5cGU6ICd2YWx1ZScgfCAnZmllbGQnIHwgJ29wZXJhdGlvbic7XG4gIGRhdGE6IHN0cmluZyB8IG51bWJlcjtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBJSW5wdXRDYWxjdWxhdG9yRmllbGQge1xuICBrZXk/OiBzdHJpbmc7XG4gIG5hbWU/OiBzdHJpbmc7XG4gIGljb24/OiBzdHJpbmc7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSUlucHV0Q2FsY3VsYXRvckNvbmZpZ0ZpZWxkIHtcbiAgbGFiZWw/OiBzdHJpbmc7XG4gIHBsYWNlaG9sZGVySW5wdXRMaXN0Pzogc3RyaW5nO1xuICBsaXN0Q29uZmlnOiBJTGlzdENvbmZpZ0l0ZW07XG4gIGdldEZpZWxkU2VsZWN0ZWQ6IChmaWVsZDogc3RyaW5nKSA9PiBJSW5wdXRDYWxjdWxhdG9yRmllbGQgfCB1bmRlZmluZWQ7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSUlucHV0Q2FsY3VsYXRvclZhbGlkIHtcbiAgbWVzc2FnZT86IHN0cmluZztcbn1cblxuZXhwb3J0IGludGVyZmFjZSBJSW5wdXRDYWxjdWxhdG9yRnVuY3Rpb25Db250cm9sRXZlbnQge1xuICBjaGVja0lzVmFsaWQ6ICgpID0+IFByb21pc2U8Ym9vbGVhbj47XG4gIGdldERhdGE6ICgpID0+IEFycmF5PElJbnB1dENhbGN1bGF0b3JFeHByZXNzaW9uPjtcbn1cbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlicy11aS1jb21wb25lbnRzLWlucHV0cy1jYWxjdWxhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy11aS9jb21wb25lbnRzL2lucHV0cy9jYWxjdWxhdG9yL3NyYy9saWJzLXVpLWNvbXBvbmVudHMtaW5wdXRzLWNhbGN1bGF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class LibsUiComponentsInputsCalculatorGetFieldSelectedPipe {
|
|
4
|
+
transform(fieldId, getFieldSelected) {
|
|
5
|
+
return getFieldSelected?.(typeof fieldId === 'number' ? fieldId.toString() : fieldId);
|
|
6
|
+
}
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
8
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, isStandalone: true, name: "LibsUiComponentsInputsCalculatorGetFieldSelectedPipe" });
|
|
9
|
+
}
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, decorators: [{
|
|
11
|
+
type: Pipe,
|
|
12
|
+
args: [{
|
|
13
|
+
name: 'LibsUiComponentsInputsCalculatorGetFieldSelectedPipe',
|
|
14
|
+
standalone: true,
|
|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FuZGFsb25lOiB0cnVlLFxufSlcbmV4cG9ydCBjbGFzcyBMaWJzVWlDb21wb25lbnRzSW5wdXRzQ2FsY3VsYXRvckdldEZpZWxkU2VsZWN0ZWRQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG4gIHRyYW5zZm9ybShmaWVsZElkOiBzdHJpbmcgfCBudW1iZXIsIGdldEZpZWxkU2VsZWN0ZWQ/OiAoa2V5OiBzdHJpbmcpID0+IElJbnB1dENhbGN1bGF0b3JGaWVsZCB8IHVuZGVmaW5lZCk6IElJbnB1dENhbGN1bGF0b3JGaWVsZCB8IHVuZGVmaW5lZCB7XG4gICAgcmV0dXJuIGdldEZpZWxkU2VsZWN0ZWQ/Lih0eXBlb2YgZmllbGRJZCA9PT0gJ251bWJlcicgPyBmaWVsZElkLnRvU3RyaW5nKCkgOiBmaWVsZElkKTtcbiAgfVxufVxuIl19
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class LibsUiComponentsInputsCalculatorGetWidthInputPipe {
|
|
4
|
+
transform(text, element) {
|
|
5
|
+
if (!text) {
|
|
6
|
+
return 8;
|
|
7
|
+
}
|
|
8
|
+
const div = document.createElement('span');
|
|
9
|
+
div.textContent = text;
|
|
10
|
+
element.appendChild(div);
|
|
11
|
+
const width = div.offsetWidth + 8;
|
|
12
|
+
div.remove();
|
|
13
|
+
return width;
|
|
14
|
+
}
|
|
15
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetWidthInputPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
16
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetWidthInputPipe, isStandalone: true, name: "LibsUiComponentsInputsCalculatorGetWidthInputPipe" });
|
|
17
|
+
}
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetWidthInputPipe, decorators: [{
|
|
19
|
+
type: Pipe,
|
|
20
|
+
args: [{
|
|
21
|
+
name: 'LibsUiComponentsInputsCalculatorGetWidthInputPipe',
|
|
22
|
+
standalone: true,
|
|
23
|
+
}]
|
|
24
|
+
}] });
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXdpZHRoLWlucHV0LnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvaW5wdXRzL2NhbGN1bGF0b3Ivc3JjL3BpcGVzL2dldC13aWR0aC1pbnB1dC5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDOztBQU1wRCxNQUFNLE9BQU8saURBQWlEO0lBQzVELFNBQVMsQ0FBQyxJQUFZLEVBQUUsT0FBdUI7UUFDN0MsSUFBSSxDQUFDLElBQUksRUFBRSxDQUFDO1lBQ1YsT0FBTyxDQUFDLENBQUM7UUFDWCxDQUFDO1FBQ0QsTUFBTSxHQUFHLEdBQUcsUUFBUSxDQUFDLGFBQWEsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUUzQyxHQUFHLENBQUMsV0FBVyxHQUFHLElBQUksQ0FBQztRQUN2QixPQUFPLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ3pCLE1BQU0sS0FBSyxHQUFHLEdBQUcsQ0FBQyxXQUFXLEdBQUcsQ0FBQyxDQUFDO1FBRWxDLEdBQUcsQ0FBQyxNQUFNLEVBQUUsQ0FBQztRQUViLE9BQU8sS0FBSyxDQUFDO0lBQ2YsQ0FBQzt3R0FkVSxpREFBaUQ7c0dBQWpELGlEQUFpRDs7NEZBQWpELGlEQUFpRDtrQkFKN0QsSUFBSTttQkFBQztvQkFDSixJQUFJLEVBQUUsbURBQW1EO29CQUN6RCxVQUFVLEVBQUUsSUFBSTtpQkFDakIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBQaXBlKHtcbiAgbmFtZTogJ0xpYnNVaUNvbXBvbmVudHNJbnB1dHNDYWxjdWxhdG9yR2V0V2lkdGhJbnB1dFBpcGUnLFxuICBzdGFuZGFsb25lOiB0cnVlLFxufSlcbmV4cG9ydCBjbGFzcyBMaWJzVWlDb21wb25lbnRzSW5wdXRzQ2FsY3VsYXRvckdldFdpZHRoSW5wdXRQaXBlIGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG4gIHRyYW5zZm9ybSh0ZXh0OiBzdHJpbmcsIGVsZW1lbnQ6IEhUTUxEaXZFbGVtZW50KTogbnVtYmVyIHtcbiAgICBpZiAoIXRleHQpIHtcbiAgICAgIHJldHVybiA4O1xuICAgIH1cbiAgICBjb25zdCBkaXYgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzcGFuJyk7XG5cbiAgICBkaXYudGV4dENvbnRlbnQgPSB0ZXh0O1xuICAgIGVsZW1lbnQuYXBwZW5kQ2hpbGQoZGl2KTtcbiAgICBjb25zdCB3aWR0aCA9IGRpdi5vZmZzZXRXaWR0aCArIDg7XG5cbiAgICBkaXYucmVtb3ZlKCk7XG5cbiAgICByZXR1cm4gd2lkdGg7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Pipe, signal, viewChildren, input, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ngx-translate/core';
|
|
4
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
+
import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
|
|
6
|
+
import { LibsUiComponentsListComponent } from '@libs-ui/components-list';
|
|
7
|
+
import { cloneDeep, UtilsKeyCodeConstant } from '@libs-ui/utils';
|
|
8
|
+
import { LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';
|
|
9
|
+
|
|
10
|
+
class LibsUiComponentsInputsCalculatorGetFieldSelectedPipe {
|
|
11
|
+
transform(fieldId, getFieldSelected) {
|
|
12
|
+
return getFieldSelected?.(typeof fieldId === 'number' ? fieldId.toString() : fieldId);
|
|
13
|
+
}
|
|
14
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
15
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, isStandalone: true, name: "LibsUiComponentsInputsCalculatorGetFieldSelectedPipe" });
|
|
16
|
+
}
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, decorators: [{
|
|
18
|
+
type: Pipe,
|
|
19
|
+
args: [{
|
|
20
|
+
name: 'LibsUiComponentsInputsCalculatorGetFieldSelectedPipe',
|
|
21
|
+
standalone: true,
|
|
22
|
+
}]
|
|
23
|
+
}] });
|
|
24
|
+
|
|
25
|
+
class LibsUiComponentsInputsCalculatorGetWidthInputPipe {
|
|
26
|
+
transform(text, element) {
|
|
27
|
+
if (!text) {
|
|
28
|
+
return 8;
|
|
29
|
+
}
|
|
30
|
+
const div = document.createElement('span');
|
|
31
|
+
div.textContent = text;
|
|
32
|
+
element.appendChild(div);
|
|
33
|
+
const width = div.offsetWidth + 8;
|
|
34
|
+
div.remove();
|
|
35
|
+
return width;
|
|
36
|
+
}
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetWidthInputPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
38
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetWidthInputPipe, isStandalone: true, name: "LibsUiComponentsInputsCalculatorGetWidthInputPipe" });
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorGetWidthInputPipe, decorators: [{
|
|
41
|
+
type: Pipe,
|
|
42
|
+
args: [{
|
|
43
|
+
name: 'LibsUiComponentsInputsCalculatorGetWidthInputPipe',
|
|
44
|
+
standalone: true,
|
|
45
|
+
}]
|
|
46
|
+
}] });
|
|
47
|
+
|
|
48
|
+
class LibsUiComponentsInputsCalculatorComponent {
|
|
49
|
+
indexFocus = signal(undefined);
|
|
50
|
+
isFocus = signal(false);
|
|
51
|
+
listExpressions = signal([]);
|
|
52
|
+
isChangeExpression = signal(false);
|
|
53
|
+
error = signal(undefined);
|
|
54
|
+
inputRef = viewChildren('inputRef');
|
|
55
|
+
timeOut = signal(undefined);
|
|
56
|
+
tooltipFunctionControl = signal(new Map());
|
|
57
|
+
expressions = input([]);
|
|
58
|
+
zIndex = input(10);
|
|
59
|
+
placeholder = input('i18n_enter_params');
|
|
60
|
+
labelButtonSave = input('i18n_save_calculation');
|
|
61
|
+
configField = input();
|
|
62
|
+
ignoreButtonSave = input(false);
|
|
63
|
+
classInclude = input('', { transform: (value) => value || '' });
|
|
64
|
+
classContainerInput = input('', { transform: (value) => value || '' });
|
|
65
|
+
classContainerButton = input('', { transform: (value) => value || '' });
|
|
66
|
+
validRequired = input();
|
|
67
|
+
outChangeExpressions = output();
|
|
68
|
+
outFunctionControl = output();
|
|
69
|
+
ngOnInit() {
|
|
70
|
+
this.listExpressions.set(cloneDeep(this.expressions()));
|
|
71
|
+
this.outFunctionControl.emit(this.FunctionsControl);
|
|
72
|
+
}
|
|
73
|
+
get FunctionsControl() {
|
|
74
|
+
return {
|
|
75
|
+
checkIsValid: this.validate.bind(this),
|
|
76
|
+
getData: () => {
|
|
77
|
+
return cloneDeep(this.listExpressions());
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
handlerClick(event, button) {
|
|
82
|
+
event.stopPropagation();
|
|
83
|
+
const expression = { type: 'field', data: button };
|
|
84
|
+
if (button === 'c') {
|
|
85
|
+
if (!this.listExpressions().length || this.indexFocus() === 0) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
return this.updateExpressions(undefined, typeof this.indexFocus() !== 'undefined' ? (this.indexFocus() || 1) - 1 : this.listExpressions().length - 1);
|
|
89
|
+
}
|
|
90
|
+
switch (button) {
|
|
91
|
+
case '+':
|
|
92
|
+
case '-':
|
|
93
|
+
case '*':
|
|
94
|
+
case '/':
|
|
95
|
+
expression.type = 'operation';
|
|
96
|
+
break;
|
|
97
|
+
default:
|
|
98
|
+
expression.type = 'value';
|
|
99
|
+
}
|
|
100
|
+
this.updateExpressions(expression, typeof this.indexFocus() !== 'undefined' ? this.indexFocus() || 0 : this.listExpressions().length);
|
|
101
|
+
}
|
|
102
|
+
updateExpressions(item, position, isDelete) {
|
|
103
|
+
this.isChangeExpression.set(true);
|
|
104
|
+
this.listExpressions.update((value) => {
|
|
105
|
+
if (item) {
|
|
106
|
+
value.splice(position || 0, 0, item);
|
|
107
|
+
}
|
|
108
|
+
if (!item) {
|
|
109
|
+
value.splice(position || 0, 1);
|
|
110
|
+
}
|
|
111
|
+
return [...value];
|
|
112
|
+
});
|
|
113
|
+
this.indexFocus.update((value) => {
|
|
114
|
+
if (!item) {
|
|
115
|
+
if (value) {
|
|
116
|
+
value = isDelete ? value : value - 1;
|
|
117
|
+
}
|
|
118
|
+
return value ? value : position;
|
|
119
|
+
}
|
|
120
|
+
if (typeof value === 'undefined') {
|
|
121
|
+
value = this.listExpressions().length;
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
value++;
|
|
125
|
+
return value;
|
|
126
|
+
});
|
|
127
|
+
const indexFocus = this.indexFocus();
|
|
128
|
+
setTimeout(() => {
|
|
129
|
+
if (typeof indexFocus !== 'undefined') {
|
|
130
|
+
this.inputRef()[indexFocus]?.nativeElement.focus();
|
|
131
|
+
}
|
|
132
|
+
}, 100);
|
|
133
|
+
this.validate();
|
|
134
|
+
}
|
|
135
|
+
handlerEventKeyUpInput(event) {
|
|
136
|
+
const keyCode = event.keyCode;
|
|
137
|
+
const value = event.target.value;
|
|
138
|
+
const shiftKey = event.shiftKey;
|
|
139
|
+
if ((([UtilsKeyCodeConstant.EQUALS, UtilsKeyCodeConstant.EIGHT].includes(keyCode) && shiftKey) || ([UtilsKeyCodeConstant.DASH, UtilsKeyCodeConstant.SLASH].includes(keyCode) && !shiftKey)) && value.length === 1) {
|
|
140
|
+
event.target.value = '';
|
|
141
|
+
return this.updateExpressions({ type: 'operation', data: value }, this.indexFocus() || this.listExpressions().length);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
handlerEventKeyInput(event) {
|
|
145
|
+
const keyCode = event.keyCode;
|
|
146
|
+
const value = event.target.value;
|
|
147
|
+
if (keyCode === UtilsKeyCodeConstant.BACKSPACE) {
|
|
148
|
+
if (!value && this.listExpressions().length && (this.indexFocus() || 0) > 0) {
|
|
149
|
+
return this.updateExpressions(undefined, (this.indexFocus() || 0) - 1);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (keyCode === UtilsKeyCodeConstant.DELETE) {
|
|
153
|
+
if (!value && this.listExpressions().length && (this.indexFocus() || 0) < this.listExpressions().length) {
|
|
154
|
+
return this.updateExpressions(undefined, this.indexFocus() || 0, true);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (keyCode === UtilsKeyCodeConstant.ENTER) {
|
|
158
|
+
if (value) {
|
|
159
|
+
event.target.value = '';
|
|
160
|
+
return this.updateExpressions({ type: 'value', data: value }, this.indexFocus() || this.listExpressions().length);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
handlerFocusAndBlurInput(index) {
|
|
165
|
+
if (typeof index !== 'undefined') {
|
|
166
|
+
this.indexFocus.set(index);
|
|
167
|
+
this.isFocus.set(true);
|
|
168
|
+
clearTimeout(this.timeOut());
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
this.timeOut.set(setTimeout(() => {
|
|
172
|
+
this.isFocus.set(false);
|
|
173
|
+
}, 250));
|
|
174
|
+
}
|
|
175
|
+
handlerClickInput(event) {
|
|
176
|
+
event.stopPropagation();
|
|
177
|
+
if (!this.isFocus()) {
|
|
178
|
+
this.inputRef()[this.inputRef().length - 1].nativeElement.focus();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
handlerSave(event) {
|
|
182
|
+
event.stopPropagation();
|
|
183
|
+
this.isChangeExpression.set(false);
|
|
184
|
+
this.outChangeExpressions.emit(cloneDeep(this.listExpressions()));
|
|
185
|
+
}
|
|
186
|
+
handlerSelectedField(event, index) {
|
|
187
|
+
if (!event?.keys.length) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (index >= 0) {
|
|
191
|
+
this.listExpressions.update((value) => {
|
|
192
|
+
value.forEach((item, i) => {
|
|
193
|
+
if (i === index) {
|
|
194
|
+
if (item.data !== event.keys[0]) {
|
|
195
|
+
this.tooltipFunctionControl().get(index)?.removePopoverOverlay();
|
|
196
|
+
}
|
|
197
|
+
item.data = event.keys[0];
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
return [...value];
|
|
201
|
+
});
|
|
202
|
+
this.isChangeExpression.set(true);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
this.updateExpressions({ type: 'field', data: event.keys[0] }, typeof this.indexFocus() !== 'undefined' ? this.indexFocus() || 0 : this.listExpressions().length);
|
|
206
|
+
this.tooltipFunctionControl().get(index)?.removePopoverOverlay();
|
|
207
|
+
}
|
|
208
|
+
handlerFunctionControlButton(event, index) {
|
|
209
|
+
this.tooltipFunctionControl.update((value) => {
|
|
210
|
+
value.set(index, event);
|
|
211
|
+
return value;
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
async validate() {
|
|
215
|
+
this.error.set(undefined);
|
|
216
|
+
if (!this.validRequired() || !this.validRequired()?.message) {
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
if (!this.listExpressions().length) {
|
|
220
|
+
this.error.set({ message: this.validRequired()?.message });
|
|
221
|
+
}
|
|
222
|
+
return this.listExpressions().length ? true : false;
|
|
223
|
+
}
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
225
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsInputsCalculatorComponent, isStandalone: true, selector: "libs_ui-components-inputs-calculator", inputs: { expressions: { classPropertyName: "expressions", publicName: "expressions", isSignal: true, isRequired: false, transformFunction: null }, zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, labelButtonSave: { classPropertyName: "labelButtonSave", publicName: "labelButtonSave", isSignal: true, isRequired: false, transformFunction: null }, configField: { classPropertyName: "configField", publicName: "configField", isSignal: true, isRequired: false, transformFunction: null }, ignoreButtonSave: { classPropertyName: "ignoreButtonSave", publicName: "ignoreButtonSave", isSignal: true, isRequired: false, transformFunction: null }, classInclude: { classPropertyName: "classInclude", publicName: "classInclude", isSignal: true, isRequired: false, transformFunction: null }, classContainerInput: { classPropertyName: "classContainerInput", publicName: "classContainerInput", isSignal: true, isRequired: false, transformFunction: null }, classContainerButton: { classPropertyName: "classContainerButton", publicName: "classContainerButton", isSignal: true, isRequired: false, transformFunction: null }, validRequired: { classPropertyName: "validRequired", publicName: "validRequired", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outChangeExpressions: "outChangeExpressions", outFunctionControl: "outFunctionControl" }, viewQueries: [{ propertyName: "inputRef", predicate: ["inputRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"w-full\">\n <div class=\"p-[8px] rounded-[12px] bg-[#f8f9fa] {{ classInclude() }}\">\n <div class=\"mb-[8px] {{ classContainerInput() }}\">\n <div\n #calculatorInput\n class=\"py-[10px] px-[12px] libs-ui-font-h5r rounded-[8px] bg-[#ffffff] min-h-[160px] h-full border-[1px] {{ error()?.message ? 'libs-ui-border-error-general' : isFocus() ? 'border-[var(--libs-ui-color-light-1)]' : 'border-[#ffffff]' }}\"\n (mouseup)=\"handlerClickInput($event)\">\n <ul class=\"before:content-[''] before:table after:content-[''] after:table after:clear-both\">\n @for (item of listExpressions(); track $index; let i = $index) {\n <li class=\"float-left mb-[8px]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none text-center\"\n [class.ml-[-8px]]=\"i === 0\"\n [style.width.px]=\"inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(i)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n @switch (item.type) {\n @case ('operation') {\n <li class=\"float-left mb-[8px] text-center w-[24px] h-[24px] rounded-[4px] p-[4px] bg-[var(--libs-ui-color-light-2)]\">\n @switch (item.data) {\n @case ('/') {\n <i class=\"libs-ui-icon-divide text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('-') {\n <i class=\"libs-ui-icon-minus text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('+') {\n <i class=\"libs-ui-icon-add text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('*') {\n <i class=\"libs-ui-icon-close text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n }\n </li>\n }\n @case ('value') {\n <li class=\"float-left mb-[8px] text-center rounded-[4px] h-[24px] px-[8px] bg-[#E6E7EA] flex items-center max-w-[calc(100%-8px)]\">\n <libs_ui-components-popover [type]=\"'text'\">{{ item.data }}</libs_ui-components-popover>\n </li>\n }\n @case ('field') {\n @if ({ fieldSelected: item.data | LibsUiComponentsInputsCalculatorGetFieldSelectedPipe: configField()?.getFieldSelected }; as data) {\n <li class=\"float-left mb-[8px]\">\n <libs_ui-components-buttons-button\n class=\"max-w-[172px] block\"\n [label]=\"data.fieldSelected?.name || 'i18n_field_error'\"\n [classInclude]=\"'!justify-center !py-[2px] !px-[7px] !w-full'\"\n [classIconLeft]=\"data.fieldSelected?.icon || 'libs-ui-icon-tooltip-outline'\"\n [classIconRight]=\"'libs-ui-icon-move-right rotate-90'\"\n [classLabel]=\"'libs-ui-font-h5r'\"\n [zIndex]=\"zIndex()\"\n [type]=\"data.fieldSelected ? 'button-primary' : 'button-danger-high'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: false,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: i, key: item.data },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, i)\" />\n </li>\n }\n }\n }\n }\n <li class=\"float-left mb-[8px] max-w-[100%]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none max-w-[100%] {{ listExpressions().length ? 'text-center' : '' }}\"\n [style.width.px]=\"listExpressions().length ? (inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput) : 150\"\n [placeholder]=\"!listExpressions().length ? (placeholder() | translate) : ''\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(listExpressions().length)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n </ul>\n </div>\n @if (error()?.message) {\n <div class=\"libs-ui-text-error mt-[8px] libs-ui-font-h7r\">\n @let constHtmlMessage = error()?.message || ' ';\n {{ constHtmlMessage | translate }}\n </div>\n }\n </div>\n <div class=\"grid grid-cols-4 gap-[8px] {{ classContainerButton() }}\">\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"configField()?.label || 'i18n_select_field'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: true,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: -1 },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, -1)\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-violet'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'Fx'\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-danger-high'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'C'\"\n (outClick)=\"handlerClick($event, 'c')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'('\"\n (outClick)=\"handlerClick($event, '(')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"')'\"\n (outClick)=\"handlerClick($event, ')')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-divide'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '/')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'1'\"\n (outClick)=\"handlerClick($event, '1')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'2'\"\n (outClick)=\"handlerClick($event, '2')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'3'\"\n (outClick)=\"handlerClick($event, '3')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-close'\"\n (outClick)=\"handlerClick($event, '*')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'4'\"\n (outClick)=\"handlerClick($event, '4')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'5'\"\n (outClick)=\"handlerClick($event, '5')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'6'\"\n (outClick)=\"handlerClick($event, '6')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-minus'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '-')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'7'\"\n (outClick)=\"handlerClick($event, '7')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'8'\"\n (outClick)=\"handlerClick($event, '8')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'9'\"\n (outClick)=\"handlerClick($event, '9')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-add'\"\n (outClick)=\"handlerClick($event, '+')\" />\n </div>\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"'0'\"\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n (outClick)=\"handlerClick($event, '0')\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'.'\"\n (outClick)=\"handlerClick($event, '.')\" />\n </div>\n </div>\n </div>\n @if (!ignoreButtonSave()) {\n <div class=\"mt-[16px]\">\n <libs_ui-components-buttons-button\n [label]=\"labelButtonSave()\"\n [disable]=\"!isChangeExpression()\"\n [classInclude]=\"'justify-center w-full'\"\n (outClick)=\"handlerSave($event)\" />\n </div>\n }\n</div>\n\n<ng-template\n #listViewRef\n let-data=\"itemContext\">\n <libs_ui-components-list\n [zIndex]=\"zIndex()\"\n [config]=\"configField()?.listConfig\"\n [maxItemShow]=\"6\"\n [clickExactly]=\"false\"\n [searchConfig]=\"{ noBorder: true, placeholder: configField()?.placeholderInputList || 'i18n_search' }\"\n [multiKeySelected]=\"data.key ? [data.key] : []\"\n (outSelectMultiKey)=\"handlerSelectedField($event, data.index)\"></libs_ui-components-list>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: LibsUiComponentsButtonsButtonComponent, selector: "libs_ui-components-buttons-button", inputs: ["flagMouse", "type", "buttonCustom", "sizeButton", "label", "disable", "isPending", "imageLeft", "classInclude", "classIconLeft", "classIconRight", "classLabel", "iconOnlyType", "popover", "ignoreStopPropagationEvent", "zIndex", "widthLabelPopover", "styleIconLeft", "styleButton", "ignoreFocusWhenInputTab", "ignoreSetClickWhenShowPopover", "ignorePointerEvent", "isActive", "isHandlerEnterDocumentClickButton"], outputs: ["outClick", "outPopoverEvent", "outFunctionsControl"] }, { kind: "component", type: LibsUiComponentsListComponent, selector: "libs_ui-components-list", inputs: ["hiddenInputSearch", "dropdownTabKeyActive", "keySearch", "paddingLeftItem", "config", "autoSelectedFirstItemCallOutsideBefore", "isSearchOnline", "disable", "disableLabel", "labelConfig", "searchConfig", "searchPadding", "dividerClassInclude", "hasDivider", "buttonsOther", "hasButtonUnSelectOption", "clickExactly", "backgroundListCustom", "maxItemShow", "keySelected", "multiKeySelected", "keysDisableItem", "keysHiddenItem", "focusInputSearch", "skipFocusInputWhenKeySearchStoreUndefined", "functionGetItemsAutoAddList", "validRequired", "showValidateBottom", "zIndex", "loadingIconSize", "templateRefSearchNoData", "resetKeyWhenSelectAllKeyDropdown", "ignoreClassDisableDefaultWhenUseKeysDisableItem"], outputs: ["outSelectKey", "outSelectMultiKey", "outUnSelectMultiKey", "outClickButtonOther", "outFieldKey", "outChangeView", "outKeySearch", "outLoading", "outFunctionsControl", "outChangStageFlagMousePopover", "outLoadItemsComplete"] }, { kind: "pipe", type: LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, name: "LibsUiComponentsInputsCalculatorGetFieldSelectedPipe" }, { kind: "component", type: LibsUiComponentsPopoverComponent, selector: "libs_ui-components-popover,[LibsUiComponentsPopoverDirective]", inputs: ["debugId", "flagMouse", "type", "mode", "config", "ignoreShowPopover", "elementRefCustom", "initEventInElementRefCustom", "classInclude", "ignoreHiddenPopoverContentWhenMouseLeave", "ignoreStopPropagationEvent", "ignoreCursorPointerModeLikeClick", "isAddContentToParentDocument", "ignoreClickOutside"], outputs: ["outEvent", "outChangStageFlagMouse", "outEventPopoverContent", "outFunctionsControl"] }, { kind: "pipe", type: LibsUiComponentsInputsCalculatorGetWidthInputPipe, name: "LibsUiComponentsInputsCalculatorGetWidthInputPipe" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
226
|
+
}
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsInputsCalculatorComponent, decorators: [{
|
|
228
|
+
type: Component,
|
|
229
|
+
args: [{ selector: 'libs_ui-components-inputs-calculator', standalone: true, imports: [TranslateModule, LibsUiComponentsButtonsButtonComponent, LibsUiComponentsListComponent, LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, LibsUiComponentsPopoverComponent, LibsUiComponentsInputsCalculatorGetWidthInputPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"w-full\">\n <div class=\"p-[8px] rounded-[12px] bg-[#f8f9fa] {{ classInclude() }}\">\n <div class=\"mb-[8px] {{ classContainerInput() }}\">\n <div\n #calculatorInput\n class=\"py-[10px] px-[12px] libs-ui-font-h5r rounded-[8px] bg-[#ffffff] min-h-[160px] h-full border-[1px] {{ error()?.message ? 'libs-ui-border-error-general' : isFocus() ? 'border-[var(--libs-ui-color-light-1)]' : 'border-[#ffffff]' }}\"\n (mouseup)=\"handlerClickInput($event)\">\n <ul class=\"before:content-[''] before:table after:content-[''] after:table after:clear-both\">\n @for (item of listExpressions(); track $index; let i = $index) {\n <li class=\"float-left mb-[8px]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none text-center\"\n [class.ml-[-8px]]=\"i === 0\"\n [style.width.px]=\"inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(i)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n @switch (item.type) {\n @case ('operation') {\n <li class=\"float-left mb-[8px] text-center w-[24px] h-[24px] rounded-[4px] p-[4px] bg-[var(--libs-ui-color-light-2)]\">\n @switch (item.data) {\n @case ('/') {\n <i class=\"libs-ui-icon-divide text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('-') {\n <i class=\"libs-ui-icon-minus text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('+') {\n <i class=\"libs-ui-icon-add text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('*') {\n <i class=\"libs-ui-icon-close text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n }\n </li>\n }\n @case ('value') {\n <li class=\"float-left mb-[8px] text-center rounded-[4px] h-[24px] px-[8px] bg-[#E6E7EA] flex items-center max-w-[calc(100%-8px)]\">\n <libs_ui-components-popover [type]=\"'text'\">{{ item.data }}</libs_ui-components-popover>\n </li>\n }\n @case ('field') {\n @if ({ fieldSelected: item.data | LibsUiComponentsInputsCalculatorGetFieldSelectedPipe: configField()?.getFieldSelected }; as data) {\n <li class=\"float-left mb-[8px]\">\n <libs_ui-components-buttons-button\n class=\"max-w-[172px] block\"\n [label]=\"data.fieldSelected?.name || 'i18n_field_error'\"\n [classInclude]=\"'!justify-center !py-[2px] !px-[7px] !w-full'\"\n [classIconLeft]=\"data.fieldSelected?.icon || 'libs-ui-icon-tooltip-outline'\"\n [classIconRight]=\"'libs-ui-icon-move-right rotate-90'\"\n [classLabel]=\"'libs-ui-font-h5r'\"\n [zIndex]=\"zIndex()\"\n [type]=\"data.fieldSelected ? 'button-primary' : 'button-danger-high'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: false,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: i, key: item.data },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, i)\" />\n </li>\n }\n }\n }\n }\n <li class=\"float-left mb-[8px] max-w-[100%]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none max-w-[100%] {{ listExpressions().length ? 'text-center' : '' }}\"\n [style.width.px]=\"listExpressions().length ? (inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput) : 150\"\n [placeholder]=\"!listExpressions().length ? (placeholder() | translate) : ''\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(listExpressions().length)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n </ul>\n </div>\n @if (error()?.message) {\n <div class=\"libs-ui-text-error mt-[8px] libs-ui-font-h7r\">\n @let constHtmlMessage = error()?.message || ' ';\n {{ constHtmlMessage | translate }}\n </div>\n }\n </div>\n <div class=\"grid grid-cols-4 gap-[8px] {{ classContainerButton() }}\">\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"configField()?.label || 'i18n_select_field'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: true,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: -1 },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, -1)\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-violet'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'Fx'\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-danger-high'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'C'\"\n (outClick)=\"handlerClick($event, 'c')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'('\"\n (outClick)=\"handlerClick($event, '(')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"')'\"\n (outClick)=\"handlerClick($event, ')')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-divide'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '/')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'1'\"\n (outClick)=\"handlerClick($event, '1')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'2'\"\n (outClick)=\"handlerClick($event, '2')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'3'\"\n (outClick)=\"handlerClick($event, '3')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-close'\"\n (outClick)=\"handlerClick($event, '*')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'4'\"\n (outClick)=\"handlerClick($event, '4')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'5'\"\n (outClick)=\"handlerClick($event, '5')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'6'\"\n (outClick)=\"handlerClick($event, '6')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-minus'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '-')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'7'\"\n (outClick)=\"handlerClick($event, '7')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'8'\"\n (outClick)=\"handlerClick($event, '8')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'9'\"\n (outClick)=\"handlerClick($event, '9')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-add'\"\n (outClick)=\"handlerClick($event, '+')\" />\n </div>\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"'0'\"\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n (outClick)=\"handlerClick($event, '0')\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'.'\"\n (outClick)=\"handlerClick($event, '.')\" />\n </div>\n </div>\n </div>\n @if (!ignoreButtonSave()) {\n <div class=\"mt-[16px]\">\n <libs_ui-components-buttons-button\n [label]=\"labelButtonSave()\"\n [disable]=\"!isChangeExpression()\"\n [classInclude]=\"'justify-center w-full'\"\n (outClick)=\"handlerSave($event)\" />\n </div>\n }\n</div>\n\n<ng-template\n #listViewRef\n let-data=\"itemContext\">\n <libs_ui-components-list\n [zIndex]=\"zIndex()\"\n [config]=\"configField()?.listConfig\"\n [maxItemShow]=\"6\"\n [clickExactly]=\"false\"\n [searchConfig]=\"{ noBorder: true, placeholder: configField()?.placeholderInputList || 'i18n_search' }\"\n [multiKeySelected]=\"data.key ? [data.key] : []\"\n (outSelectMultiKey)=\"handlerSelectedField($event, data.index)\"></libs_ui-components-list>\n</ng-template>\n" }]
|
|
230
|
+
}] });
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Generated bundle index. Do not edit.
|
|
234
|
+
*/
|
|
235
|
+
|
|
236
|
+
export { LibsUiComponentsInputsCalculatorComponent };
|
|
237
|
+
//# sourceMappingURL=libs-ui-components-inputs-calculator.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libs-ui-components-inputs-calculator.mjs","sources":["../../../../../../libs-ui/components/inputs/calculator/src/pipes/get-field-selected.pipe.ts","../../../../../../libs-ui/components/inputs/calculator/src/pipes/get-width-input.pipe.ts","../../../../../../libs-ui/components/inputs/calculator/src/calculator.component.ts","../../../../../../libs-ui/components/inputs/calculator/src/calculator.component.html","../../../../../../libs-ui/components/inputs/calculator/src/libs-ui-components-inputs-calculator.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { IInputCalculatorField } from '../interfaces';\n\n@Pipe({\n name: 'LibsUiComponentsInputsCalculatorGetFieldSelectedPipe',\n standalone: true,\n})\nexport class LibsUiComponentsInputsCalculatorGetFieldSelectedPipe implements PipeTransform {\n transform(fieldId: string | number, getFieldSelected?: (key: string) => IInputCalculatorField | undefined): IInputCalculatorField | undefined {\n return getFieldSelected?.(typeof fieldId === 'number' ? fieldId.toString() : fieldId);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'LibsUiComponentsInputsCalculatorGetWidthInputPipe',\n standalone: true,\n})\nexport class LibsUiComponentsInputsCalculatorGetWidthInputPipe implements PipeTransform {\n transform(text: string, element: HTMLDivElement): number {\n if (!text) {\n return 8;\n }\n const div = document.createElement('span');\n\n div.textContent = text;\n element.appendChild(div);\n const width = div.offsetWidth + 8;\n\n div.remove();\n\n return width;\n }\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, input, OnInit, output, signal, viewChildren } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';\nimport { IListDataEmitMultiKey, LibsUiComponentsListComponent } from '@libs-ui/components-list';\nimport { IInputCalculatorConfigField, IInputCalculatorExpression, IInputCalculatorFunctionControlEvent, IInputCalculatorValid } from './interfaces';\nimport { IEvent } from '@libs-ui/interfaces-types';\nimport { cloneDeep, UtilsKeyCodeConstant } from '@libs-ui/utils';\nimport { IPopoverFunctionControlEvent, LibsUiComponentsPopoverComponent } from '@libs-ui/components-popover';\nimport { LibsUiComponentsInputsCalculatorGetFieldSelectedPipe } from './pipes/get-field-selected.pipe';\nimport { LibsUiComponentsInputsCalculatorGetWidthInputPipe } from './pipes/get-width-input.pipe';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-inputs-calculator',\n templateUrl: './calculator.component.html',\n standalone: true,\n imports: [TranslateModule, LibsUiComponentsButtonsButtonComponent, LibsUiComponentsListComponent, LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, LibsUiComponentsPopoverComponent, LibsUiComponentsInputsCalculatorGetWidthInputPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LibsUiComponentsInputsCalculatorComponent implements OnInit {\n protected indexFocus = signal<number | undefined>(undefined);\n protected isFocus = signal<boolean>(false);\n protected listExpressions = signal<Array<IInputCalculatorExpression>>([]);\n protected isChangeExpression = signal<boolean>(false);\n protected error = signal<IInputCalculatorValid | undefined>(undefined);\n\n private inputRef = viewChildren<ElementRef>('inputRef');\n private timeOut = signal<number | undefined>(undefined);\n private tooltipFunctionControl = signal<Map<number, IPopoverFunctionControlEvent>>(new Map());\n\n readonly expressions = input<Array<IInputCalculatorExpression>>([]);\n readonly zIndex = input<number>(10);\n readonly placeholder = input<string>('i18n_enter_params');\n readonly labelButtonSave = input<string>('i18n_save_calculation');\n readonly configField = input<IInputCalculatorConfigField>();\n readonly ignoreButtonSave = input<boolean>(false);\n readonly classInclude = input<string, string | undefined>('', { transform: (value) => value || '' });\n readonly classContainerInput = input<string, string | undefined>('', { transform: (value) => value || '' });\n readonly classContainerButton = input<string, string | undefined>('', { transform: (value) => value || '' });\n readonly validRequired = input<IInputCalculatorValid>();\n\n readonly outChangeExpressions = output<Array<IInputCalculatorExpression>>();\n readonly outFunctionControl = output<IInputCalculatorFunctionControlEvent>();\n\n ngOnInit() {\n this.listExpressions.set(cloneDeep(this.expressions()));\n this.outFunctionControl.emit(this.FunctionsControl);\n }\n\n public get FunctionsControl(): IInputCalculatorFunctionControlEvent {\n return {\n checkIsValid: this.validate.bind(this),\n getData: () => {\n return cloneDeep(this.listExpressions());\n },\n };\n }\n\n protected handlerClick(event: Event, button: '+' | '-' | '*' | '/' | 'c' | '.' | '(' | ')' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9') {\n event.stopPropagation();\n const expression: IInputCalculatorExpression = { type: 'field', data: button };\n\n if (button === 'c') {\n if (!this.listExpressions().length || this.indexFocus() === 0) {\n return;\n }\n return this.updateExpressions(undefined, typeof this.indexFocus() !== 'undefined' ? (this.indexFocus() || 1) - 1 : this.listExpressions().length - 1);\n }\n switch (button) {\n case '+':\n case '-':\n case '*':\n case '/':\n expression.type = 'operation';\n break;\n default:\n expression.type = 'value';\n }\n this.updateExpressions(expression, typeof this.indexFocus() !== 'undefined' ? this.indexFocus() || 0 : this.listExpressions().length);\n }\n\n private updateExpressions(item: IInputCalculatorExpression | undefined, position: number, isDelete?: boolean) {\n this.isChangeExpression.set(true);\n this.listExpressions.update((value) => {\n if (item) {\n value.splice(position || 0, 0, item);\n }\n if (!item) {\n value.splice(position || 0, 1);\n }\n\n return [...value];\n });\n\n this.indexFocus.update((value) => {\n if (!item) {\n if (value) {\n value = isDelete ? value : value - 1;\n }\n\n return value ? value : position;\n }\n if (typeof value === 'undefined') {\n value = this.listExpressions().length;\n\n return value;\n }\n value++;\n\n return value;\n });\n const indexFocus = this.indexFocus();\n\n setTimeout(() => {\n if (typeof indexFocus !== 'undefined') {\n this.inputRef()[indexFocus]?.nativeElement.focus();\n }\n }, 100);\n this.validate();\n }\n\n protected handlerEventKeyUpInput(event: Event) {\n const keyCode = (event as IEvent).keyCode;\n const value = (event as IEvent).target.value;\n const shiftKey = (event as IEvent).shiftKey;\n\n if ((([UtilsKeyCodeConstant.EQUALS, UtilsKeyCodeConstant.EIGHT].includes(keyCode) && shiftKey) || ([UtilsKeyCodeConstant.DASH, UtilsKeyCodeConstant.SLASH].includes(keyCode) && !shiftKey)) && value.length === 1) {\n (event as IEvent).target.value = '';\n\n return this.updateExpressions({ type: 'operation', data: value }, this.indexFocus() || this.listExpressions().length);\n }\n }\n\n protected handlerEventKeyInput(event: Event) {\n const keyCode = (event as IEvent).keyCode;\n const value = (event as IEvent).target.value;\n\n if (keyCode === UtilsKeyCodeConstant.BACKSPACE) {\n if (!value && this.listExpressions().length && (this.indexFocus() || 0) > 0) {\n return this.updateExpressions(undefined, (this.indexFocus() || 0) - 1);\n }\n }\n if (keyCode === UtilsKeyCodeConstant.DELETE) {\n if (!value && this.listExpressions().length && (this.indexFocus() || 0) < this.listExpressions().length) {\n return this.updateExpressions(undefined, this.indexFocus() || 0, true);\n }\n }\n if (keyCode === UtilsKeyCodeConstant.ENTER) {\n if (value) {\n (event as IEvent).target.value = '';\n\n return this.updateExpressions({ type: 'value', data: value }, this.indexFocus() || this.listExpressions().length);\n }\n }\n }\n\n protected handlerFocusAndBlurInput(index: number | undefined) {\n if (typeof index !== 'undefined') {\n this.indexFocus.set(index);\n this.isFocus.set(true);\n clearTimeout(this.timeOut());\n\n return;\n }\n this.timeOut.set(\n setTimeout(() => {\n this.isFocus.set(false);\n }, 250)\n );\n }\n\n protected handlerClickInput(event: Event) {\n event.stopPropagation();\n if (!this.isFocus()) {\n this.inputRef()[this.inputRef().length - 1].nativeElement.focus();\n }\n }\n\n protected handlerSave(event: Event) {\n event.stopPropagation();\n this.isChangeExpression.set(false);\n this.outChangeExpressions.emit(cloneDeep(this.listExpressions()));\n }\n\n protected handlerSelectedField(event: IListDataEmitMultiKey | undefined, index: number) {\n if (!event?.keys.length) {\n return;\n }\n if (index >= 0) {\n this.listExpressions.update((value) => {\n value.forEach((item, i) => {\n if (i === index) {\n if (item.data !== event.keys[0]) {\n this.tooltipFunctionControl().get(index)?.removePopoverOverlay();\n }\n item.data = event.keys[0] as string;\n }\n });\n\n return [...value];\n });\n this.isChangeExpression.set(true);\n\n return;\n }\n this.updateExpressions({ type: 'field', data: event.keys[0] as string }, typeof this.indexFocus() !== 'undefined' ? this.indexFocus() || 0 : this.listExpressions().length);\n this.tooltipFunctionControl().get(index)?.removePopoverOverlay();\n }\n\n protected handlerFunctionControlButton(event: IPopoverFunctionControlEvent, index: number) {\n this.tooltipFunctionControl.update((value) => {\n value.set(index, event);\n\n return value;\n });\n }\n\n private async validate() {\n this.error.set(undefined);\n if (!this.validRequired() || !this.validRequired()?.message) {\n return true;\n }\n if (!this.listExpressions().length) {\n this.error.set({ message: this.validRequired()?.message });\n }\n\n return this.listExpressions().length ? true : false;\n }\n}\n","<div class=\"w-full\">\n <div class=\"p-[8px] rounded-[12px] bg-[#f8f9fa] {{ classInclude() }}\">\n <div class=\"mb-[8px] {{ classContainerInput() }}\">\n <div\n #calculatorInput\n class=\"py-[10px] px-[12px] libs-ui-font-h5r rounded-[8px] bg-[#ffffff] min-h-[160px] h-full border-[1px] {{ error()?.message ? 'libs-ui-border-error-general' : isFocus() ? 'border-[var(--libs-ui-color-light-1)]' : 'border-[#ffffff]' }}\"\n (mouseup)=\"handlerClickInput($event)\">\n <ul class=\"before:content-[''] before:table after:content-[''] after:table after:clear-both\">\n @for (item of listExpressions(); track $index; let i = $index) {\n <li class=\"float-left mb-[8px]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none text-center\"\n [class.ml-[-8px]]=\"i === 0\"\n [style.width.px]=\"inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(i)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n @switch (item.type) {\n @case ('operation') {\n <li class=\"float-left mb-[8px] text-center w-[24px] h-[24px] rounded-[4px] p-[4px] bg-[var(--libs-ui-color-light-2)]\">\n @switch (item.data) {\n @case ('/') {\n <i class=\"libs-ui-icon-divide text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('-') {\n <i class=\"libs-ui-icon-minus text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('+') {\n <i class=\"libs-ui-icon-add text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n @case ('*') {\n <i class=\"libs-ui-icon-close text-[16px] before:!text-[var(--libs-ui-color-default)]\"></i>\n }\n }\n </li>\n }\n @case ('value') {\n <li class=\"float-left mb-[8px] text-center rounded-[4px] h-[24px] px-[8px] bg-[#E6E7EA] flex items-center max-w-[calc(100%-8px)]\">\n <libs_ui-components-popover [type]=\"'text'\">{{ item.data }}</libs_ui-components-popover>\n </li>\n }\n @case ('field') {\n @if ({ fieldSelected: item.data | LibsUiComponentsInputsCalculatorGetFieldSelectedPipe: configField()?.getFieldSelected }; as data) {\n <li class=\"float-left mb-[8px]\">\n <libs_ui-components-buttons-button\n class=\"max-w-[172px] block\"\n [label]=\"data.fieldSelected?.name || 'i18n_field_error'\"\n [classInclude]=\"'!justify-center !py-[2px] !px-[7px] !w-full'\"\n [classIconLeft]=\"data.fieldSelected?.icon || 'libs-ui-icon-tooltip-outline'\"\n [classIconRight]=\"'libs-ui-icon-move-right rotate-90'\"\n [classLabel]=\"'libs-ui-font-h5r'\"\n [zIndex]=\"zIndex()\"\n [type]=\"data.fieldSelected ? 'button-primary' : 'button-danger-high'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: false,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: i, key: item.data },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, i)\" />\n </li>\n }\n }\n }\n }\n <li class=\"float-left mb-[8px] max-w-[100%]\">\n <input\n #inputRef\n type=\"text\"\n class=\"inline-block h-[24px] outline-none max-w-[100%] {{ listExpressions().length ? 'text-center' : '' }}\"\n [style.width.px]=\"listExpressions().length ? (inputRef.value | LibsUiComponentsInputsCalculatorGetWidthInputPipe: calculatorInput) : 150\"\n [placeholder]=\"!listExpressions().length ? (placeholder() | translate) : ''\"\n (keydown)=\"handlerEventKeyInput($event)\"\n (keyup)=\"handlerEventKeyUpInput($event)\"\n (focus)=\"handlerFocusAndBlurInput(listExpressions().length)\"\n (blur)=\"handlerFocusAndBlurInput(undefined)\" />\n </li>\n </ul>\n </div>\n @if (error()?.message) {\n <div class=\"libs-ui-text-error mt-[8px] libs-ui-font-h7r\">\n @let constHtmlMessage = error()?.message || ' ';\n {{ constHtmlMessage | translate }}\n </div>\n }\n </div>\n <div class=\"grid grid-cols-4 gap-[8px] {{ classContainerButton() }}\">\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"configField()?.label || 'i18n_select_field'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [popover]=\"{\n mode: 'click-toggle',\n ignoreHiddenPopoverContentWhenMouseLeave: true,\n config: {\n zIndex: zIndex(),\n animationConfig: {},\n widthByParent: true,\n parentBorderWidth: 0,\n maxHeight: 2048,\n maxWidth: 2048,\n direction: 'bottom',\n directionDistance: 2,\n template: listViewRef,\n itemContext: { index: -1 },\n whiteTheme: true,\n ignoreArrow: true,\n classInclude: '!rounded-[4px] !w-[272px]',\n position: { mode: 'start', distance: 0 },\n },\n }\"\n (outFunctionsControl)=\"handlerFunctionControlButton($event, -1)\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-violet'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'Fx'\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-danger-high'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'C'\"\n (outClick)=\"handlerClick($event, 'c')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'('\"\n (outClick)=\"handlerClick($event, '(')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"')'\"\n (outClick)=\"handlerClick($event, ')')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-divide'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '/')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'1'\"\n (outClick)=\"handlerClick($event, '1')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'2'\"\n (outClick)=\"handlerClick($event, '2')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'3'\"\n (outClick)=\"handlerClick($event, '3')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-close'\"\n (outClick)=\"handlerClick($event, '*')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'4'\"\n (outClick)=\"handlerClick($event, '4')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'5'\"\n (outClick)=\"handlerClick($event, '5')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'6'\"\n (outClick)=\"handlerClick($event, '6')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [classIconLeft]=\"'libs-ui-icon-minus'\"\n [iconOnlyType]=\"true\"\n (outClick)=\"handlerClick($event, '-')\" />\n </div>\n <div class=\"col-[1]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'7'\"\n (outClick)=\"handlerClick($event, '7')\" />\n </div>\n <div class=\"col-[2]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'8'\"\n (outClick)=\"handlerClick($event, '8')\" />\n </div>\n <div class=\"col-[3]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'9'\"\n (outClick)=\"handlerClick($event, '9')\" />\n </div>\n <div class=\"col-[4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-secondary'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [iconOnlyType]=\"true\"\n [classIconLeft]=\"'libs-ui-icon-add'\"\n (outClick)=\"handlerClick($event, '+')\" />\n </div>\n <div class=\"col-[1/4]\">\n <libs_ui-components-buttons-button\n [label]=\"'0'\"\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n (outClick)=\"handlerClick($event, '0')\" />\n </div>\n <div class=\"col-[4/4]\">\n <libs_ui-components-buttons-button\n [type]=\"'button-third'\"\n [classInclude]=\"'!w-full !justify-center'\"\n [label]=\"'.'\"\n (outClick)=\"handlerClick($event, '.')\" />\n </div>\n </div>\n </div>\n @if (!ignoreButtonSave()) {\n <div class=\"mt-[16px]\">\n <libs_ui-components-buttons-button\n [label]=\"labelButtonSave()\"\n [disable]=\"!isChangeExpression()\"\n [classInclude]=\"'justify-center w-full'\"\n (outClick)=\"handlerSave($event)\" />\n </div>\n }\n</div>\n\n<ng-template\n #listViewRef\n let-data=\"itemContext\">\n <libs_ui-components-list\n [zIndex]=\"zIndex()\"\n [config]=\"configField()?.listConfig\"\n [maxItemShow]=\"6\"\n [clickExactly]=\"false\"\n [searchConfig]=\"{ noBorder: true, placeholder: configField()?.placeholderInputList || 'i18n_search' }\"\n [multiKeySelected]=\"data.key ? [data.key] : []\"\n (outSelectMultiKey)=\"handlerSelectedField($event, data.index)\"></libs_ui-components-list>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAOa,oDAAoD,CAAA;IAC/D,SAAS,CAAC,OAAwB,EAAE,gBAAqE,EAAA;AACvG,QAAA,OAAO,gBAAgB,GAAG,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,EAAE,GAAG,OAAO,CAAC;IACvF;wGAHW,oDAAoD,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAApD,oDAA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EAAA,sBAAA,EAAA,aAAA,EAAA,aAAA,EAAA,kBAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,2CAAA,EAAA,6BAAA,EAAA,eAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,yBAAA,EAAA,kCAAA,EAAA,iDAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,mBAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,aAAA,EAAA,eAAA,EAAA,cAAA,EAAA,YAAA,EAAA,qBAAA,EAAA,+BAAA,EAAA,sBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,oDAAoD,EAAA,IAAA,EAAA,sDAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gCAAgC,+fAAE,iDAAiD,EAAA,IAAA,EAAA,mDAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAGhO,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBARrD,SAAS;AAEE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sCAAsC,cAEpC,IAAI,EAAA,OAAA,EACP,CAAC,eAAe,EAAE,sCAAsC,EAAE,6BAA6B,EAAE,oDAAoD,EAAE,gCAAgC,EAAE,iDAAiD,CAAC,EAAA,eAAA,EAC3N,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2mZAAA,EAAA;;;AEjBjD;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './input-calculation.interface';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IListConfigItem } from '@libs-ui/components-list';
|
|
2
|
+
export interface IInputCalculatorExpression {
|
|
3
|
+
type: 'value' | 'field' | 'operation';
|
|
4
|
+
data: string | number;
|
|
5
|
+
}
|
|
6
|
+
export interface IInputCalculatorField {
|
|
7
|
+
key?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
icon?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IInputCalculatorConfigField {
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholderInputList?: string;
|
|
14
|
+
listConfig: IListConfigItem;
|
|
15
|
+
getFieldSelected: (field: string) => IInputCalculatorField | undefined;
|
|
16
|
+
}
|
|
17
|
+
export interface IInputCalculatorValid {
|
|
18
|
+
message?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IInputCalculatorFunctionControlEvent {
|
|
21
|
+
checkIsValid: () => Promise<boolean>;
|
|
22
|
+
getData: () => Array<IInputCalculatorExpression>;
|
|
23
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@libs-ui/components-inputs-calculator",
|
|
3
|
+
"version": "0.1.1-1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/core": ">=18.0.0",
|
|
6
|
+
"@ngx-translate/core": "^15.0.0",
|
|
7
|
+
"@libs-ui/components-buttons-button": "0.1.1-1",
|
|
8
|
+
"@libs-ui/components-list": "0.1.1-1",
|
|
9
|
+
"@libs-ui/interfaces-types": "0.1.1-1",
|
|
10
|
+
"@libs-ui/utils": "0.1.1-1",
|
|
11
|
+
"@libs-ui/components-popover": "0.1.1-1"
|
|
12
|
+
},
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"module": "fesm2022/libs-ui-components-inputs-calculator.mjs",
|
|
15
|
+
"typings": "index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./package.json": {
|
|
18
|
+
"default": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./index.d.ts",
|
|
22
|
+
"esm2022": "./esm2022/libs-ui-components-inputs-calculator.mjs",
|
|
23
|
+
"esm": "./esm2022/libs-ui-components-inputs-calculator.mjs",
|
|
24
|
+
"default": "./fesm2022/libs-ui-components-inputs-calculator.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"tslib": "^2.3.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { IInputCalculatorField } from '../interfaces';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class LibsUiComponentsInputsCalculatorGetFieldSelectedPipe implements PipeTransform {
|
|
5
|
+
transform(fieldId: string | number, getFieldSelected?: (key: string) => IInputCalculatorField | undefined): IInputCalculatorField | undefined;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<LibsUiComponentsInputsCalculatorGetFieldSelectedPipe, "LibsUiComponentsInputsCalculatorGetFieldSelectedPipe", true>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class LibsUiComponentsInputsCalculatorGetWidthInputPipe implements PipeTransform {
|
|
4
|
+
transform(text: string, element: HTMLDivElement): number;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsInputsCalculatorGetWidthInputPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<LibsUiComponentsInputsCalculatorGetWidthInputPipe, "LibsUiComponentsInputsCalculatorGetWidthInputPipe", true>;
|
|
7
|
+
}
|