iptdevs-design-system 2.2.23 → 2.2.24

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.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, Input, Output, Injectable, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
4
+ import { CommonModule, CurrencyPipe, TitleCasePipe } from '@angular/common';
5
5
  import * as i1$1 from '@angular/forms';
6
6
  import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
7
  import Swal from 'sweetalert2';
@@ -252,21 +252,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
252
252
  }] } });
253
253
 
254
254
  class InputComponent {
255
- constructor() {
255
+ constructor(currencyPipe) {
256
+ this.currencyPipe = currencyPipe;
256
257
  this.data = [];
257
258
  this.clicked = false;
259
+ this.withPipe = false;
258
260
  }
259
261
  set control(value) {
260
262
  if (this.formControl !== value) {
261
263
  this.formControl = value;
262
264
  }
263
265
  }
266
+ ngOnInit() {
267
+ if (this.withPipe && this.formControl !== null) {
268
+ console.log(this.withPipe, this.formControl, this.control);
269
+ this.formControl.valueChanges.subscribe(value => {
270
+ console.log(value);
271
+ this.formControl.patchValue({ control: this.currencyPipe.transform(value) }, { onlySelf: true, emitEvent: false });
272
+ });
273
+ }
274
+ }
275
+ // let forma = new Intl.NumberFormat("en-US", {
276
+ // style: 'currency',
277
+ // currency: 'USD'
278
+ // }).format((idConcept));
264
279
  click(value) {
265
280
  this.clicked = value.isTrusted;
266
281
  }
267
282
  }
268
- InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
269
- InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: InputComponent, selector: "ipt-input", inputs: { inputType: "inputType", placeHolder: "placeHolder", validateText: "validateText", list: "list", iconUrl: "iconUrl", control: "control" }, ngImport: i0, template: `
283
+ InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, deps: [{ token: i1.CurrencyPipe }], target: i0.ɵɵFactoryTarget.Component });
284
+ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: InputComponent, selector: "ipt-input", inputs: { inputType: "inputType", placeHolder: "placeHolder", validateText: "validateText", withPipe: "withPipe", list: "list", iconUrl: "iconUrl", control: "control" }, ngImport: i0, template: `
270
285
  <div class="input-container">
271
286
  <input *ngIf="inputType === 'date'"
272
287
  class="input"
@@ -279,6 +294,11 @@ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
279
294
 
280
295
  <input *ngIf="inputType !== 'date' && inputType !== 'time'"
281
296
  class="input"
297
+ type="{{ inputType }}"
298
+ [formControl]="formControl"
299
+ [attr.list]="list"/>
300
+
301
+ <input *ngIf="inputType === 'text' && withPipe"
282
302
  class="input"
283
303
  type="{{ inputType }}"
284
304
  [formControl]="formControl"
@@ -318,6 +338,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
318
338
 
319
339
  <input *ngIf="inputType !== 'date' && inputType !== 'time'"
320
340
  class="input"
341
+ type="{{ inputType }}"
342
+ [formControl]="formControl"
343
+ [attr.list]="list"/>
344
+
345
+ <input *ngIf="inputType === 'text' && withPipe"
321
346
  class="input"
322
347
  type="{{ inputType }}"
323
348
  [formControl]="formControl"
@@ -342,12 +367,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
342
367
  </p>
343
368
  </div>
344
369
  `, styles: ["*{font-family:Poppins,sans-serif}@media screen and (min-width: 320px){p{color:#c73a3a;font-size:12px;padding-left:15px}}@media screen and (min-width: 768px){p{color:#c73a3a;font-size:13px;padding-left:15px}}@media screen and (min-width: 1024px){p{color:#c73a3a;font-size:13px;padding-left:15px}}.input-container{position:relative;margin-top:30px}input{box-shadow:#64646f33 0 7px 29px;border-radius:10px;border:none;outline:none;display:block;transition:.2s;font-weight:300;width:-webkit-fill-available;width:-moz-available;height:28px;padding-left:10px;background-color:#fff;-webkit-appearance:none}input:hover{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px}input:focus{box-shadow:#00000029 0 3px 6px,#0000003b 0 3px 6px;transition:0s;border:1.5px solid #1c77f7}label{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:7px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}.input:focus~label,.input:invalid~label{top:-20px;font-size:15px;color:#1c77f7}.labelUp{color:#999;font-size:15px;font-weight:400;position:absolute;pointer-events:none;left:20px;top:-20px;transition:.2s ease all;-moz-transition:.2s ease all;-webkit-transition:.2s ease all}\n"] }]
345
- }], propDecorators: { inputType: [{
370
+ }], ctorParameters: function () { return [{ type: i1.CurrencyPipe }]; }, propDecorators: { inputType: [{
346
371
  type: Input
347
372
  }], placeHolder: [{
348
373
  type: Input
349
374
  }], validateText: [{
350
375
  type: Input
376
+ }], withPipe: [{
377
+ type: Input
351
378
  }], list: [{
352
379
  type: Input
353
380
  }], iconUrl: [{
@@ -921,7 +948,7 @@ LoginFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
921
948
  </div>
922
949
 
923
950
  </div>
924
- `, isInline: true, styles: [".form-container{display:grid;grid-template-columns:1fr;justify-items:center;width:350px}.with-background{background-color:#fff;border-radius:25px;box-shadow:#32325d40 0 50px 100px -20px,#0000004d 0 30px 60px -30px}h2{color:#1c77f7}hr{width:80%}form{margin-bottom:60px;display:grid;grid-template-columns:1fr;grid-gap:30px;gap:30px;width:100%}.button-container{margin-bottom:70px;align-items:center;display:flex;gap:50px}footer{background-color:#1c77f7;border-top-left-radius:25px;border-top-right-radius:25px;width:100%;height:100px;display:flex;align-items:center;justify-content:center}\n"], components: [{ type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "list", "iconUrl", "control"] }, { type: ButtonComponent, selector: "ipt-button", inputs: ["primary", "size", "label", "buttonType", "isEnabled"], outputs: ["onClick"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
951
+ `, isInline: true, styles: [".form-container{display:grid;grid-template-columns:1fr;justify-items:center;width:350px}.with-background{background-color:#fff;border-radius:25px;box-shadow:#32325d40 0 50px 100px -20px,#0000004d 0 30px 60px -30px}h2{color:#1c77f7}hr{width:80%}form{margin-bottom:60px;display:grid;grid-template-columns:1fr;grid-gap:30px;gap:30px;width:100%}.button-container{margin-bottom:70px;align-items:center;display:flex;gap:50px}footer{background-color:#1c77f7;border-top-left-radius:25px;border-top-right-radius:25px;width:100%;height:100px;display:flex;align-items:center;justify-content:center}\n"], components: [{ type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control"] }, { type: ButtonComponent, selector: "ipt-button", inputs: ["primary", "size", "label", "buttonType", "isEnabled"], outputs: ["onClick"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
925
952
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LoginFormComponent, decorators: [{
926
953
  type: Component,
927
954
  args: [{ selector: 'ipt-login-form', template: `
@@ -1139,7 +1166,10 @@ ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
1139
1166
  TextLinkComponent,
1140
1167
  LoginFormComponent,
1141
1168
  SidenavComponent] });
1142
- ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, imports: [[
1169
+ ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, providers: [
1170
+ CurrencyPipe,
1171
+ TitleCasePipe
1172
+ ], imports: [[
1143
1173
  CommonModule,
1144
1174
  // BrowserModule, // Para evitar doble carga de BrowserModule
1145
1175
  FormsModule,
@@ -1183,6 +1213,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
1183
1213
  TextLinkComponent,
1184
1214
  LoginFormComponent,
1185
1215
  SidenavComponent,
1216
+ ],
1217
+ providers: [
1218
+ CurrencyPipe,
1219
+ TitleCasePipe
1186
1220
  ]
1187
1221
  }]
1188
1222
  }] });