lightning-tec-br-angular-components 2.8.4 → 2.9.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.
@@ -27,23 +27,11 @@ var FormFieldCountryDataFormat;
27
27
  FormFieldCountryDataFormat[FormFieldCountryDataFormat["Estados_Unidos"] = 0] = "Estados_Unidos";
28
28
  FormFieldCountryDataFormat[FormFieldCountryDataFormat["Brasil"] = 1] = "Brasil";
29
29
  })(FormFieldCountryDataFormat || (FormFieldCountryDataFormat = {}));
30
- var FormFieldFontWeights;
31
- (function (FormFieldFontWeights) {
32
- FormFieldFontWeights[FormFieldFontWeights["Thin"] = 100] = "Thin";
33
- FormFieldFontWeights[FormFieldFontWeights["ExtraLight"] = 200] = "ExtraLight";
34
- FormFieldFontWeights[FormFieldFontWeights["Light"] = 300] = "Light";
35
- FormFieldFontWeights[FormFieldFontWeights["Regular"] = 400] = "Regular";
36
- FormFieldFontWeights[FormFieldFontWeights["Medium"] = 500] = "Medium";
37
- FormFieldFontWeights[FormFieldFontWeights["SemiBold"] = 600] = "SemiBold";
38
- FormFieldFontWeights[FormFieldFontWeights["Bold"] = 700] = "Bold";
39
- FormFieldFontWeights[FormFieldFontWeights["Extrabold"] = 800] = "Extrabold";
40
- FormFieldFontWeights[FormFieldFontWeights["Black"] = 900] = "Black";
41
- })(FormFieldFontWeights || (FormFieldFontWeights = {}));
42
30
 
43
31
  class FormFieldService {
44
32
  constructor() {
45
33
  this.valueChanged = new Subject();
46
- this.alertState = new Subject();
34
+ this.stateChanged = new Subject();
47
35
  this.enterPressed = new Subject();
48
36
  }
49
37
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: FormFieldService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -54,22 +42,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
54
42
  args: [{ providedIn: 'root' }]
55
43
  }] });
56
44
 
57
- class FormFieldModel {
58
- constructor() {
59
- this.name = '';
60
- this.field = {};
61
- this.internalCall = false;
62
- }
63
- }
64
- class FormFielTxtModel {
65
- constructor() {
66
- this.value = '';
67
- }
68
- }
69
- class FormFieldComboModel {
70
- constructor() {
71
- this.id = 0;
72
- this.value = '';
45
+ class FormFieldConfigModel {
46
+ constructor(params) {
47
+ this.ignoreThisProp = false;
48
+ this.Name = params.Name;
49
+ this.Width = params.Width;
50
+ this.Height = params.Height;
51
+ this.FieldType = params.FieldType;
52
+ this.ComboValues = params.ComboValues;
53
+ this.ComboIds = params.ComboIds;
54
+ this.Value = params.Value;
55
+ this.ValueId = params.ValueId;
56
+ this.IconEnabled = params.IconEnabled;
57
+ this.Icon = params.Icon;
58
+ this.IconColor = params.IconColor;
59
+ this.FontSize = params.FontSize;
60
+ this.FontColor = params.FontColor;
61
+ this.FontWeight = params.FontWeight;
62
+ this.FontFamily = params.FontFamily;
63
+ this.TxtInputType = params.TxtInputType;
64
+ this.PlaceHolderValue = params.PlaceHolderValue;
65
+ this.NumberMaskPrefix = params.NumberMaskPrefix;
66
+ this.NumberMaskSufix = params.NumberMaskSufix;
67
+ this.NCasasDecimais = params.NCasasDecimais;
68
+ this.CountryDataFormat = params.CountryDataFormat;
69
+ this.Border = params.Border;
70
+ this.BorderRadius = params.BorderRadius;
71
+ this.BoxShadowsEnabled = params.BoxShadowsEnabled;
72
+ this.ignoreThisProp = params.ignoreThisProp;
73
73
  }
74
74
  }
75
75
 
@@ -93,18 +93,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
93
93
  args: [{ providedIn: 'root' }]
94
94
  }] });
95
95
 
96
- class AlertModel {
97
- constructor() {
98
- this.alertsName_DontSet = '';
99
- this.alertsFatherName = '';
100
- this.top_DontSet = 0;
101
- this.left_DontSet = 0;
102
- this.text = '';
103
- this.isFixPosition = false;
104
- this.wasClosed_DontSet = false;
105
- }
106
- }
107
-
108
96
  var IconsEnum;
109
97
  (function (IconsEnum) {
110
98
  IconsEnum["Add"] = "fi fi-br-plus";
@@ -164,120 +152,38 @@ var IconsEnum;
164
152
  IconsEnum["Wallet"] = "fi fi-rr-wallet";
165
153
  })(IconsEnum || (IconsEnum = {}));
