lightning-tec-br-angular-components 0.2.9 → 1.2.0
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/fesm2022/lightning-tec-br-angular-components.mjs +213 -98
- package/fesm2022/lightning-tec-br-angular-components.mjs.map +1 -1
- package/lib/alert/alert.enum.d.ts +5 -1
- package/lib/button/button.component.d.ts +2 -2
- package/lib/button/button.enum.d.ts +5 -1
- package/lib/form-field/form-field.component.d.ts +56 -0
- package/lib/{txt-box/txt-box.enum.d.ts → form-field/form-field.enum.d.ts} +21 -9
- package/lib/form-field/form-field.model.d.ts +11 -0
- package/lib/form-field/form-field.service.d.ts +10 -0
- package/lib/label/label.enum.d.ts +5 -1
- package/lib/list-item/list-item.enum.d.ts +5 -1
- package/package.json +1 -1
- package/public-api.d.ts +4 -4
- package/lib/txt-box/txt-box.component.d.ts +0 -39
- package/lib/txt-box/txt-box.model.d.ts +0 -4
- package/lib/txt-box/txt-box.service.d.ts +0 -10
|
@@ -5,71 +5,97 @@ import { FormsModule } from '@angular/forms';
|
|
|
5
5
|
import { Subject, takeUntil } from 'rxjs';
|
|
6
6
|
import * as i1$1 from '@angular/common';
|
|
7
7
|
import { CommonModule } from '@angular/common';
|
|
8
|
+
import * as i3 from 'ngx-mask';
|
|
8
9
|
|
|
9
|
-
var
|
|
10
|
-
(function (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
10
|
+
var FormFieldTxtInputTypesEnum;
|
|
11
|
+
(function (FormFieldTxtInputTypesEnum) {
|
|
12
|
+
FormFieldTxtInputTypesEnum[FormFieldTxtInputTypesEnum["Text"] = 0] = "Text";
|
|
13
|
+
FormFieldTxtInputTypesEnum[FormFieldTxtInputTypesEnum["Password"] = 1] = "Password";
|
|
14
|
+
FormFieldTxtInputTypesEnum[FormFieldTxtInputTypesEnum["Email"] = 2] = "Email";
|
|
15
|
+
FormFieldTxtInputTypesEnum[FormFieldTxtInputTypesEnum["Number"] = 3] = "Number";
|
|
16
|
+
FormFieldTxtInputTypesEnum[FormFieldTxtInputTypesEnum["Date"] = 4] = "Date";
|
|
17
|
+
FormFieldTxtInputTypesEnum[FormFieldTxtInputTypesEnum["CellPhone"] = 5] = "CellPhone";
|
|
18
|
+
})(FormFieldTxtInputTypesEnum || (FormFieldTxtInputTypesEnum = {}));
|
|
19
|
+
var FormFieldTypes;
|
|
20
|
+
(function (FormFieldTypes) {
|
|
21
|
+
FormFieldTypes[FormFieldTypes["TxtBox"] = 0] = "TxtBox";
|
|
22
|
+
FormFieldTypes[FormFieldTypes["ComboBox"] = 1] = "ComboBox";
|
|
23
|
+
})(FormFieldTypes || (FormFieldTypes = {}));
|
|
24
|
+
var FormFieldCountryDataFormat;
|
|
25
|
+
(function (FormFieldCountryDataFormat) {
|
|
26
|
+
FormFieldCountryDataFormat[FormFieldCountryDataFormat["Estados_Unidos"] = 0] = "Estados_Unidos";
|
|
27
|
+
FormFieldCountryDataFormat[FormFieldCountryDataFormat["Brasil"] = 1] = "Brasil";
|
|
28
|
+
})(FormFieldCountryDataFormat || (FormFieldCountryDataFormat = {}));
|
|
29
|
+
var FormFieldIconsEnum;
|
|
30
|
+
(function (FormFieldIconsEnum) {
|
|
31
|
+
FormFieldIconsEnum["AddUser"] = "fi fi-sr-user-add";
|
|
32
|
+
FormFieldIconsEnum["User"] = "fi fi-sr-user";
|
|
33
|
+
FormFieldIconsEnum["Lock"] = "fi fi-sr-lock";
|
|
34
|
+
FormFieldIconsEnum["EyeOpen"] = "fi fi-ss-eye";
|
|
35
|
+
FormFieldIconsEnum["EyeClose"] = "fi fi-ss-eye-crossed";
|
|
36
|
+
FormFieldIconsEnum["ItemClosed"] = "fi fi-tr-caret-down";
|
|
37
|
+
FormFieldIconsEnum["ItemOpenned"] = "fi fi-rr-caret-down";
|
|
38
|
+
FormFieldIconsEnum["Done"] = "fi fi-sr-octagon-check";
|
|
39
|
+
FormFieldIconsEnum["Doing"] = "fi fi-br-duration-alt";
|
|
40
|
+
FormFieldIconsEnum["NotDone"] = "fi fi-sr-cross-circle";
|
|
41
|
+
FormFieldIconsEnum["Alert"] = "fi fi-sr-exclamation";
|
|
42
|
+
FormFieldIconsEnum["Close"] = "fi fi-br-cross";
|
|
43
|
+
FormFieldIconsEnum["Home"] = "fi fi-sr-home";
|
|
44
|
+
FormFieldIconsEnum["Key"] = "fi fi-sr-key";
|
|
45
|
+
FormFieldIconsEnum["Company"] = "fi fi-rs-building";
|
|
46
|
+
FormFieldIconsEnum["NoteBook"] = "fi fi-br-notebook-alt";
|
|
47
|
+
FormFieldIconsEnum["AddFile"] = "fi fi-rr-add-document";
|
|
48
|
+
FormFieldIconsEnum["PageGoBack"] = "fi fi-rr-angle-circle-left";
|
|
49
|
+
FormFieldIconsEnum["PDFFile"] = "fi fi-sr-file-pdf";
|
|
50
|
+
FormFieldIconsEnum["DowloadFile"] = "fi fi-sr-file-download";
|
|
51
|
+
})(FormFieldIconsEnum || (FormFieldIconsEnum = {}));
|
|
52
|
+
var FormFieldFontWeights;
|
|
53
|
+
(function (FormFieldFontWeights) {
|
|
54
|
+
FormFieldFontWeights[FormFieldFontWeights["Thin"] = 100] = "Thin";
|
|
55
|
+
FormFieldFontWeights[FormFieldFontWeights["ExtraLight"] = 200] = "ExtraLight";
|
|
56
|
+
FormFieldFontWeights[FormFieldFontWeights["Light"] = 300] = "Light";
|
|
57
|
+
FormFieldFontWeights[FormFieldFontWeights["Regular"] = 400] = "Regular";
|
|
58
|
+
FormFieldFontWeights[FormFieldFontWeights["Medium"] = 500] = "Medium";
|
|
59
|
+
FormFieldFontWeights[FormFieldFontWeights["SemiBold"] = 600] = "SemiBold";
|
|
60
|
+
FormFieldFontWeights[FormFieldFontWeights["Bold"] = 700] = "Bold";
|
|
61
|
+
FormFieldFontWeights[FormFieldFontWeights["Extrabold"] = 800] = "Extrabold";
|
|
62
|
+
FormFieldFontWeights[FormFieldFontWeights["Black"] = 900] = "Black";
|
|
63
|
+
})(FormFieldFontWeights || (FormFieldFontWeights = {}));
|
|
50
64
|
|
|
51
|
-
class
|
|
65
|
+
class FormFieldService {
|
|
52
66
|
constructor() {
|
|
53
|
-
this.
|
|
67
|
+
this.valueChanged = new Subject();
|
|
54
68
|
this.alertState = new Subject();
|
|
55
69
|
}
|
|
56
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type:
|
|
57
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type:
|
|
70
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: FormFieldService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
71
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: FormFieldService, providedIn: 'root' }); }
|
|
58
72
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type:
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: FormFieldService, decorators: [{
|
|
60
74
|
type: Injectable,
|
|
61
75
|
args: [{ providedIn: 'root' }]
|
|
62
76
|
}] });
|
|
63
77
|
|
|
64
|
-
class
|
|
78
|
+
class FormFieldModel {
|
|
65
79
|
constructor() {
|
|
66
80
|
this.name = '';
|
|
81
|
+
this.field = {};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
class FormFielTxtModel {
|
|
85
|
+
constructor() {
|
|
86
|
+
this.value = '';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
class FormFieldComboModel {
|
|
90
|
+
constructor() {
|
|
91
|
+
this.id = 0;
|
|
67
92
|
this.value = '';
|
|
68
93
|
}
|
|
69
94
|
}
|
|
70
95
|
|
|
71
96
|
var AlertIconsEnum;
|
|
72
97
|
(function (AlertIconsEnum) {
|
|
98
|
+
AlertIconsEnum["AddUser"] = "fi fi-sr-user-add";
|
|
73
99
|
AlertIconsEnum["User"] = "fi fi-sr-user";
|
|
74
100
|
AlertIconsEnum["Lock"] = "fi fi-sr-lock";
|
|
75
101
|
AlertIconsEnum["EyeOpen"] = "fi fi-ss-eye";
|
|
@@ -86,6 +112,9 @@ var AlertIconsEnum;
|
|
|
86
112
|
AlertIconsEnum["Company"] = "fi fi-rs-building";
|
|
87
113
|
AlertIconsEnum["NoteBook"] = "fi fi-br-notebook-alt";
|
|
88
114
|
AlertIconsEnum["AddFile"] = "fi fi-rr-add-document";
|
|
115
|
+
AlertIconsEnum["PageGoBack"] = "fi fi-rr-angle-circle-left";
|
|
116
|
+
AlertIconsEnum["PDFFile"] = "fi fi-sr-file-pdf";
|
|
117
|
+
AlertIconsEnum["DowloadFile"] = "fi fi-sr-file-download";
|
|
89
118
|
})(AlertIconsEnum || (AlertIconsEnum = {}));
|
|
90
119
|
var AlertTypesEnum;
|
|
91
120
|
(function (AlertTypesEnum) {
|
|
@@ -110,10 +139,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
110
139
|
class AlertModel {
|
|
111
140
|
constructor() {
|
|
112
141
|
this.alertsName = '';
|
|
113
|
-
this.alertsFatherName = '';
|
|
142
|
+
this.alertsFatherName = ''; //caller
|
|
114
143
|
this.top = 0;
|
|
115
144
|
this.left = 0;
|
|
116
|
-
this.text = '';
|
|
145
|
+
this.text = ''; //caller
|
|
117
146
|
this.wasClosed = false;
|
|
118
147
|
}
|
|
119
148
|
}
|
|
@@ -188,88 +217,162 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
188
217
|
args: [{ selector: 'app-alert', standalone: true, imports: [], template: "<div class=\"container\"\r\n[style.background-color]=\"BackgroundColor\"\r\n[style.border-radius]=\"(_FontSize()*0.5) + 'px'\"\r\n[style.color]=\"_FontColor\"\r\n[style.display]=\"isVisible ? '' : 'none'\"\r\n[style.top]=\"_PositionY + 'px'\"\r\n[style.left]=\"_PositionX + 'px'\"\r\n>\r\n\r\n <i class=\"{{_IconClose}}\"\r\n [style.font-size]=\"(_FontSize()*1) + 'px'\"\r\n [style.padding-top]=\"(_FontSize()*0.6) + 'px'\"\r\n [style.padding-right]=\"(_FontSize()*0.6) + 'px'\"\r\n (click)=\"OnClose()\"\r\n >\r\n\r\n </i>\r\n\r\n <div class=\"container-text\"\r\n [style.margin-right]=\"_FontSize() + 'px'\"\r\n [style.padding-top]=\"(_FontSize()*0.4) + 'px'\"\r\n [style.padding-bottom]=\"(_FontSize()*1) + 'px'\"\r\n [style.padding-right]=\"(_FontSize()*1) + 'px'\"\r\n [style.padding-left]=\"(_FontSize()*1) + 'px'\"\r\n >\r\n <i class=\"{{_Icon}}\"\r\n [style.font-size]=\"(_FontSize()*1.2) + 'px'\"\r\n [style.margin-right]=\"(_FontSize()*0.5) + 'px'\"\r\n >\r\n \r\n </i>\r\n <h1\r\n [style.font-family]=\"_FontFamily()\"\r\n [style.font-weight]=\"_FontWeight()\"\r\n [style.font-size]=\"_FontSize() + 'px'\"\r\n >\r\n {{_Text}}\r\n </h1>\r\n </div>\r\n\r\n\r\n\r\n\r\n</div>\r\n", styles: [".container{width:fit-content;height:fit-content;max-width:70vw;position:absolute}.container>i{display:block;line-height:0px;text-align:end}.container>i:hover{cursor:pointer}.container>.container-text{display:flex;align-items:center;justify-content:center}.container>.container-text>i{line-height:0px;text-align:center}.container>.container-text>h1{margin:0;word-break:break-word}\n"] }]
|
|
189
218
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
190
219
|
|
|
191
|
-
class
|
|
192
|
-
constructor(element) {
|
|
220
|
+
class FormFieldComponent {
|
|
221
|
+
constructor(element, cd) {
|
|
193
222
|
this.element = element;
|
|
223
|
+
this.cd = cd;
|
|
194
224
|
//Template Properties
|
|
195
|
-
this.
|
|
196
|
-
this.
|
|
197
|
-
this._idInput = input();
|
|
225
|
+
this._Icon = input.required();
|
|
226
|
+
this.Name = input.required();
|
|
198
227
|
this._placeHolderType = '';
|
|
199
228
|
this._placeHolderValue = input.required();
|
|
200
|
-
this._PasswordIcon =
|
|
201
|
-
this.
|
|
202
|
-
this.
|
|
229
|
+
this._PasswordIcon = FormFieldIconsEnum.EyeOpen;
|
|
230
|
+
this._IconColor = input.required();
|
|
231
|
+
this._FontColor = input.required();
|
|
203
232
|
this._FontSize = input.required();
|
|
204
|
-
this._IconEnabled = '';
|
|
205
233
|
this._FontFamily = input.required();
|
|
206
234
|
this._FontWeight = input.required();
|
|
235
|
+
this._Options = input.required();
|
|
207
236
|
//Internal Properties
|
|
208
|
-
this.
|
|
237
|
+
this.TxtInputType = input.required();
|
|
209
238
|
this.IconEnabled = input.required();
|
|
239
|
+
this.CountryDataFormat = input.required();
|
|
210
240
|
this.text = '';
|
|
211
|
-
this.TxtBoxModel = new TxtBoxModel();
|
|
212
241
|
this._AlertState = false;
|
|
242
|
+
this.FieldType = input.required();
|
|
243
|
+
//ngxMask
|
|
244
|
+
this.Mask = "";
|
|
245
|
+
this.Prefixo = "";
|
|
246
|
+
this.Sufixo = "";
|
|
247
|
+
this.NumberMaskSufix = input.required();
|
|
248
|
+
this.showMaskTyped = false;
|
|
249
|
+
this.thousandSeparator = ".";
|
|
250
|
+
this.NCasasDecimais = input.required();
|
|
251
|
+
this.FormFieldModel = new FormFieldModel();
|
|
252
|
+
this.FormFielTxtModel = new FormFielTxtModel();
|
|
253
|
+
this.FormFieldComboModel = new FormFieldComboModel();
|
|
213
254
|
this.AlertTypesEnum = AlertTypesEnum;
|
|
214
|
-
this.
|
|
215
|
-
this.
|
|
255
|
+
this.FormFieldIconsEnum = FormFieldIconsEnum;
|
|
256
|
+
this.FormFieldTxtInputTypesEnum = FormFieldTxtInputTypesEnum;
|
|
257
|
+
this.FormFieldDataFormat = FormFieldCountryDataFormat;
|
|
258
|
+
this.FormFieldTypes = FormFieldTypes;
|
|
216
259
|
//Services
|
|
217
|
-
this.
|
|
260
|
+
this.FormFieldService = inject(FormFieldService);
|
|
218
261
|
this.AlertService = inject(AlertService);
|
|
219
262
|
}
|
|
220
263
|
ngOnInit() {
|
|
221
264
|
//Limpa as Memórias de Estado
|
|
222
|
-
this._IconEnabled = '';
|
|
223
265
|
this._placeHolderType = '';
|
|
224
266
|
this._AlertState = false;
|
|
225
|
-
this.
|
|
226
|
-
this.
|
|
227
|
-
this._IconEnabled = this.IconEnabled() ? '' : 'none';
|
|
267
|
+
this.FormFieldModel.name = '';
|
|
268
|
+
this.FormFieldModel.name = this.Name();
|
|
228
269
|
this.startListenToAlertState();
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
{
|
|
232
|
-
this._placeHolderType = TxtBoxInputTypesEnum.Text;
|
|
233
|
-
break;
|
|
234
|
-
}
|
|
235
|
-
case (TxtBoxTypesEnum.Password):
|
|
236
|
-
{
|
|
237
|
-
this._placeHolderType = TxtBoxInputTypesEnum.Password;
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
270
|
+
if (this.FieldType() == FormFieldTypes.TxtBox)
|
|
271
|
+
this.configMask();
|
|
241
272
|
}
|
|
242
|
-
|
|
243
|
-
this.
|
|
244
|
-
this.
|
|
273
|
+
onTxtChange() {
|
|
274
|
+
//this.FormFielTxtModel.value está mudando no template pelo ngModel
|
|
275
|
+
this.FormFieldModel.name = this.Name();
|
|
276
|
+
this.FormFieldModel.field = this.FormFielTxtModel;
|
|
277
|
+
this.FormFieldService.valueChanged.next(this.FormFieldModel);
|
|
278
|
+
}
|
|
279
|
+
onComboChange() {
|
|
280
|
+
this.FormFieldModel.name = this.Name();
|
|
281
|
+
this.FormFieldComboModel.id = this.getIDFromOption(this.FormFieldComboModel.value);
|
|
282
|
+
this.FormFieldModel.field = this.FormFieldComboModel;
|
|
283
|
+
this.FormFieldService.valueChanged.next(this.FormFieldModel);
|
|
245
284
|
}
|
|
246
285
|
startListenToAlertState() {
|
|
247
|
-
this.
|
|
248
|
-
if (this.
|
|
286
|
+
this.FormFieldService.alertState.subscribe((callerData) => {
|
|
287
|
+
if (this.Name() == callerData.alertsFatherName) {
|
|
249
288
|
callerData.top = this.element.nativeElement.getBoundingClientRect().top - (this.element.nativeElement.offsetHeight * 1.5);
|
|
250
289
|
callerData.left = this.element.nativeElement.getBoundingClientRect().left;
|
|
251
|
-
callerData.alertsName = this.
|
|
290
|
+
callerData.alertsName = this.FormFieldModel.name + '-alert';
|
|
252
291
|
this.AlertService.wasOpenned.next(callerData);
|
|
253
292
|
}
|
|
254
293
|
});
|
|
255
294
|
}
|
|
256
295
|
togglePasswordView() {
|
|
257
|
-
if (this._PasswordIcon ==
|
|
258
|
-
this._PasswordIcon =
|
|
259
|
-
this._placeHolderType =
|
|
296
|
+
if (this._PasswordIcon == FormFieldIconsEnum.EyeClose) {
|
|
297
|
+
this._PasswordIcon = FormFieldIconsEnum.EyeOpen;
|
|
298
|
+
this._placeHolderType = 'password';
|
|
260
299
|
}
|
|
261
300
|
else {
|
|
262
|
-
this._PasswordIcon =
|
|
263
|
-
this._placeHolderType =
|
|
301
|
+
this._PasswordIcon = FormFieldIconsEnum.EyeClose;
|
|
302
|
+
this._placeHolderType = 'text';
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
configMask() {
|
|
306
|
+
switch (this.TxtInputType()) {
|
|
307
|
+
case (FormFieldTxtInputTypesEnum.Text):
|
|
308
|
+
this._placeHolderType = 'text';
|
|
309
|
+
this.Prefixo = "";
|
|
310
|
+
this.Mask = "";
|
|
311
|
+
this.Sufixo = "";
|
|
312
|
+
this.showMaskTyped = false;
|
|
313
|
+
break;
|
|
314
|
+
case (FormFieldTxtInputTypesEnum.Password):
|
|
315
|
+
this._placeHolderType = 'password';
|
|
316
|
+
this.Prefixo = "";
|
|
317
|
+
this.Mask = "";
|
|
318
|
+
this.Sufixo = "";
|
|
319
|
+
this.showMaskTyped = false;
|
|
320
|
+
break;
|
|
321
|
+
case (FormFieldTxtInputTypesEnum.Email):
|
|
322
|
+
this._placeHolderType = 'text';
|
|
323
|
+
this.Prefixo = "";
|
|
324
|
+
this.Mask = "";
|
|
325
|
+
this.Sufixo = "";
|
|
326
|
+
this.showMaskTyped = false;
|
|
327
|
+
break;
|
|
328
|
+
case (FormFieldTxtInputTypesEnum.Number):
|
|
329
|
+
this._placeHolderType = 'text';
|
|
330
|
+
this.Prefixo = "";
|
|
331
|
+
this.Mask = "separator." + this.NCasasDecimais().toString();
|
|
332
|
+
this.Sufixo = this.NumberMaskSufix();
|
|
333
|
+
this.showMaskTyped = false;
|
|
334
|
+
if (this.CountryDataFormat() == FormFieldCountryDataFormat.Brasil) {
|
|
335
|
+
this.thousandSeparator = ".";
|
|
336
|
+
}
|
|
337
|
+
if (this.CountryDataFormat() == FormFieldCountryDataFormat.Estados_Unidos) {
|
|
338
|
+
this.thousandSeparator = ",";
|
|
339
|
+
}
|
|
340
|
+
break;
|
|
341
|
+
case (FormFieldTxtInputTypesEnum.Date):
|
|
342
|
+
this._placeHolderType = 'date';
|
|
343
|
+
this.Prefixo = "";
|
|
344
|
+
this.Mask = "";
|
|
345
|
+
this.Sufixo = "";
|
|
346
|
+
this.showMaskTyped = true;
|
|
347
|
+
break;
|
|
348
|
+
case (FormFieldTxtInputTypesEnum.CellPhone):
|
|
349
|
+
this._placeHolderType = 'tel';
|
|
350
|
+
this.showMaskTyped = true;
|
|
351
|
+
if (this.CountryDataFormat() == FormFieldCountryDataFormat.Brasil) {
|
|
352
|
+
this.Prefixo = "+55 ";
|
|
353
|
+
this.Mask = "(00) 0 0000-0000";
|
|
354
|
+
}
|
|
355
|
+
if (this.CountryDataFormat() == FormFieldCountryDataFormat.Estados_Unidos) {
|
|
356
|
+
this.Prefixo = "+1 ";
|
|
357
|
+
this.Mask = "(000) 000-0000";
|
|
358
|
+
}
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
getIDFromOption(valueText) {
|
|
363
|
+
for (var i = 0; i < this._Options().length; i++) {
|
|
364
|
+
if (valueText == this._Options()[i].value)
|
|
365
|
+
return this._Options()[i].id;
|
|
264
366
|
}
|
|
367
|
+
return 0;
|
|
265
368
|
}
|
|
266
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type:
|
|
267
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
369
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: FormFieldComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
370
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: FormFieldComponent, isStandalone: true, selector: "app-form-field", inputs: { _Icon: { classPropertyName: "_Icon", publicName: "_Icon", isSignal: true, isRequired: true, transformFunction: null }, Name: { classPropertyName: "Name", publicName: "Name", isSignal: true, isRequired: true, transformFunction: null }, _placeHolderValue: { classPropertyName: "_placeHolderValue", publicName: "_placeHolderValue", isSignal: true, isRequired: true, transformFunction: null }, _IconColor: { classPropertyName: "_IconColor", publicName: "_IconColor", isSignal: true, isRequired: true, transformFunction: null }, _FontColor: { classPropertyName: "_FontColor", publicName: "_FontColor", isSignal: true, isRequired: true, transformFunction: null }, _FontSize: { classPropertyName: "_FontSize", publicName: "_FontSize", isSignal: true, isRequired: true, transformFunction: null }, _FontFamily: { classPropertyName: "_FontFamily", publicName: "_FontFamily", isSignal: true, isRequired: true, transformFunction: null }, _FontWeight: { classPropertyName: "_FontWeight", publicName: "_FontWeight", isSignal: true, isRequired: true, transformFunction: null }, _Options: { classPropertyName: "_Options", publicName: "_Options", isSignal: true, isRequired: true, transformFunction: null }, TxtInputType: { classPropertyName: "TxtInputType", publicName: "TxtInputType", isSignal: true, isRequired: true, transformFunction: null }, IconEnabled: { classPropertyName: "IconEnabled", publicName: "IconEnabled", isSignal: true, isRequired: true, transformFunction: null }, CountryDataFormat: { classPropertyName: "CountryDataFormat", publicName: "CountryDataFormat", isSignal: true, isRequired: true, transformFunction: null }, FieldType: { classPropertyName: "FieldType", publicName: "FieldType", isSignal: true, isRequired: true, transformFunction: null }, NumberMaskSufix: { classPropertyName: "NumberMaskSufix", publicName: "NumberMaskSufix", isSignal: true, isRequired: true, transformFunction: null }, NCasasDecimais: { classPropertyName: "NCasasDecimais", publicName: "NCasasDecimais", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "\r\n@if(FieldType() == FormFieldTypes.TxtBox){\r\n\r\n <div class=\"container\" \r\n [style.width]=\"(_FontSize()*19.375) +'px'\"\r\n [style.height]=\"(_FontSize()*2.5) +'px'\"\r\n [style.border-radius]=\"(_FontSize()*0.3125) +'px'\"\r\n [ngStyle]=\"\r\n {'box-shadow':'\r\n rgb(204, 219, 232)'+ (_FontSize()*0.1875) + 'px '+ (_FontSize()*0.1875) + 'px '+ (_FontSize()*0.375) + 'px 0px inset' + ',' + \r\n 'rgba(255, 255, 255, 0.5)'+ (_FontSize()*-0.1875) + 'px '+ (_FontSize()*-0.1875) + 'px '+ (_FontSize()*0.375) + 'px '+ (_FontSize()*0.0625) + 'px inset'\r\n }\r\n \">\r\n\r\n <i class=\"{{_Icon()}} icon\"\r\n [style.color]=\"_IconColor()\"\r\n [style.font-size]=\"(_FontSize()*1.25) +'px'\"\r\n [style.margin-left]=\"(_FontSize()*0.5625) +'px'\"\r\n [style.display]=\"IconEnabled() ? '' : 'none'\"\r\n ></i>\r\n\r\n <input\r\n\r\n [(ngModel)]=\"this.FormFielTxtModel.value\"\r\n (keyup)=\"onTxtChange()\"\r\n prefix=\"{{Prefixo}}\"\r\n suffix=\"{{Sufixo}}\"\r\n mask=\"{{Mask}}\"\r\n [showMaskTyped]=\"showMaskTyped\"\r\n thousandSeparator=\"{{thousandSeparator}}\"\r\n\r\n type=\"{{_placeHolderType}}\"\r\n name=\"{{Name()}}\"\r\n placeholder=\"{{_placeHolderValue()}}\"\r\n [style.color]=\"_FontColor()\"\r\n [style.font-family]=\"_FontFamily()\"\r\n [style.font-size]=\"_FontSize()+'px'\"\r\n [style.font-weight]=\"_FontWeight()\"\r\n [style.width]=\"(_FontSize()*15.3125) +'px'\"\r\n [style.margin-left]=\"(_FontSize()*0.375) +'px'\"\r\n >\r\n\r\n <i class=\"{{_PasswordIcon}}\"\r\n (click)=\"togglePasswordView()\"\r\n [style.cursor]=\"'pointer'\"\r\n [style.color]=\"_IconColor()\"\r\n [style.font-size]=\"(_FontSize()*1.25) +'px'\"\r\n [style.margin-right]=\"(_FontSize()*0.5625) +'px'\"\r\n [style.display]=\"TxtInputType() == FormFieldTxtInputTypesEnum.Password ? '' : 'none'\"\r\n ></i>\r\n </div>\r\n}@else {\r\n\r\n <div class=\"container\"\r\n [style.padding]=\"(_FontSize()*0.4) +'px' + ' ' + (_FontSize()*0.8) +'px'\" \r\n [style.border-radius]=\"(_FontSize()*0.3125) +'px'\"\r\n [ngStyle]=\"\r\n {'box-shadow':'\r\n rgb(204, 219, 232)'+ (_FontSize()*0.1875) + 'px '+ (_FontSize()*0.1875) + 'px '+ (_FontSize()*0.375) + 'px 0px inset' + ',' + \r\n 'rgba(255, 255, 255, 0.5)'+ (_FontSize()*-0.1875) + 'px '+ (_FontSize()*-0.1875) + 'px '+ (_FontSize()*0.375) + 'px '+ (_FontSize()*0.0625) + 'px inset'\r\n }\r\n \">\r\n <select\r\n [(ngModel)]=\"this.FormFieldComboModel.value\"\r\n (ngModelChange)=\"onComboChange()\"\r\n [style.color]=\"_FontColor()\"\r\n [style.font-family]=\"_FontFamily()\"\r\n [style.font-size]=\"_FontSize()+'px'\"\r\n [style.font-weight]=\"_FontWeight()\"\r\n [style.padding-right]=\"(_FontSize()*0.8) +'px'\"\r\n >\r\n @for(option of _Options() ; track $index ){\r\n <option>{{option.value}}</option>\r\n }\r\n </select>\r\n </div>\r\n}\r\n\r\n\r\n<app-alert\r\n[Name]=\"Name()+'-alert'\"\r\n[_FontSize]=\"_FontSize()\"\r\n[_FontFamily]=\"_FontFamily()\"\r\n[_FontWeight]=\"_FontWeight()\"\r\n/>\r\n\r\n\r\n\r\n\r\n", styles: [":host{display:inline-block}.container{display:flex;align-items:center}i{line-height:0px}input,select{background-color:transparent;border:none;padding:0}input,select:focus{outline:none;box-sizing:content-box}select{height:100%}select:hover{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: AlertComponent, selector: "app-alert", inputs: ["Name", "_FontSize", "_FontFamily", "_FontWeight"] }, { kind: "directive", type: i3.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions", "instantPrefix"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }] }); }
|
|
268
371
|
}
|
|
269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type:
|
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
270
373
|
type: Component,
|
|
271
|
-
args: [{ selector: 'app-
|
|
272
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
374
|
+
args: [{ selector: 'app-form-field', standalone: true, imports: [FormsModule, CommonModule, AlertComponent, i3.NgxMaskDirective], template: "\r\n@if(FieldType() == FormFieldTypes.TxtBox){\r\n\r\n <div class=\"container\" \r\n [style.width]=\"(_FontSize()*19.375) +'px'\"\r\n [style.height]=\"(_FontSize()*2.5) +'px'\"\r\n [style.border-radius]=\"(_FontSize()*0.3125) +'px'\"\r\n [ngStyle]=\"\r\n {'box-shadow':'\r\n rgb(204, 219, 232)'+ (_FontSize()*0.1875) + 'px '+ (_FontSize()*0.1875) + 'px '+ (_FontSize()*0.375) + 'px 0px inset' + ',' + \r\n 'rgba(255, 255, 255, 0.5)'+ (_FontSize()*-0.1875) + 'px '+ (_FontSize()*-0.1875) + 'px '+ (_FontSize()*0.375) + 'px '+ (_FontSize()*0.0625) + 'px inset'\r\n }\r\n \">\r\n\r\n <i class=\"{{_Icon()}} icon\"\r\n [style.color]=\"_IconColor()\"\r\n [style.font-size]=\"(_FontSize()*1.25) +'px'\"\r\n [style.margin-left]=\"(_FontSize()*0.5625) +'px'\"\r\n [style.display]=\"IconEnabled() ? '' : 'none'\"\r\n ></i>\r\n\r\n <input\r\n\r\n [(ngModel)]=\"this.FormFielTxtModel.value\"\r\n (keyup)=\"onTxtChange()\"\r\n prefix=\"{{Prefixo}}\"\r\n suffix=\"{{Sufixo}}\"\r\n mask=\"{{Mask}}\"\r\n [showMaskTyped]=\"showMaskTyped\"\r\n thousandSeparator=\"{{thousandSeparator}}\"\r\n\r\n type=\"{{_placeHolderType}}\"\r\n name=\"{{Name()}}\"\r\n placeholder=\"{{_placeHolderValue()}}\"\r\n [style.color]=\"_FontColor()\"\r\n [style.font-family]=\"_FontFamily()\"\r\n [style.font-size]=\"_FontSize()+'px'\"\r\n [style.font-weight]=\"_FontWeight()\"\r\n [style.width]=\"(_FontSize()*15.3125) +'px'\"\r\n [style.margin-left]=\"(_FontSize()*0.375) +'px'\"\r\n >\r\n\r\n <i class=\"{{_PasswordIcon}}\"\r\n (click)=\"togglePasswordView()\"\r\n [style.cursor]=\"'pointer'\"\r\n [style.color]=\"_IconColor()\"\r\n [style.font-size]=\"(_FontSize()*1.25) +'px'\"\r\n [style.margin-right]=\"(_FontSize()*0.5625) +'px'\"\r\n [style.display]=\"TxtInputType() == FormFieldTxtInputTypesEnum.Password ? '' : 'none'\"\r\n ></i>\r\n </div>\r\n}@else {\r\n\r\n <div class=\"container\"\r\n [style.padding]=\"(_FontSize()*0.4) +'px' + ' ' + (_FontSize()*0.8) +'px'\" \r\n [style.border-radius]=\"(_FontSize()*0.3125) +'px'\"\r\n [ngStyle]=\"\r\n {'box-shadow':'\r\n rgb(204, 219, 232)'+ (_FontSize()*0.1875) + 'px '+ (_FontSize()*0.1875) + 'px '+ (_FontSize()*0.375) + 'px 0px inset' + ',' + \r\n 'rgba(255, 255, 255, 0.5)'+ (_FontSize()*-0.1875) + 'px '+ (_FontSize()*-0.1875) + 'px '+ (_FontSize()*0.375) + 'px '+ (_FontSize()*0.0625) + 'px inset'\r\n }\r\n \">\r\n <select\r\n [(ngModel)]=\"this.FormFieldComboModel.value\"\r\n (ngModelChange)=\"onComboChange()\"\r\n [style.color]=\"_FontColor()\"\r\n [style.font-family]=\"_FontFamily()\"\r\n [style.font-size]=\"_FontSize()+'px'\"\r\n [style.font-weight]=\"_FontWeight()\"\r\n [style.padding-right]=\"(_FontSize()*0.8) +'px'\"\r\n >\r\n @for(option of _Options() ; track $index ){\r\n <option>{{option.value}}</option>\r\n }\r\n </select>\r\n </div>\r\n}\r\n\r\n\r\n<app-alert\r\n[Name]=\"Name()+'-alert'\"\r\n[_FontSize]=\"_FontSize()\"\r\n[_FontFamily]=\"_FontFamily()\"\r\n[_FontWeight]=\"_FontWeight()\"\r\n/>\r\n\r\n\r\n\r\n\r\n", styles: [":host{display:inline-block}.container{display:flex;align-items:center}i{line-height:0px}input,select{background-color:transparent;border:none;padding:0}input,select:focus{outline:none;box-sizing:content-box}select{height:100%}select:hover{cursor:pointer}\n"] }]
|
|
375
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }] });
|
|
273
376
|
|
|
274
377
|
var ButtonTypeEnum;
|
|
275
378
|
(function (ButtonTypeEnum) {
|
|
@@ -287,6 +390,7 @@ var ButtonIconPositionEnum;
|
|
|
287
390
|
})(ButtonIconPositionEnum || (ButtonIconPositionEnum = {}));
|
|
288
391
|
var ButtonIconEnum;
|
|
289
392
|
(function (ButtonIconEnum) {
|
|
393
|
+
ButtonIconEnum["AddUser"] = "fi fi-sr-user-add";
|
|
290
394
|
ButtonIconEnum["User"] = "fi fi-sr-user";
|
|
291
395
|
ButtonIconEnum["Lock"] = "fi fi-sr-lock";
|
|
292
396
|
ButtonIconEnum["EyeOpen"] = "fi fi-ss-eye";
|
|
@@ -303,6 +407,9 @@ var ButtonIconEnum;
|
|
|
303
407
|
ButtonIconEnum["Company"] = "fi fi-rs-building";
|
|
304
408
|
ButtonIconEnum["NoteBook"] = "fi fi-br-notebook-alt";
|
|
305
409
|
ButtonIconEnum["AddFile"] = "fi fi-rr-add-document";
|
|
410
|
+
ButtonIconEnum["PageGoBack"] = "fi fi-rr-angle-circle-left";
|
|
411
|
+
ButtonIconEnum["PDFFile"] = "fi fi-sr-file-pdf";
|
|
412
|
+
ButtonIconEnum["DowloadFile"] = "fi fi-sr-file-download";
|
|
306
413
|
})(ButtonIconEnum || (ButtonIconEnum = {}));
|
|
307
414
|
var ButtonFontWeights;
|
|
308
415
|
(function (ButtonFontWeights) {
|
|
@@ -392,7 +499,7 @@ class ButtonComponent {
|
|
|
392
499
|
this.ButtonModel = new ButtonModel();
|
|
393
500
|
this.ButtonService = inject(ButtonService);
|
|
394
501
|
this.AlertService = inject(AlertService);
|
|
395
|
-
this.
|
|
502
|
+
this.FormFieldService = inject(FormFieldService);
|
|
396
503
|
this.AlertModel = new AlertModel();
|
|
397
504
|
this.LabelService = inject(LabelService);
|
|
398
505
|
this.LabelModel = new LabelModel();
|
|
@@ -462,7 +569,7 @@ class ButtonComponent {
|
|
|
462
569
|
});
|
|
463
570
|
}
|
|
464
571
|
startListenToAlertState() {
|
|
465
|
-
this.
|
|
572
|
+
this.FormFieldService.alertState.subscribe((callerData) => {
|
|
466
573
|
if (this.name() == callerData.alertsFatherName) {
|
|
467
574
|
callerData.top = this.element.nativeElement.getBoundingClientRect().top - this.element.nativeElement.offsetHeight;
|
|
468
575
|
callerData.left = this.element.nativeElement.getBoundingClientRect().left + this.element.nativeElement.offsetWidth;
|
|
@@ -481,6 +588,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
481
588
|
|
|
482
589
|
var ListItemIcons;
|
|
483
590
|
(function (ListItemIcons) {
|
|
591
|
+
ListItemIcons["AddUser"] = "fi fi-sr-user-add";
|
|
484
592
|
ListItemIcons["User"] = "fi fi-sr-user";
|
|
485
593
|
ListItemIcons["Lock"] = "fi fi-sr-lock";
|
|
486
594
|
ListItemIcons["EyeOpen"] = "fi fi-ss-eye";
|
|
@@ -497,6 +605,9 @@ var ListItemIcons;
|
|
|
497
605
|
ListItemIcons["Company"] = "fi fi-rs-building";
|
|
498
606
|
ListItemIcons["NoteBook"] = "fi fi-br-notebook-alt";
|
|
499
607
|
ListItemIcons["AddFile"] = "fi fi-rr-add-document";
|
|
608
|
+
ListItemIcons["PageGoBack"] = "fi fi-rr-angle-circle-left";
|
|
609
|
+
ListItemIcons["PDFFile"] = "fi fi-sr-file-pdf";
|
|
610
|
+
ListItemIcons["DowloadFile"] = "fi fi-sr-file-download";
|
|
500
611
|
})(ListItemIcons || (ListItemIcons = {}));
|
|
501
612
|
var ListItemPositions;
|
|
502
613
|
(function (ListItemPositions) {
|
|
@@ -630,6 +741,7 @@ var LabelIconPositionEnum;
|
|
|
630
741
|
})(LabelIconPositionEnum || (LabelIconPositionEnum = {}));
|
|
631
742
|
var LabelIconEnum;
|
|
632
743
|
(function (LabelIconEnum) {
|
|
744
|
+
LabelIconEnum["AddUser"] = "fi fi-sr-user-add";
|
|
633
745
|
LabelIconEnum["User"] = "fi fi-sr-user";
|
|
634
746
|
LabelIconEnum["Lock"] = "fi fi-sr-lock";
|
|
635
747
|
LabelIconEnum["EyeOpen"] = "fi fi-ss-eye";
|
|
@@ -646,6 +758,9 @@ var LabelIconEnum;
|
|
|
646
758
|
LabelIconEnum["Company"] = "fi fi-rs-building";
|
|
647
759
|
LabelIconEnum["NoteBook"] = "fi fi-br-notebook-alt";
|
|
648
760
|
LabelIconEnum["AddFile"] = "fi fi-rr-add-document";
|
|
761
|
+
LabelIconEnum["PageGoBack"] = "fi fi-rr-angle-circle-left";
|
|
762
|
+
LabelIconEnum["PDFFile"] = "fi fi-sr-file-pdf";
|
|
763
|
+
LabelIconEnum["DowloadFile"] = "fi fi-sr-file-download";
|
|
649
764
|
})(LabelIconEnum || (LabelIconEnum = {}));
|
|
650
765
|
var LabelFontWeights;
|
|
651
766
|
(function (LabelFontWeights) {
|
|
@@ -884,5 +999,5 @@ class TableModel {
|
|
|
884
999
|
* Generated bundle index. Do not edit.
|
|
885
1000
|
*/
|
|
886
1001
|
|
|
887
|
-
export { AlertComponent, AlertIconsEnum, AlertModel, AlertService, AlertTypesEnum, ButtonComponent, ButtonFontWeights, ButtonIconEnum, ButtonIconPositionEnum, ButtonModel, ButtonService, ButtonTypeEnum, LabelComponent, LabelFontWeights, LabelIconEnum, LabelIconPositionEnum, LabelModel, LabelService, ListItemComponent, ListItemFontWeights, ListItemIcons, ListItemModel, ListItemPositions, ListItemService, TableComponent, TableFontWeights, TableModel, TableModes, TableService
|
|
1002
|
+
export { AlertComponent, AlertIconsEnum, AlertModel, AlertService, AlertTypesEnum, ButtonComponent, ButtonFontWeights, ButtonIconEnum, ButtonIconPositionEnum, ButtonModel, ButtonService, ButtonTypeEnum, FormFielTxtModel, FormFieldComboModel, FormFieldComponent, FormFieldCountryDataFormat, FormFieldFontWeights, FormFieldIconsEnum, FormFieldModel, FormFieldService, FormFieldTxtInputTypesEnum, FormFieldTypes, LabelComponent, LabelFontWeights, LabelIconEnum, LabelIconPositionEnum, LabelModel, LabelService, ListItemComponent, ListItemFontWeights, ListItemIcons, ListItemModel, ListItemPositions, ListItemService, TableComponent, TableFontWeights, TableModel, TableModes, TableService };
|
|
888
1003
|
//# sourceMappingURL=lightning-tec-br-angular-components.mjs.map
|