iptdevs-design-system 2.2.23 → 2.2.26
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/esm2020/lib/components/atoms/input/input.component.mjs +50 -8
- package/esm2020/lib/components/components.module.mjs +10 -3
- package/esm2020/lib/components/forms/login-form/login-form.component.mjs +1 -1
- package/fesm2015/iptdevs-design-system.mjs +59 -10
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +59 -10
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/components/atoms/input/input.component.d.ts +9 -2
- package/package.json +1 -1
|
@@ -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,43 @@ 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
|
+
this.formControl = this.currenPipe(this.formControl.value);
|
|
268
|
+
// if (this.withPipe && this.formControl !== null) {
|
|
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
|
+
// })
|
|
277
|
+
// }
|
|
278
|
+
}
|
|
279
|
+
currenPipe(datControl) {
|
|
280
|
+
let formatted = new Intl.NumberFormat("en-US", {
|
|
281
|
+
style: 'currency',
|
|
282
|
+
currency: 'USD'
|
|
283
|
+
}).format(datControl);
|
|
284
|
+
return formatted;
|
|
285
|
+
}
|
|
264
286
|
click(value) {
|
|
265
287
|
this.clicked = value.isTrusted;
|
|
266
288
|
}
|
|
267
289
|
}
|
|
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: `
|
|
290
|
+
InputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, deps: [{ token: i1.CurrencyPipe }], target: i0.ɵɵFactoryTarget.Component });
|
|
291
|
+
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
292
|
<div class="input-container">
|
|
271
293
|
<input *ngIf="inputType === 'date'"
|
|
272
294
|
class="input"
|
|
@@ -277,12 +299,21 @@ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
|
|
|
277
299
|
uib-datepicker-popup="dd/MM/yyyy"
|
|
278
300
|
ng-model="inputType"/>
|
|
279
301
|
|
|
280
|
-
<input *ngIf="inputType !== 'date' && inputType !== 'time'"
|
|
302
|
+
<input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
|
|
281
303
|
class="input"
|
|
304
|
+
type="{{ inputType }}"
|
|
305
|
+
[formControl]="formControl"
|
|
306
|
+
[attr.list]="list"/>
|
|
307
|
+
|
|
308
|
+
<input *ngIf="inputType === 'text' && withPipe"
|
|
282
309
|
class="input"
|
|
283
310
|
type="{{ inputType }}"
|
|
284
311
|
[formControl]="formControl"
|
|
285
312
|
[attr.list]="list"/>
|
|
313
|
+
<pre>
|
|
314
|
+
{{ formControl | json }}
|
|
315
|
+
{{ control | json }}
|
|
316
|
+
</pre>
|
|
286
317
|
|
|
287
318
|
<input *ngIf="inputType === 'time'"
|
|
288
319
|
class="input"
|
|
@@ -302,7 +333,7 @@ InputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
|
|
|
302
333
|
{{ validateText }}
|
|
303
334
|
</p>
|
|
304
335
|
</div>
|
|
305
|
-
`, 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 } });
|
|
306
337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputComponent, decorators: [{
|
|
307
338
|
type: Component,
|
|
308
339
|
args: [{ selector: 'ipt-input', template: `
|
|
@@ -316,12 +347,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
316
347
|
uib-datepicker-popup="dd/MM/yyyy"
|
|
317
348
|
ng-model="inputType"/>
|
|
318
349
|
|
|
319
|
-
<input *ngIf="inputType !== 'date' && inputType !== 'time'"
|
|
350
|
+
<input *ngIf="inputType !== 'date' && inputType !== 'time' && !withPipe"
|
|
320
351
|
class="input"
|
|
352
|
+
type="{{ inputType }}"
|
|
353
|
+
[formControl]="formControl"
|
|
354
|
+
[attr.list]="list"/>
|
|
355
|
+
|
|
356
|
+
<input *ngIf="inputType === 'text' && withPipe"
|
|
321
357
|
class="input"
|
|
322
358
|
type="{{ inputType }}"
|
|
323
359
|
[formControl]="formControl"
|
|
324
360
|
[attr.list]="list"/>
|
|
361
|
+
<pre>
|
|
362
|
+
{{ formControl | json }}
|
|
363
|
+
{{ control | json }}
|
|
364
|
+
</pre>
|
|
325
365
|
|
|
326
366
|
<input *ngIf="inputType === 'time'"
|
|
327
367
|
class="input"
|
|
@@ -342,12 +382,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
342
382
|
</p>
|
|
343
383
|
</div>
|
|
344
384
|
`, 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: [{
|
|
385
|
+
}], ctorParameters: function () { return [{ type: i1.CurrencyPipe }]; }, propDecorators: { inputType: [{
|
|
346
386
|
type: Input
|
|
347
387
|
}], placeHolder: [{
|
|
348
388
|
type: Input
|
|
349
389
|
}], validateText: [{
|
|
350
390
|
type: Input
|
|
391
|
+
}], withPipe: [{
|
|
392
|
+
type: Input
|
|
351
393
|
}], list: [{
|
|
352
394
|
type: Input
|
|
353
395
|
}], iconUrl: [{
|
|
@@ -921,7 +963,7 @@ LoginFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
921
963
|
</div>
|
|
922
964
|
|
|
923
965
|
</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"] }] });
|
|
966
|
+
`, 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
967
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LoginFormComponent, decorators: [{
|
|
926
968
|
type: Component,
|
|
927
969
|
args: [{ selector: 'ipt-login-form', template: `
|
|
@@ -1139,7 +1181,10 @@ ComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
|
|
|
1139
1181
|
TextLinkComponent,
|
|
1140
1182
|
LoginFormComponent,
|
|
1141
1183
|
SidenavComponent] });
|
|
1142
|
-
ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule,
|
|
1184
|
+
ComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: ComponentsModule, providers: [
|
|
1185
|
+
CurrencyPipe,
|
|
1186
|
+
TitleCasePipe
|
|
1187
|
+
], imports: [[
|
|
1143
1188
|
CommonModule,
|
|
1144
1189
|
// BrowserModule, // Para evitar doble carga de BrowserModule
|
|
1145
1190
|
FormsModule,
|
|
@@ -1183,6 +1228,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
1183
1228
|
TextLinkComponent,
|
|
1184
1229
|
LoginFormComponent,
|
|
1185
1230
|
SidenavComponent,
|
|
1231
|
+
],
|
|
1232
|
+
providers: [
|
|
1233
|
+
CurrencyPipe,
|
|
1234
|
+
TitleCasePipe
|
|
1186
1235
|
]
|
|
1187
1236
|
}]
|
|
1188
1237
|
}] });
|