iptdevs-design-system 2.2.24 → 2.2.27

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.
@@ -265,17 +265,24 @@ class InputComponent {
265
265
  }
266
266
  ngOnInit() {
267
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
- });
268
+ this.formControl = this.currenPipe(this.formControl.value);
269
+ // console.log(this.withPipe, this.formControl, this.control);
270
+ // this.formControl.valueChanges.subscribe(value => {
271
+ // console.log(value);
272
+ // this.formControl.patchValue(
273
+ // { control: this.currencyPipe.transform(value)},
274
+ // { onlySelf: true, emitEvent: false}
275
+ // )
276
+ // })
273
277
  }
274
278
  }
275
- // let forma = new Intl.NumberFormat("en-US", {
276
- // style: 'currency',
277
- // currency: 'USD'
278
- // }).format((idConcept));
279
+ currenPipe(datControl) {
280
+ let formatted = new Intl.NumberFormat("en-US", {
281
+ style: 'currency',
282
+ currency: 'USD'
283
+ }).format(datControl);
284
+ return formatted;
285
+ }
279
286
  click(value) {
280
287
  this.clicked = value.isTrusted;
281
288
  }
@@ -292,7 +299,7 @@ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
292
299
  uib-datepicker-popup="dd/MM/yyyy"
293
300
  ng-model="inputType"/>
294
301
 
295
- <input *ngIf="inputType !== 'date' && inputType !== 'time'"
302
+ <input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
296
303
  class="input"
297
304
  type="{{ inputType }}"
298
305
  [formControl]="formControl"
@@ -303,6 +310,10 @@ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
303
310
  type="{{ inputType }}"
304
311
  [formControl]="formControl"
305
312
  [attr.list]="list"/>
313
+ <pre>
314
+ {{ formControl | json }}
315
+ {{ control | json }}
316
+ </pre>
306
317
 
307
318
  <input *ngIf="inputType === 'time'"
308
319
  class="input"
@@ -322,7 +333,7 @@ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
322
333
  {{ validateText }}
323
334
  </p>
324
335
  </div>
325
- `, isInline: true, 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"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
336
+ `, isInline: true, 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"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "json": i1.JsonPipe } });
326
337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, decorators: [{
327
338
  type: Component,
328
339
  args: [{ selector: 'ipt-input', template: `
@@ -336,7 +347,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
336
347
  uib-datepicker-popup="dd/MM/yyyy"
337
348
  ng-model="inputType"/>
338
349
 
339
- <input *ngIf="inputType !== 'date' && inputType !== 'time'"
350
+ <input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
340
351
  class="input"
341
352
  type="{{ inputType }}"
342
353
  [formControl]="formControl"
@@ -347,6 +358,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
347
358
  type="{{ inputType }}"
348
359
  [formControl]="formControl"
349
360
  [attr.list]="list"/>
361
+ <pre>
362
+ {{ formControl | json }}
363
+ {{ control | json }}
364
+ </pre>
350
365
 
351
366
  <input *ngIf="inputType === 'time'"
352
367
  class="input"