166
154
 
167
- class AlertComponent {
168
- constructor(cd) {
169
- this.cd = cd;
170
- this.Name = input.required();
171
- this._FontSize = input.required();
172
- this._FontFamily = input.required();
173
- this._FontWeight = input.required();
174
- this._FontColor = 'white';
175
- this._Text = '';
176
- this._PositionY = 0;
177
- this._PositionX = 0;
178
- this._Icon = '';
179
- this.BackgroundColor = '';
180
- this._IconClose = '';
181
- this.isVisible = false;
182
- this.AlertService = inject(AlertService);
183
- }
184
- ngOnInit() {
185
- this._PositionX = 0;
186
- this._PositionY = 0;
187
- this._FontColor = 'white';
188
- this._Icon = '';
189
- this.BackgroundColor = '';
190
- this._IconClose = '';
191
- this.AlertModel = new AlertModel();
192
- this._IconClose = IconsEnum.Close;
193
- this.startListenToAlertShowed();
194
- }
195
- OnClose() {
196
- this.isVisible = false;
197
- this.AlertModel.alertsName_DontSet = this.Name();
198
- this.AlertModel.wasClosed_DontSet = true;
199
- this.AlertService.wasClosed.next(this.AlertModel);
200
- }
201
- startListenToAlertShowed() {
202
- this.AlertService.wasOpenned.subscribe((AlertModel) => {
203
- if (this.Name() == AlertModel.alertsName_DontSet) {
204
- this._Text = AlertModel.text;
205
- this.AlertType = AlertModel.type;
206
- this.isFixPosition = AlertModel.isFixPosition;
207
- this.isVisible = true;
208
- switch (this.AlertType) {
209
- case (AlertTypesEnum.Done):
210
- this._Icon = IconsEnum.Done_Fill;
211
- this.BackgroundColor = '#008B10';
212
- this._FontColor = 'white';
213
- break;
214
- case (AlertTypesEnum.Alert):
215
- this._Icon = IconsEnum.Alert;
216
- this.BackgroundColor = '#DFCD00';
217
- this._FontColor = 'black';
218
- break;
219
- case (AlertTypesEnum.NotDone):
220
- this._Icon = IconsEnum.NotDone;
221
- this.BackgroundColor = '#D40000';
222
- this._FontColor = 'white';
223
- break;
224
- }
225
- if (this.isFixPosition) {
226
- }
227
- else {
228
- this._PositionY = AlertModel.top_DontSet;
229
- this._PositionX = AlertModel.left_DontSet;
230
- }
231
- }
232
- });
233
- }
234
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: AlertComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
235
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: AlertComponent, isStandalone: true, selector: "app-alert", inputs: { Name: { classPropertyName: "Name", publicName: "Name", 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 } }, ngImport: i0, template: "\r\n<div class=\"container\"\r\n[style.display]=\"isFixPosition ? 'flex' : ''\"\r\n[style.position]=\"isFixPosition ? 'fixed' : 'absolute'\"\r\n[style.z-index]=\"1000000000\"\r\n[style.width]=\"isFixPosition ? '100%' : ''\"\r\n[style.padding-top]=\" isFixPosition ? '100px' : '0'\"\r\n[style.top]=\"isFixPosition?'0px':_PositionY+'px'\"\r\n[style.left]=\"isFixPosition?'0px':_PositionX+'px'\"\r\n>\r\n <div class=\"body\"\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\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 </i>\r\n\r\n <p\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 </p>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n", styles: [".container{align-items:center;justify-content:center;height:auto}.container>.body{width:fit-content;height:auto;max-width:70vw}.container>.body>i{display:block;line-height:0px;text-align:end}.container>.body>i:hover{cursor:pointer}.container>.body>.container-text{display:flex;align-items:center;justify-content:center;height:auto}.container>.body>.container-text>i{line-height:0px;text-align:center}.container>.body>.container-text>p{margin:0;text-align:justify;line-height:normal}\n"] }); }
236
- }
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: AlertComponent, decorators: [{
238
- type: Component,
239
- args: [{ selector: 'app-alert', standalone: true, imports: [], template: "\r\n<div class=\"container\"\r\n[style.display]=\"isFixPosition ? 'flex' : ''\"\r\n[style.position]=\"isFixPosition ? 'fixed' : 'absolute'\"\r\n[style.z-index]=\"1000000000\"\r\n[style.width]=\"isFixPosition ? '100%' : ''\"\r\n[style.padding-top]=\" isFixPosition ? '100px' : '0'\"\r\n[style.top]=\"isFixPosition?'0px':_PositionY+'px'\"\r\n[style.left]=\"isFixPosition?'0px':_PositionX+'px'\"\r\n>\r\n <div class=\"body\"\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\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 </i>\r\n\r\n <p\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 </p>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n", styles: [".container{align-items:center;justify-content:center;height:auto}.container>.body{width:fit-content;height:auto;max-width:70vw}.container>.body>i{display:block;line-height:0px;text-align:end}.container>.body>i:hover{cursor:pointer}.container>.body>.container-text{display:flex;align-items:center;justify-content:center;height:auto}.container>.body>.container-text>i{line-height:0px;text-align:center}.container>.body>.container-text>p{margin:0;text-align:justify;line-height:normal}\n"] }]
240
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
241
-
242
155
  class FormFieldComponent {
156
+ ;
157
+ ;
243
158
  constructor(element, cd) {
244
159
  this.element = element;
245
160
  this.cd = cd;
246
- //Template Properties
247
- this._Icon = input.required();
248
161
  this.Name = input.required();
249
162
  this._placeHolderType = '';
250
- this._placeHolderValue = input.required();
163
+ this._placeHolderValue = '';
251
164
  this._PasswordIcon = IconsEnum.EyeOpen;
252
- this._IconColor = input.required();
253
- this._FontColor = input.required();
254
- this._FontSize = input.required();
255
- this._FontFamily = input.required();
256
- this._FontWeight = input.required();
257
- this._Options = input.required();
258
- this._Width = input.required();
259
- this._Height = input.required();
260
- this._Border = input.required();
261
- this._BorderRadius = input.required();
262
- this._BoxShadowsEnabled = input.required();
263
- //Internal Properties
264
- this.TxtInputType = input.required();
265
- this.IconEnabled = input.required();
266
- this.CountryDataFormat = input.required();
165
+ this._IconColor = '';
166
+ this._FontColor = '';
167
+ this._FontSize = 0;
168
+ this._FontFamily = '';
169
+ this._Options = [];
170
+ this._Width = 0;
171
+ this._Height = 0;
172
+ this._Border = '';
173
+ this._BorderRadius = 0;
174
+ this._BoxShadowsEnabled = false;
175
+ this.IconEnabled = false;
267
176
  this.text = '';
268
177
  this._AlertState = false;
269
- this.FieldType = input.required();
178
+ this.Value = '';
270
179
  //ngxMask
271
180
  this.Mask = "";
272
- this.NumberMaskPrefix = input.required();
181
+ this.NumberMaskPrefix = '';
273
182
  this.Sufixo = "";
274
- this.NumberMaskSufix = input.required();
183
+ this.NumberMaskSufix = '';
275
184
  this.showMaskTyped = false;
276
185
  this.thousandSeparator = ".";
277
- this.NCasasDecimais = input.required();
278
- this.FormFieldModel = new FormFieldModel();
279
- this.FormFielTxtModel = new FormFielTxtModel();
280
- this.FormFieldComboModel = new FormFieldComboModel();
186
+ this.NCasasDecimais = 0;
281
187
  this.AlertTypesEnum = AlertTypesEnum;
282
188
  this.IconsEnum = IconsEnum;
283
189
  this.FormFieldTxtInputTypesEnum = FormFieldTxtInputTypesEnum;
@@ -288,61 +194,69 @@ class FormFieldComponent {
288
194
  this.AlertService = inject(AlertService);
289
195
  }
290
196
  ngOnInit() {
291
- //Limpa as Memórias de Estado
292
- this._placeHolderType = '';
293
- this._AlertState = false;
294
- this.FormFieldModel.name = '';
295
- this.FormFieldModel.name = this.Name();
296
- this.startListenToAlertState();
297
- this.startListenToTextChange();
298
- if (this.FieldType() == FormFieldTypes.TxtBox)
299
- this.configMask();
300
- }
301
- onTxtChange() {
302
- //this.FormFielTxtModel.value está mudando no template pelo ngModel
303
- this.FormFieldModel.name = this.Name();
304
- this.FormFieldModel.field = this.FormFielTxtModel;
305
- this.FormFieldModel.internalCall = true;
306
- this.FormFieldService.valueChanged.next(this.FormFieldModel);
197
+ this.startListenToExternalValueChanged();
198
+ this.startListenToStateChanged();
307
199
  }
308
- onComboChange() {
309
- //this.FormFielComboModel.value está mudando no template pelo ngModel
310
- this.FormFieldModel.name = this.Name();
311
- this.FormFieldComboModel.id = this.getIDFromOption(this.FormFieldComboModel.value);
312
- this.FormFieldModel.field = this.FormFieldComboModel;
313
- this.FormFieldModel.internalCall = true;
314
- this.FormFieldService.valueChanged.next(this.FormFieldModel);
200
+ onValueChanged() {
201
+ this.FormFieldService.valueChanged.next(new FormFieldConfigModel({
202
+ Name: this.Name(),
203
+ Value: this.Value,
204
+ ValueId: this.FieldType == FormFieldTypes.ComboBox ? this._Options.filter(o => o.value == this.Value)[0].id : 0,
205
+ ignoreThisProp: true
206
+ }));
315
207
  }
316
- startListenToTextChange() {
208
+ startListenToExternalValueChanged() {
317
209
  this.FormFieldService.valueChanged.subscribe((model) => {
318
- if (model.name == this.Name() && !model.internalCall) {
319
- if (this.FieldType() == FormFieldTypes.TxtBox) {
320
- this.FormFielTxtModel.value = model.field.value;
321
- this.onTxtChange();
322
- }
323
- if (this.FieldType() == FormFieldTypes.ComboBox) {
324
- for (let i = 0; i < this._Options().length; i++) {
325
- if (this._Options()[i].value.includes(model.field.value)) {
326
- this.FormFieldComboModel.value = this._Options()[i].value;
327
- break;
328
- }
329
- this.FormFieldComboModel.value = '';
330
- }
331
- this.onComboChange();
332
- }
210
+ if (model.Name == this.Name() && !model.ignoreThisProp) {
211
+ this.Value = model.Value;
333
212
  }
334
213
  });
335
214
  }
336
- startListenToAlertState() {
337
- this.FormFieldService.alertState.subscribe((callerData) => {
338
- if (this.Name() == callerData.alertsFatherName) {
339
- callerData.top_DontSet = this.element.nativeElement.getBoundingClientRect().top - (this.element.nativeElement.offsetHeight * 1.5);
340
- callerData.left_DontSet = this.element.nativeElement.getBoundingClientRect().left;
341
- callerData.alertsName_DontSet = this.FormFieldModel.name + '-alert';
342
- this.AlertService.wasOpenned.next(callerData);
215
+ startListenToStateChanged() {
216
+ this.FormFieldService.stateChanged.subscribe((model) => {
217
+ if (model.Name == this.Name()) {
218
+ this._Width = model.Width ?? this._Width;
219
+ this._Height = model.Height ?? this._Height;
220
+ this.FieldType = model.FieldType ?? this.FieldType;
221
+ if (model.ComboValues != null && model.ComboValues != undefined && model.ComboIds != null && model.ComboIds != undefined) {
222
+ this._Options = this.buildOptions(model.ComboValues, model.ComboIds);
223
+ }
224
+ this.Value = model.Value ?? this.Value;
225
+ this.IconEnabled = model.IconEnabled ?? this.IconEnabled;
226
+ this._Icon = model.Icon ?? this._Icon;
227
+ this._IconColor = model.IconColor ?? this._IconColor;
228
+ this._FontSize = model.FontSize ?? this._FontSize;
229
+ this._FontColor = model.FontColor ?? this._FontColor;
230
+ this._FontWeight = model.FontWeight ?? this._FontWeight;
231
+ this._FontFamily = model.FontFamily ?? this._FontFamily;
232
+ this.TxtInputType = model.TxtInputType ?? this.TxtInputType;
233
+ this._placeHolderValue = model.PlaceHolderValue ?? this._placeHolderValue;
234
+ this.NumberMaskPrefix = model.NumberMaskPrefix ?? this.NumberMaskPrefix;
235
+ this.NumberMaskSufix = model.NumberMaskSufix ?? this.NumberMaskSufix;
236
+ this.NCasasDecimais = model.NCasasDecimais ?? this.NCasasDecimais;
237
+ this.CountryDataFormat = model.CountryDataFormat ?? this.CountryDataFormat;
238
+ this._Border = model.Border ?? this._Border;
239
+ this._BorderRadius = model.BorderRadius ?? this._BorderRadius;
240
+ this._BoxShadowsEnabled = model.BoxShadowsEnabled ?? this._BoxShadowsEnabled;
241
+ if (this.FieldType == FormFieldTypes.TxtBox)
242
+ this.configMask();
343
243
  }
344
244
  });
345
245
  }
246
+ buildOptions(values, ids) {
247
+ let objs = [];
248
+ for (let i = 0; i < values.length; i++) {
249
+ objs.push({
250
+ value: values[i],
251
+ id: ids[i]
252
+ });
253
+ }
254
+ objs.push({
255
+ value: '',
256
+ id: 0
257
+ });
258
+ return objs;
259
+ }
346
260
  togglePasswordView() {
347
261
  if (this._PasswordIcon == IconsEnum.EyeClose) {
348
262
  this._PasswordIcon = IconsEnum.EyeOpen;
@@ -354,7 +268,7 @@ class FormFieldComponent {
354
268
  }
355
269
  }
356
270
  configMask() {
357
- switch (this.TxtInputType()) {
271
+ switch (this.TxtInputType) {
358
272
  case (FormFieldTxtInputTypesEnum.Text):
359
273
  this._placeHolderType = 'text';
360
274
  this.Mask = "";
@@ -375,13 +289,13 @@ class FormFieldComponent {
375
289
  break;
376
290
  case (FormFieldTxtInputTypesEnum.Number):
377
291
  this._placeHolderType = 'text';
378
- this.Mask = "separator." + this.NCasasDecimais().toString();
379
- this.Sufixo = this.NumberMaskSufix();
292
+ this.Mask = "separator." + this.NCasasDecimais.toString();
293
+ this.Sufixo = this.NumberMaskSufix;
380
294
  this.showMaskTyped = false;
381
- if (this.CountryDataFormat() == FormFieldCountryDataFormat.Brasil) {
295
+ if (this.CountryDataFormat == FormFieldCountryDataFormat.Brasil) {
382
296
  this.thousandSeparator = ".";
383
297
  }
384
- if (this.CountryDataFormat() == FormFieldCountryDataFormat.Estados_Unidos) {
298
+ if (this.CountryDataFormat == FormFieldCountryDataFormat.Estados_Unidos) {
385
299
  this.thousandSeparator = ",";
386
300
  }
387
301
  break;
@@ -400,32 +314,35 @@ class FormFieldComponent {
400
314
  case (FormFieldTxtInputTypesEnum.CellPhone):
401
315
  this._placeHolderType = 'tel';
402
316
  this.showMaskTyped = true;
403
- if (this.CountryDataFormat() == FormFieldCountryDataFormat.Brasil) {
317
+ if (this.CountryDataFormat == FormFieldCountryDataFormat.Brasil) {
404
318
  this.Mask = "(00) 0 0000-0000";
405
319
  }
406
- if (this.CountryDataFormat() == FormFieldCountryDataFormat.Estados_Unidos) {
320
+ if (this.CountryDataFormat == FormFieldCountryDataFormat.Estados_Unidos) {
407
321
  this.Mask = "(000) 000-0000";
408
322
  }
409
323
  break;
410
324
  }
411
325
  }
412
326
  getIDFromOption(valueText) {
413
- for (var i = 0; i < this._Options().length; i++) {
414
- if (valueText == this._Options()[i].value)
415
- return this._Options()[i].id;
327
+ for (var i = 0; i < this._Options.length; i++) {
328
+ if (valueText == this._Options[i].value)
329
+ return this._Options[i].id;
416
330
  }
417
331
  return 0;
418
332
  }
419
333
  enterPressed() {
420
- this.FormFieldModel.name = this.Name();
421
- this.FormFieldService.enterPressed.next(this.FormFieldModel);
334
+ this.FormFieldService.enterPressed.next(new FormFieldConfigModel({
335
+ Name: this.Name(),
336
+ Value: this.Value,
337
+ ignoreThisProp: true
338
+ }));
422
339
  }
423
340
  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 }); }
424
- 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 }, _Width: { classPropertyName: "_Width", publicName: "_Width", isSignal: true, isRequired: true, transformFunction: null }, _Height: { classPropertyName: "_Height", publicName: "_Height", isSignal: true, isRequired: true, transformFunction: null }, _Border: { classPropertyName: "_Border", publicName: "_Border", isSignal: true, isRequired: true, transformFunction: null }, _BorderRadius: { classPropertyName: "_BorderRadius", publicName: "_BorderRadius", isSignal: true, isRequired: true, transformFunction: null }, _BoxShadowsEnabled: { classPropertyName: "_BoxShadowsEnabled", publicName: "_BoxShadowsEnabled", 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 }, NumberMaskPrefix: { classPropertyName: "NumberMaskPrefix", publicName: "NumberMaskPrefix", 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]=\"_Width() +'px'\"\r\n [style.height]=\"_Height() +'px'\"\r\n [style.border-radius]=\" _BorderRadius() +'px'\"\r\n [style.border]=\"_Border()\"\r\n [ngStyle]=\" _BoxShadowsEnabled() ?\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 (ngModelChange)=\"onTxtChange()\"\r\n prefix=\"{{NumberMaskPrefix()}}\"\r\n suffix=\"{{Sufixo}}\"\r\n mask=\"{{Mask}}\"\r\n [showMaskTyped]=\"showMaskTyped\"\r\n [allowNegativeNumbers]=\"TxtInputType() == FormFieldTxtInputTypesEnum.Number ? true : false\"\r\n thousandSeparator=\"{{thousandSeparator}}\"\r\n (keydown.enter)=\"enterPressed()\"\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]=\"_Width() +'px'\"\r\n [style.margin-left]=\"(_FontSize()*0.500) +'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.width]=\"_Width() +'px'\"\r\n [style.height]=\"_Height() +'px'\"\r\n [style.padding]=\"(_FontSize()*0.4) +'px' + ' ' + (_FontSize()*0.8) +'px'\" \r\n [style.border-radius]=\" _BorderRadius() +'px'\"\r\n [style.border]=\"_Border()\"\r\n [ngStyle]=\" _BoxShadowsEnabled() ?\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.width]=\"_Width() +'px'\"\r\n [style.height]=\"_Height() +'px'\"\r\n\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;box-sizing:border-box}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"] }] }); }
341
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: FormFieldComponent, isStandalone: true, selector: "app-form-field", inputs: { Name: { classPropertyName: "Name", publicName: "Name", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if(FieldType == FormFieldTypes.TxtBox){\r\n\r\n <div class=\"container\" \r\n [style.width]=\"_Width +'px'\"\r\n [style.height]=\"_Height +'px'\"\r\n [style.border-radius]=\" _BorderRadius +'px'\"\r\n [style.border]=\"_Border\"\r\n [ngStyle]=\" _BoxShadowsEnabled ?\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.Value\"\r\n (ngModelChange)=\"onValueChanged()\"\r\n prefix=\"{{NumberMaskPrefix}}\"\r\n suffix=\"{{Sufixo}}\"\r\n mask=\"{{Mask}}\"\r\n [showMaskTyped]=\"showMaskTyped\"\r\n [allowNegativeNumbers]=\"TxtInputType == FormFieldTxtInputTypesEnum.Number ? true : false\"\r\n thousandSeparator=\"{{thousandSeparator}}\"\r\n (keydown.enter)=\"enterPressed()\"\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]=\"_Width +'px'\"\r\n [style.margin-left]=\"(_FontSize*0.500) +'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.width]=\"_Width +'px'\"\r\n [style.height]=\"_Height +'px'\"\r\n [style.padding]=\"(_FontSize*0.4) +'px' + ' ' + (_FontSize*0.8) +'px'\" \r\n [style.border-radius]=\" _BorderRadius +'px'\"\r\n [style.border]=\"_Border\"\r\n [ngStyle]=\" _BoxShadowsEnabled ?\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.Value\"\r\n (ngModelChange)=\"onValueChanged()\"\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]=\"_Width +'px'\"\r\n [style.height]=\"_Height +'px'\"\r\n\r\n >\r\n @for(option of _Options ; track option.id ){\r\n @if(option.value !=''){\r\n <option>{{option.value}}</option>\r\n }\r\n }\r\n </select>\r\n </div>\r\n}\r\n\r\n\r\n\r\n\r\n\r\n", styles: [":host{display:inline-block}.container{display:flex;align-items:center;box-sizing:border-box}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: "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"] }] }); }
425
342
  }
426
343
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: FormFieldComponent, decorators: [{
427
344
  type: Component,
428
- 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]=\"_Width() +'px'\"\r\n [style.height]=\"_Height() +'px'\"\r\n [style.border-radius]=\" _BorderRadius() +'px'\"\r\n [style.border]=\"_Border()\"\r\n [ngStyle]=\" _BoxShadowsEnabled() ?\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 (ngModelChange)=\"onTxtChange()\"\r\n prefix=\"{{NumberMaskPrefix()}}\"\r\n suffix=\"{{Sufixo}}\"\r\n mask=\"{{Mask}}\"\r\n [showMaskTyped]=\"showMaskTyped\"\r\n [allowNegativeNumbers]=\"TxtInputType() == FormFieldTxtInputTypesEnum.Number ? true : false\"\r\n thousandSeparator=\"{{thousandSeparator}}\"\r\n (keydown.enter)=\"enterPressed()\"\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]=\"_Width() +'px'\"\r\n [style.margin-left]=\"(_FontSize()*0.500) +'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.width]=\"_Width() +'px'\"\r\n [style.height]=\"_Height() +'px'\"\r\n [style.padding]=\"(_FontSize()*0.4) +'px' + ' ' + (_FontSize()*0.8) +'px'\" \r\n [style.border-radius]=\" _BorderRadius() +'px'\"\r\n [style.border]=\"_Border()\"\r\n [ngStyle]=\" _BoxShadowsEnabled() ?\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.width]=\"_Width() +'px'\"\r\n [style.height]=\"_Height() +'px'\"\r\n\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;box-sizing:border-box}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"] }]
345
+ args: [{ selector: 'app-form-field', standalone: true, imports: [FormsModule, CommonModule, i3.NgxMaskDirective], template: "@if(FieldType == FormFieldTypes.TxtBox){\r\n\r\n <div class=\"container\" \r\n [style.width]=\"_Width +'px'\"\r\n [style.height]=\"_Height +'px'\"\r\n [style.border-radius]=\" _BorderRadius +'px'\"\r\n [style.border]=\"_Border\"\r\n [ngStyle]=\" _BoxShadowsEnabled ?\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.Value\"\r\n (ngModelChange)=\"onValueChanged()\"\r\n prefix=\"{{NumberMaskPrefix}}\"\r\n suffix=\"{{Sufixo}}\"\r\n mask=\"{{Mask}}\"\r\n [showMaskTyped]=\"showMaskTyped\"\r\n [allowNegativeNumbers]=\"TxtInputType == FormFieldTxtInputTypesEnum.Number ? true : false\"\r\n thousandSeparator=\"{{thousandSeparator}}\"\r\n (keydown.enter)=\"enterPressed()\"\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]=\"_Width +'px'\"\r\n [style.margin-left]=\"(_FontSize*0.500) +'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.width]=\"_Width +'px'\"\r\n [style.height]=\"_Height +'px'\"\r\n [style.padding]=\"(_FontSize*0.4) +'px' + ' ' + (_FontSize*0.8) +'px'\" \r\n [style.border-radius]=\" _BorderRadius +'px'\"\r\n [style.border]=\"_Border\"\r\n [ngStyle]=\" _BoxShadowsEnabled ?\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.Value\"\r\n (ngModelChange)=\"onValueChanged()\"\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]=\"_Width +'px'\"\r\n [style.height]=\"_Height +'px'\"\r\n\r\n >\r\n @for(option of _Options ; track option.id ){\r\n @if(option.value !=''){\r\n <option>{{option.value}}</option>\r\n }\r\n }\r\n </select>\r\n </div>\r\n}\r\n\r\n\r\n\r\n\r\n\r\n", styles: [":host{display:inline-block}.container{display:flex;align-items:center;box-sizing:border-box}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"] }]
429
346
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }] });
430
347
 
431
348
  var ButtonTypeEnum;
@@ -486,6 +403,18 @@ class ButtonConfigModel {
486
403
  }
487
404
  }
488
405
 
406
+ class AlertModel {
407
+ constructor() {
408
+ this.alertsName_DontSet = '';
409
+ this.alertsFatherName = '';
410
+ this.top_DontSet = 0;
411
+ this.left_DontSet = 0;
412
+ this.text = '';
413
+ this.isFixPosition = false;
414
+ this.wasClosed_DontSet = false;
415
+ }
416
+ }
417
+
489
418
  class ButtonComponent {
490
419
  constructor(element) {
491
420
  this.element = element;
@@ -761,6 +690,81 @@ class ListItemConfigModel {
761
690
  }
762
691
  }
763
692
 
693
+ class AlertComponent {
694
+ constructor(cd) {
695
+ this.cd = cd;
696
+ this.Name = input.required();
697
+ this._FontSize = input.required();
698
+ this._FontFamily = input.required();
699
+ this._FontWeight = input.required();
700
+ this._FontColor = 'white';
701
+ this._Text = '';
702
+ this._PositionY = 0;
703
+ this._PositionX = 0;
704
+ this._Icon = '';
705
+ this.BackgroundColor = '';
706
+ this._IconClose = '';
707
+ this.isVisible = false;
708
+ this.AlertService = inject(AlertService);
709
+ }
710
+ ngOnInit() {
711
+ this._PositionX = 0;
712
+ this._PositionY = 0;
713
+ this._FontColor = 'white';
714
+ this._Icon = '';
715
+ this.BackgroundColor = '';
716
+ this._IconClose = '';
717
+ this.AlertModel = new AlertModel();
718
+ this._IconClose = IconsEnum.Close;
719
+ this.startListenToAlertShowed();
720
+ }
721
+ OnClose() {
722
+ this.isVisible = false;
723
+ this.AlertModel.alertsName_DontSet = this.Name();
724
+ this.AlertModel.wasClosed_DontSet = true;
725
+ this.AlertService.wasClosed.next(this.AlertModel);
726
+ }
727
+ startListenToAlertShowed() {
728
+ this.AlertService.wasOpenned.subscribe((AlertModel) => {
729
+ if (this.Name() == AlertModel.alertsName_DontSet) {
730
+ this._Text = AlertModel.text;
731
+ this.AlertType = AlertModel.type;
732
+ this.isFixPosition = AlertModel.isFixPosition;
733
+ this.isVisible = true;
734
+ switch (this.AlertType) {
735
+ case (AlertTypesEnum.Done):
736
+ this._Icon = IconsEnum.Done_Fill;
737
+ this.BackgroundColor = '#008B10';
738
+ this._FontColor = 'white';
739
+ break;
740
+ case (AlertTypesEnum.Alert):
741
+ this._Icon = IconsEnum.Alert;
742
+ this.BackgroundColor = '#DFCD00';
743
+ this._FontColor = 'black';
744
+ break;
745
+ case (AlertTypesEnum.NotDone):
746
+ this._Icon = IconsEnum.NotDone;
747
+ this.BackgroundColor = '#D40000';
748
+ this._FontColor = 'white';
749
+ break;
750
+ }
751
+ if (this.isFixPosition) {
752
+ }
753
+ else {
754
+ this._PositionY = AlertModel.top_DontSet;
755
+ this._PositionX = AlertModel.left_DontSet;
756
+ }
757
+ }
758
+ });
759
+ }
760
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: AlertComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
761
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.0", type: AlertComponent, isStandalone: true, selector: "app-alert", inputs: { Name: { classPropertyName: "Name", publicName: "Name", 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 } }, ngImport: i0, template: "\r\n<div class=\"container\"\r\n[style.display]=\"isFixPosition ? 'flex' : ''\"\r\n[style.position]=\"isFixPosition ? 'fixed' : 'absolute'\"\r\n[style.z-index]=\"1000000000\"\r\n[style.width]=\"isFixPosition ? '100%' : ''\"\r\n[style.padding-top]=\" isFixPosition ? '100px' : '0'\"\r\n[style.top]=\"isFixPosition?'0px':_PositionY+'px'\"\r\n[style.left]=\"isFixPosition?'0px':_PositionX+'px'\"\r\n>\r\n <div class=\"body\"\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\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 </i>\r\n\r\n <p\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 </p>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n", styles: [".container{align-items:center;justify-content:center;height:auto}.container>.body{width:fit-content;height:auto;max-width:70vw}.container>.body>i{display:block;line-height:0px;text-align:end}.container>.body>i:hover{cursor:pointer}.container>.body>.container-text{display:flex;align-items:center;justify-content:center;height:auto}.container>.body>.container-text>i{line-height:0px;text-align:center}.container>.body>.container-text>p{margin:0;text-align:justify;line-height:normal}\n"] }); }
762
+ }
763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: AlertComponent, decorators: [{
764
+ type: Component,
765
+ args: [{ selector: 'app-alert', standalone: true, imports: [], template: "\r\n<div class=\"container\"\r\n[style.display]=\"isFixPosition ? 'flex' : ''\"\r\n[style.position]=\"isFixPosition ? 'fixed' : 'absolute'\"\r\n[style.z-index]=\"1000000000\"\r\n[style.width]=\"isFixPosition ? '100%' : ''\"\r\n[style.padding-top]=\" isFixPosition ? '100px' : '0'\"\r\n[style.top]=\"isFixPosition?'0px':_PositionY+'px'\"\r\n[style.left]=\"isFixPosition?'0px':_PositionX+'px'\"\r\n>\r\n <div class=\"body\"\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\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 </i>\r\n\r\n <p\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 </p>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n", styles: [".container{align-items:center;justify-content:center;height:auto}.container>.body{width:fit-content;height:auto;max-width:70vw}.container>.body>i{display:block;line-height:0px;text-align:end}.container>.body>i:hover{cursor:pointer}.container>.body>.container-text{display:flex;align-items:center;justify-content:center;height:auto}.container>.body>.container-text>i{line-height:0px;text-align:center}.container>.body>.container-text>p{margin:0;text-align:justify;line-height:normal}\n"] }]
766
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
767
+
764
768
  class LabelModel {
765
769
  constructor() {
766
770
  this.name = '';
@@ -1175,5 +1179,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
1175
1179
  * Generated bundle index. Do not edit.
1176
1180
  */
1177
1181
 
1178
- export { AlertComponent, AlertModel, AlertService, AlertTypesEnum, ButtonComponent, ButtonConfigModel, ButtonIconPositionEnum, ButtonService, ButtonTypeEnum, FontWeights, FormFielTxtModel, FormFieldComboModel, FormFieldComponent, FormFieldCountryDataFormat, FormFieldFontWeights, FormFieldModel, FormFieldService, FormFieldTxtInputTypesEnum, FormFieldTypes, IconsEnum, LabelComponent, LabelFontWeights, LabelIconPositionEnum, LabelModel, LabelService, ListItemComponent, ListItemConfigModel, ListItemItemNumberPositionEnum, ListItemService, ListItemTextAlignEnum, ListItemTypeEnum, ModalComponent, ModalModel, ModalService, TableComponent, TableFontWeights, TableModel, TableModes, TableService };
1182
+ export { AlertComponent, AlertModel, AlertService, AlertTypesEnum, ButtonComponent, ButtonConfigModel, ButtonIconPositionEnum, ButtonService, ButtonTypeEnum, FontWeights, FormFieldComponent, FormFieldConfigModel, FormFieldCountryDataFormat, FormFieldService, FormFieldTxtInputTypesEnum, FormFieldTypes, IconsEnum, LabelComponent, LabelFontWeights, LabelIconPositionEnum, LabelModel, LabelService, ListItemComponent, ListItemConfigModel, ListItemItemNumberPositionEnum, ListItemService, ListItemTextAlignEnum, ListItemTypeEnum, ModalComponent, ModalModel, ModalService, TableComponent, TableFontWeights, TableModel, TableModes, TableService };
1179
1183
  //# sourceMappingURL=lightning-tec-br-angular-components.mjs.map