iptdevs-design-system 2.2.22 → 2.2.25

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,8 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, Input, Output, Injectable, NgModule } from '@angular/core';
3
- import { BrowserModule } from '@angular/platform-browser';
4
3
  import * as i1 from '@angular/common';
5
- import { CommonModule } from '@angular/common';
4
+ import { CommonModule, CurrencyPipe, TitleCasePipe } from '@angular/common';
6
5
  import * as i1$1 from '@angular/forms';
7
6
  import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
7
  import Swal from 'sweetalert2';
@@ -253,21 +252,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
253
252
  }] } });
254
253
 
255
254
  class InputComponent {
256
- constructor() {
255
+ constructor(currencyPipe) {
256
+ this.currencyPipe = currencyPipe;
257
257
  this.data = [];
258
258
  this.clicked = false;
259
+ this.withPipe = false;
259
260
  }
260
261
  set control(value) {
261
262
  if (this.formControl !== value) {
262
263
  this.formControl = value;
263
264
  }
264
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));
265
279
  click(value) {
266
280
  this.clicked = value.isTrusted;
267
281
  }
268
282
  }
269
- InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
270
- 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: `
271
285
  <div class="input-container">
272
286
  <input *ngIf="inputType === 'date'"
273
287
  class="input"
@@ -278,12 +292,21 @@ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
278
292
  uib-datepicker-popup="dd/MM/yyyy"
279
293
  ng-model="inputType"/>
280
294
 
281
- <input *ngIf="inputType !== 'date' && inputType !== 'time'"
295
+ <input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
282
296
  class="input"
297
+ type="{{ inputType }}"
298
+ [formControl]="formControl"
299
+ [attr.list]="list"/>
300
+
301
+ <input *ngIf="inputType === 'text' && withPipe"
283
302
  class="input"
284
303
  type="{{ inputType }}"
285
304
  [formControl]="formControl"
286
305
  [attr.list]="list"/>
306
+ <pre>
307
+ {{ formControl | json }}
308
+ {{ control | json }}
309
+ </pre>
287
310
 
288
311
  <input *ngIf="inputType === 'time'"
289
312
  class="input"
@@ -303,7 +326,7 @@ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
303
326
  {{ validateText }}
304
327
  </p>
305
328
  </div>
306
- `, 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"] }] });
329
+ `, 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 } });
307
330
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, decorators: [{
308
331
  type: Component,
309
332
  args: [{ selector: 'ipt-input', template: `
@@ -317,12 +340,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
317
340
  uib-datepicker-popup="dd/MM/yyyy"
318
341
  ng-model="inputType"/>
319
342
 
320
- <input *ngIf="inputType !== 'date' && inputType !== 'time'"
343
+ <input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
321
344
  class="input"
345
+ type="{{ inputType }}"
346
+ [formControl]="formControl"
347
+ [attr.list]="list"/>
348
+
349
+ <input *ngIf="inputType === 'text' && withPipe"
322
350
  class="input"
323
351
  type="{{ inputType }}"
324
352
  [formControl]="formControl"
325
353
  [attr.list]="list"/>
354
+ <pre>
355
+ {{ formControl | json }}
356
+ {{ control | json }}
357
+ </pre>
326
358
 
327
359
  <input *ngIf="inputType === 'time'"
328
360
  class="input"
@@ -343,12 +375,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
343
375
  </p>
344
376
  </div>
345
377
  `, 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"] }]
346
- }], propDecorators: { inputType: [{
378
+ }], ctorParameters: function () { return [{ type: i1.CurrencyPipe }]; }, propDecorators: { inputType: [{
347
379
  type: Input
348
380
  }], placeHolder: [{
349
381
  type: Input
350
382
  }], validateText: [{
351
383
  type: Input
384
+ }], withPipe: [{
385
+ type: Input
352
386
  }], list: [{
353
387
  type: Input
354
388
  }], iconUrl: [{
@@ -922,7 +956,7 @@ LoginFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
922
956
  </div>
923
957
 
924
958
  </div>
925
- `, 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"] }] });
959
+ `, 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"] }] });
926
960
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LoginFormComponent, decorators: [{
927
961
  type: Component,
928
962
  args: [{ selector: 'ipt-login-form', template: `
@@ -1125,7 +1159,7 @@ ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
1125
1159
  TextLinkComponent,
1126
1160
  LoginFormComponent,
1127
1161
  SidenavComponent], imports: [CommonModule,
1128
- BrowserModule,
1162
+ // BrowserModule, // Para evitar doble carga de BrowserModule
1129
1163
  FormsModule,
1130
1164
  ReactiveFormsModule,
1131
1165
  MaterialModule], exports: [AsideButtonComponent,
@@ -1140,9 +1174,12 @@ ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
1140
1174
  TextLinkComponent,
1141
1175
  LoginFormComponent,
1142
1176
  SidenavComponent] });
1143
- ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, imports: [[
1177
+ ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, providers: [
1178
+ CurrencyPipe,
1179
+ TitleCasePipe
1180
+ ], imports: [[
1144
1181
  CommonModule,
1145
- BrowserModule,
1182
+ // BrowserModule, // Para evitar doble carga de BrowserModule
1146
1183
  FormsModule,
1147
1184
  ReactiveFormsModule,
1148
1185
  MaterialModule
@@ -1166,7 +1203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
1166
1203
  ],
1167
1204
  imports: [
1168
1205
  CommonModule,
1169
- BrowserModule,
1206
+ // BrowserModule, // Para evitar doble carga de BrowserModule
1170
1207
  FormsModule,
1171
1208
  ReactiveFormsModule,
1172
1209
  MaterialModule
@@ -1184,6 +1221,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
1184
1221
  TextLinkComponent,
1185
1222
  LoginFormComponent,
1186
1223
  SidenavComponent,
1224
+ ],
1225
+ providers: [
1226
+ CurrencyPipe,
1227
+ TitleCasePipe
1187
1228
  ]
1188
1229
  }]
1189
1230
  }] });