ng-inail-common 1.0.455 → 1.0.457

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.
@@ -4092,6 +4092,11 @@
4092
4092
  * @fileoverview added by tsickle
4093
4093
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4094
4094
  */
4095
+ var WizardStep = /** @class */ (function () {
4096
+ function WizardStep() {
4097
+ }
4098
+ return WizardStep;
4099
+ }());
4095
4100
  var InailWizardComponent = /** @class */ (function (_super) {
4096
4101
  __extends(InailWizardComponent, _super);
4097
4102
  function InailWizardComponent(re2) {
@@ -4103,6 +4108,7 @@
4103
4108
  _this.fullNavigation = false;
4104
4109
  _this.contentsHidden = true;
4105
4110
  _this.currentStep = 0;
4111
+ _this.activateVisitedStep = false;
4106
4112
  _this.select = new i0.EventEmitter();
4107
4113
  _this.prevButtonTitle = 'scorri wizard a destra';
4108
4114
  _this.nextButtonTitle = 'scorri wizard a sinistra';
@@ -4146,6 +4152,18 @@
4146
4152
  if (changes.steps && !changes.steps.isFirstChange()) {
4147
4153
  this.inizializzaSteps();
4148
4154
  }
4155
+ if (changes.currentStep && changes.currentStep.currentValue != undefined) {
4156
+ if (this.steps != undefined && this.steps.length > this.currentStep) {
4157
+ /** @type {?} */
4158
+ var currentStep = this.steps.find(( /**
4159
+ * @param {?} step
4160
+ * @return {?}
4161
+ */function (step) { return step.index === _this.currentStep; }));
4162
+ if (currentStep != undefined) {
4163
+ currentStep.visited = true;
4164
+ }
4165
+ }
4166
+ }
4149
4167
  };
4150
4168
  /**
4151
4169
  * @return {?}
@@ -4333,16 +4351,16 @@
4333
4351
  }
4334
4352
  };
4335
4353
  /**
4336
- * @param {?} stepIndex
4354
+ * @param {?} step
4337
4355
  * @return {?}
4338
4356
  */
4339
4357
  InailWizardComponent.prototype.isActive = /**
4340
- * @param {?} stepIndex
4358
+ * @param {?} step
4341
4359
  * @return {?}
4342
4360
  */
4343
- function (stepIndex) {
4361
+ function (step) {
4344
4362
  // return (this.fullNavigation && stepIndex != this.currentStep) || stepIndex < this.currentStep;
4345
- return (this.fullNavigation) || stepIndex <= this.currentStep;
4363
+ return (this.fullNavigation) || step.index <= this.currentStep || (this.activateVisitedStep === true && step.visited);
4346
4364
  };
4347
4365
  /**
4348
4366
  * @param {?} step
@@ -4353,15 +4371,21 @@
4353
4371
  * @return {?}
4354
4372
  */
4355
4373
  function (step) {
4374
+ /** @type {?} */
4375
+ var value;
4356
4376
  if (step.index == this.currentStep) {
4357
- return 'Step corrente';
4377
+ value = "Step " + (step.index + 1) + " corrente";
4358
4378
  }
4359
4379
  else if (step.index < this.currentStep) {
4360
- return 'Step precedente';
4380
+ value = "Step " + (step.index + 1) + " eseguito";
4361
4381
  }
4362
4382
  else {
4363
- return 'Step successivo';
4383
+ value = "Step " + (step.index + 1) + " successivo";
4384
+ }
4385
+ if (step.error) {
4386
+ value += ' con errori';
4364
4387
  }
4388
+ return value;
4365
4389
  };
4366
4390
  /**
4367
4391
  * @param {?} step
@@ -4455,7 +4479,7 @@
4455
4479
  InailWizardComponent.decorators = [
4456
4480
  { type: i0.Component, args: [{
4457
4481
  selector: 'inail-wizard',
4458
- template: "<!--<div *ngIf=\"show\"\n [attr.id]='id || undefined'\n class=\"row wizard courousel-varible-width marginBottom {{class}} inail-wizard-view-encapsulation\">\n <div *ngFor=\"let step of steps; last as isLast\"\n class=\"item\"\n [attr.aria-label]=\"getAriaLabelValue(step)\"\n [ngClass]=\"{'active': step.index==currentStep, 'prevActive': isActive(step.index)}\">\n <a (click)=\"stepOnClick(step)\"\n *ngIf=\"isActive(step.index)\"\n [attr.tabindex]=\"0\"\n href=\"javascript:void(0)\"\n [ngClass]=\"{'errorLabel': step.error}\"\n title=\"{{step.title ? step.title : step.label}}\" #stepLink>\n <span>\n <span *ngIf=\"showNumber\" class=\"step-number\">{{step.index + 1}}&nbsp;</span>\n <span [innerHTML]=\"getStepLabel(step, isLast)\"></span>\n </span>\n </a>\n <span *ngIf=\"!isActive(step.index)\"\n [ngClass]=\"{'errorLabel': step.error}\"\n title=\"{{step.title ? step.title : step.label}}\">\n <span>\n <span *ngIf=\"showNumber\" class=\"step-number\">{{step.index + 1}}&nbsp;</span>\n <span [innerHTML]=\"getStepLabel(step, isLast)\"></span>\n </span>\n </span>\n </div>\n</div>-->\n<div [id]=\"id\" class=\"row wizard courousel-varible-width slick-initialized slick-slider marginBottom inail-wizard-view-encapsulation {{class}}\">\n <button #prevButton\n [title]=\"prevButtonTitle\"\n type=\"button\"\n class=\"slick-prev fa fa-caret-left slick-arrow\"\n style=\"display: block;\"\n (click)=\"prevButtonOnClick()\">\n </button>\n <div class=\"slick-list draggable\">\n <div #slickTrack\n class=\"slick-track\"\n style=\"opacity: 1; width: 45000px; transition: transform 300ms ease 0s\">\n\n <div *ngFor=\"let step of steps; last as isLast\"\n #slickSlide\n class=\"slick-slide\">\n\n <div>\n <div [attr.aria-label]=\"getAriaLabelValue(step)\"\n class=\"item\"\n [ngClass]=\"{'active': step.index==currentStep, 'prevActive': isActive(step.index)}\"\n style=\"width: 100%;\n display: inline-block;\">\n\n <a *ngIf=\"isActive(step.index)\"\n [ngClass]=\"{'errorLabel': step.error}\"\n (click)=\"stepOnClick(step)\"\n href=\"javascript:void(0)\"\n [attr.title]=\"step.title ? step.title : step.label\">\n <span>\n <span *ngIf=\"showNumber\" class=\"step-number\">{{step.index + 1}}&nbsp;</span>\n <span [innerHTML]=\"getStepLabel(step, isLast)\"></span>\n </span>\n </a>\n <span *ngIf=\"!isActive(step.index)\"\n [ngClass]=\"{'errorLabel': step.error}\"\n title=\"{{step.title ? step.title : step.label}}\">\n <span>\n <span *ngIf=\"showNumber\" class=\"step-number\">{{step.index + 1}}&nbsp;</span>\n <span [innerHTML]=\"getStepLabel(step, isLast)\"></span>\n </span>\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <button #nextButton\n [title]=\"nextButtonTitle\"\n type=\"button\"\n class=\"slick-next fa fa-caret-right slick-arrow\"\n style=\"display: block;\"\n (click)=\"nextButtonOnClick()\">\n </button>\n</div>\n<div [hidden]=\"!inizializzazioneContenutiCompletata\">\n <ng-content></ng-content>\n</div>\n",
4482
+ template: "<!--<div *ngIf=\"show\"\n [attr.id]='id || undefined'\n class=\"row wizard courousel-varible-width marginBottom {{class}} inail-wizard-view-encapsulation\">\n <div *ngFor=\"let step of steps; last as isLast\"\n class=\"item\"\n [attr.aria-label]=\"getAriaLabelValue(step)\"\n [ngClass]=\"{'active': step.index==currentStep, 'prevActive': isActive(step.index)}\">\n <a (click)=\"stepOnClick(step)\"\n *ngIf=\"isActive(step.index)\"\n [attr.tabindex]=\"0\"\n href=\"javascript:void(0)\"\n [ngClass]=\"{'errorLabel': step.error}\"\n title=\"{{step.title ? step.title : step.label}}\" #stepLink>\n <span>\n <span *ngIf=\"showNumber\" class=\"step-number\">{{step.index + 1}}&nbsp;</span>\n <span [innerHTML]=\"getStepLabel(step, isLast)\"></span>\n </span>\n </a>\n <span *ngIf=\"!isActive(step.index)\"\n [ngClass]=\"{'errorLabel': step.error}\"\n title=\"{{step.title ? step.title : step.label}}\">\n <span>\n <span *ngIf=\"showNumber\" class=\"step-number\">{{step.index + 1}}&nbsp;</span>\n <span [innerHTML]=\"getStepLabel(step, isLast)\"></span>\n </span>\n </span>\n </div>\n</div>-->\n<div [id]=\"id\" class=\"row wizard courousel-varible-width slick-initialized slick-slider marginBottom inail-wizard-view-encapsulation {{class}}\">\n <button #prevButton\n [title]=\"prevButtonTitle\"\n type=\"button\"\n class=\"slick-prev fa fa-caret-left slick-arrow\"\n style=\"display: block;\"\n (click)=\"prevButtonOnClick()\">\n </button>\n <div class=\"slick-list draggable\">\n <div #slickTrack\n class=\"slick-track\"\n style=\"opacity: 1; width: 45000px; transition: transform 300ms ease 0s\">\n\n <div *ngFor=\"let step of steps; last as isLast\"\n #slickSlide\n class=\"slick-slide\">\n\n <div>\n <div class=\"item\"\n [ngClass]=\"{'active': step.index==currentStep, 'prevActive': isActive(step)}\"\n style=\"width: 100%;\n display: inline-block;\">\n <ng-container *ngIf=\"isActive(step)\">\n <a [ngClass]=\"{'errorLabel': step.error}\"\n [attr.title]=\"getAriaLabelValue(step)\"\n (click)=\"stepOnClick(step)\"\n href=\"javascript:void(0)\">\n <span>\n <span *ngIf=\"showNumber\" class=\"step-number\">{{ step.index + 1 }}&nbsp;</span>\n <span [innerHTML]=\"getStepLabel(step, isLast)\"></span>\n </span>\n </a>\n </ng-container>\n <ng-container *ngIf=\"!isActive(step)\">\n <a [ngClass]=\"{'errorLabel': step.error}\"\n [attr.title]=\"getAriaLabelValue(step)\"\n tabindex=\"-1\">\n <span>\n <span *ngIf=\"showNumber\" class=\"step-number\">{{ step.index + 1 }}&nbsp;</span>\n <span [innerHTML]=\"getStepLabel(step, isLast)\"></span>\n </span>\n </a>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n <button #nextButton\n [title]=\"nextButtonTitle\"\n type=\"button\"\n class=\"slick-next fa fa-caret-right slick-arrow\"\n style=\"display: block;\"\n (click)=\"nextButtonOnClick()\">\n </button>\n</div>\n<div [hidden]=\"!inizializzazioneContenutiCompletata\">\n <ng-content></ng-content>\n</div>\n",
4459
4483
  encapsulation: i0.ViewEncapsulation.None,
4460
4484
  styles: [".inail-wizard-view-encapsulation.wizard.courousel-varible-width{padding-left:22px;padding-right:22px}.inail-wizard-view-encapsulation.wizard button.slick-arrow:focus{outline:#000 dotted 1px!important}.inail-wizard-view-encapsulation.wizard .item>span{color:#767676!important;text-decoration:none;cursor:default}.inail-wizard-view-encapsulation.wizard .item.active>span{color:#002e5f!important;font-weight:700;cursor:default!important;text-decoration:none!important;pointer-events:none}"]
4461
4485
  }] }
@@ -4474,6 +4498,7 @@
4474
4498
  fullNavigation: [{ type: i0.Input }],
4475
4499
  contentsHidden: [{ type: i0.Input }],
4476
4500
  currentStep: [{ type: i0.Input }],
4501
+ activateVisitedStep: [{ type: i0.Input }],
4477
4502
  select: [{ type: i0.Output }],
4478
4503
  switchToFirstError: [{ type: i0.Input }],
4479
4504
  prevButtonTitle: [{ type: i0.Input }],
@@ -4486,11 +4511,6 @@
4486
4511
  };
4487
4512
  return InailWizardComponent;
4488
4513
  }(BasicUxElementComponent));
4489
- var WizardStep = /** @class */ (function () {
4490
- function WizardStep() {
4491
- }
4492
- return WizardStep;
4493
- }());
4494
4514
 
4495
4515
  /**
4496
4516
  * @fileoverview added by tsickle