iptdevs-design-system 3.1.382 → 3.1.383

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.
@@ -34,7 +34,7 @@ import { InputTextareaModule } from 'primeng/inputtextarea';
34
34
  import * as i8 from 'primeng/inputtext';
35
35
  import { InputTextModule } from 'primeng/inputtext';
36
36
  import * as i1$3 from '@angular/router';
37
- import * as i1$4 from 'primeng/steps';
37
+ import * as i2 from 'primeng/steps';
38
38
  import { StepsModule } from 'primeng/steps';
39
39
 
40
40
  class AsideButtonComponent {
@@ -6095,50 +6095,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
6095
6095
  }]
6096
6096
  }] });
6097
6097
 
6098
+ class CodSelfFormStepOneComponent {
6099
+ constructor() {
6100
+ this.completed = new EventEmitter();
6101
+ }
6102
+ submitForm() {
6103
+ if (this.name && this.age > 0) {
6104
+ // Aquí podrías realizar cualquier otra validación necesaria
6105
+ // Si el formulario es válido, emitir el evento de completado
6106
+ this.completed.emit();
6107
+ }
6108
+ else {
6109
+ // Manejar el caso en el que el formulario no sea válido
6110
+ console.log('Completa todos los campos antes de continuar.');
6111
+ }
6112
+ }
6113
+ }
6114
+ CodSelfFormStepOneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepOneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6115
+ CodSelfFormStepOneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodSelfFormStepOneComponent, selector: "app-cod-self-form-step-one", outputs: { completed: "completed" }, ngImport: i0, template: "<div>\n <h2>Paso 1: Datos Personales</h2>\n <form (ngSubmit)=\"submitForm()\">\n <label for=\"name\">Nombre:</label>\n <input type=\"text\" id=\"name\" [(ngModel)]=\"name\" name=\"name\" required>\n\n <label for=\"age\">Edad:</label>\n <input type=\"number\" id=\"age\" [(ngModel)]=\"age\" name=\"age\" required>\n\n <button type=\"submit\">Siguiente</button>\n </form>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", 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]" }, { kind: "directive", type: i1$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
6116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepOneComponent, decorators: [{
6117
+ type: Component,
6118
+ args: [{ selector: 'app-cod-self-form-step-one', template: "<div>\n <h2>Paso 1: Datos Personales</h2>\n <form (ngSubmit)=\"submitForm()\">\n <label for=\"name\">Nombre:</label>\n <input type=\"text\" id=\"name\" [(ngModel)]=\"name\" name=\"name\" required>\n\n <label for=\"age\">Edad:</label>\n <input type=\"number\" id=\"age\" [(ngModel)]=\"age\" name=\"age\" required>\n\n <button type=\"submit\">Siguiente</button>\n </form>\n</div>\n" }]
6119
+ }], propDecorators: { completed: [{
6120
+ type: Output
6121
+ }] } });
6122
+
6123
+ class CodSelfFormStepTwoComponent {
6124
+ }
6125
+ CodSelfFormStepTwoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepTwoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6126
+ CodSelfFormStepTwoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodSelfFormStepTwoComponent, selector: "app-cod-self-form-step-two", ngImport: i0, template: "", styles: [""] });
6127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepTwoComponent, decorators: [{
6128
+ type: Component,
6129
+ args: [{ selector: 'app-cod-self-form-step-two', template: "" }]
6130
+ }] });
6131
+
6098
6132
  class CodSelfManagedComponent {
6099
6133
  constructor() {
6100
6134
  this.items = [];
6135
+ this.currentStep = 0;
6136
+ this.stepCompleted = [false, false, false, false];
6101
6137
  }
6102
6138
  ngOnInit() {
6103
6139
  this.items = [
6104
6140
  {
6105
6141
  label: 'Personal',
6142
+ id: '1'
6106
6143
  },
6107
6144
  {
6108
6145
  label: 'Planes',
6146
+ id: '2',
6109
6147
  },
6110
6148
  {
6111
6149
  label: 'Payment',
6150
+ id: '3',
6112
6151
  },
6113
6152
  {
6114
6153
  label: 'Confirmation',
6154
+ id: '4',
6115
6155
  }
6116
6156
  ];
6117
6157
  }
6158
+ onNext() {
6159
+ if (this.stepCompleted[this.currentStep]) {
6160
+ this.currentStep++;
6161
+ }
6162
+ else {
6163
+ // Aquí puedes mostrar algún mensaje de error o realizar alguna acción cuando el paso no está completado
6164
+ console.log('Completa el paso actual antes de avanzar.');
6165
+ }
6166
+ }
6167
+ onPrevious() {
6168
+ if (this.currentStep > 0) {
6169
+ this.currentStep--;
6170
+ }
6171
+ }
6172
+ onChangeStep(step) {
6173
+ console.log(step.index);
6174
+ console.log(step);
6175
+ this.currentStep = step;
6176
+ }
6177
+ markStepCompleted(step) {
6178
+ this.stepCompleted[step] = true;
6179
+ }
6118
6180
  }
6119
6181
  CodSelfManagedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfManagedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6120
- CodSelfManagedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodSelfManagedComponent, selector: "ipt-cod-self-managed", ngImport: i0, template: "<h3>Cod Autogestionado</h3>\n\n<p-steps [model]=\"items\"></p-steps>\n\n\n\n<!-- <ipt-loader *ngIf=\"isLoading\" [isDialog]=\"false\"></ipt-loader> -->\n", dependencies: [{ kind: "component", type: i1$4.Steps, selector: "p-steps", inputs: ["activeIndex", "model", "readonly", "style", "styleClass"], outputs: ["activeIndexChange"] }] });
6182
+ CodSelfManagedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodSelfManagedComponent, selector: "ipt-cod-self-managed", ngImport: i0, template: "<h3>Cod Autogestionado</h3>\n\n<!-- <p-steps [model]=\"items\"></p-steps> -->\n<p-steps [model]=\"items\" [(activeIndex)]=\"currentStep\" (onStepChange)=\"onChangeStep($event)\"></p-steps>\n\n<div *ngIf=\"currentStep === 0\">\n <!-- Contenido del paso 1 -->\n <!-- Ejemplo: -->\n <app-cod-self-form-step-one (completed)=\"markStepCompleted(0)\"></app-cod-self-form-step-one>\n</div>\n\n<div *ngIf=\"currentStep === 1\">\n <!-- Contenido del paso 2 -->\n <!-- Ejemplo: -->\n <app-cod-self-form-step-two (completed)=\"markStepCompleted(1)\"></app-cod-self-form-step-two>\n</div>\n\n<div>\n <button (click)=\"onPrevious()\" [disabled]=\"currentStep === 0\">Anterior</button>\n <button (click)=\"onNext()\" [disabled]=\"currentStep === items.length - 1\">Siguiente</button>\n</div>\n\n<!-- <ipt-loader *ngIf=\"isLoading\" [isDialog]=\"false\"></ipt-loader> -->\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.Steps, selector: "p-steps", inputs: ["activeIndex", "model", "readonly", "style", "styleClass"], outputs: ["activeIndexChange"] }, { kind: "component", type: CodSelfFormStepOneComponent, selector: "app-cod-self-form-step-one", outputs: ["completed"] }, { kind: "component", type: CodSelfFormStepTwoComponent, selector: "app-cod-self-form-step-two" }] });
6121
6183
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfManagedComponent, decorators: [{
6122
6184
  type: Component,
6123
- args: [{ selector: 'ipt-cod-self-managed', template: "<h3>Cod Autogestionado</h3>\n\n<p-steps [model]=\"items\"></p-steps>\n\n\n\n<!-- <ipt-loader *ngIf=\"isLoading\" [isDialog]=\"false\"></ipt-loader> -->\n" }]
6124
- }] });
6125
-
6126
- class CodSelfFormStepOneComponent {
6127
- }
6128
- CodSelfFormStepOneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepOneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6129
- CodSelfFormStepOneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodSelfFormStepOneComponent, selector: "app-cod-self-form-step-one", ngImport: i0, template: "", styles: [""] });
6130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepOneComponent, decorators: [{
6131
- type: Component,
6132
- args: [{ selector: 'app-cod-self-form-step-one', template: "" }]
6133
- }] });
6134
-
6135
- class CodSelfFormStepTwoComponent {
6136
- }
6137
- CodSelfFormStepTwoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepTwoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6138
- CodSelfFormStepTwoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: CodSelfFormStepTwoComponent, selector: "app-cod-self-form-step-two", ngImport: i0, template: "", styles: [""] });
6139
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CodSelfFormStepTwoComponent, decorators: [{
6140
- type: Component,
6141
- args: [{ selector: 'app-cod-self-form-step-two', template: "" }]
6185
+ args: [{ selector: 'ipt-cod-self-managed', template: "<h3>Cod Autogestionado</h3>\n\n<!-- <p-steps [model]=\"items\"></p-steps> -->\n<p-steps [model]=\"items\" [(activeIndex)]=\"currentStep\" (onStepChange)=\"onChangeStep($event)\"></p-steps>\n\n<div *ngIf=\"currentStep === 0\">\n <!-- Contenido del paso 1 -->\n <!-- Ejemplo: -->\n <app-cod-self-form-step-one (completed)=\"markStepCompleted(0)\"></app-cod-self-form-step-one>\n</div>\n\n<div *ngIf=\"currentStep === 1\">\n <!-- Contenido del paso 2 -->\n <!-- Ejemplo: -->\n <app-cod-self-form-step-two (completed)=\"markStepCompleted(1)\"></app-cod-self-form-step-two>\n</div>\n\n<div>\n <button (click)=\"onPrevious()\" [disabled]=\"currentStep === 0\">Anterior</button>\n <button (click)=\"onNext()\" [disabled]=\"currentStep === items.length - 1\">Siguiente</button>\n</div>\n\n<!-- <ipt-loader *ngIf=\"isLoading\" [isDialog]=\"false\"></ipt-loader> -->\n" }]
6142
6186
  }] });
6143
6187
 
6144
6188
  class CodSelfFormStepThreeComponent {
@@ -6169,7 +6213,8 @@ codSelfManagedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
6169
6213
  CodSelfFormStepFourComponent], imports: [CommonModule,
6170
6214
  ComponentsModule,
6171
6215
  ReactiveFormsModule,
6172
- StepsModule], exports: [CodSelfManagedComponent,
6216
+ StepsModule,
6217
+ FormsModule], exports: [CodSelfManagedComponent,
6173
6218
  CodSelfFormStepOneComponent,
6174
6219
  CodSelfFormStepTwoComponent,
6175
6220
  CodSelfFormStepThreeComponent,
@@ -6177,7 +6222,8 @@ codSelfManagedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
6177
6222
  codSelfManagedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: codSelfManagedModule, imports: [CommonModule,
6178
6223
  ComponentsModule,
6179
6224
  ReactiveFormsModule,
6180
- StepsModule] });
6225
+ StepsModule,
6226
+ FormsModule] });
6181
6227
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: codSelfManagedModule, decorators: [{
6182
6228
  type: NgModule,
6183
6229
  args: [{
@@ -6186,6 +6232,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
6186
6232
  ComponentsModule,
6187
6233
  ReactiveFormsModule,
6188
6234
  StepsModule,
6235
+ FormsModule
6189
6236
  ],
6190
6237
  declarations: [
6191
6238
  CodSelfManagedComponent,