@wizishop/angular-components 15.1.1 → 15.1.4

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.
@@ -381,7 +381,7 @@ class SelectOptionDirective {
381
381
  if (this.disabled || this.disabledByParent) {
382
382
  return;
383
383
  }
384
- this.selected = !this.selected;
384
+ this.selected = this.multiple ? !this.selected : true; // If not multiple mode -> can not be unselected
385
385
  this.selectedChange.emit(this.selected);
386
386
  this.changeDetectorRef.markForCheck();
387
387
  }
@@ -861,20 +861,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
861
861
  }] } });
862
862
 
863
863
  class RadioDirective extends SelectOptionDirective {
864
- onClick() {
865
- this.onSelectRadioOption();
866
- }
867
- onSelectRadioOption() {
868
- if (this.disabled || this.disabledByParent) {
869
- return;
870
- }
871
- if (this.selected) {
872
- return;
873
- }
874
- this.selected = true;
875
- this.selectedChange.emit(this.selected);
876
- this.changeDetectorRef.markForCheck();
877
- }
878
864
  constructor(contentRef, changeDetectorRef) {
879
865
  super(contentRef, changeDetectorRef);
880
866
  this.contentRef = contentRef;
@@ -882,7 +868,7 @@ class RadioDirective extends SelectOptionDirective {
882
868
  }
883
869
  }
884
870
  RadioDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: RadioDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
885
- RadioDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.1", type: RadioDirective, selector: "[wacRadio]", host: { listeners: { "click": "onClick($event)" } }, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: RadioDirective }], exportAs: ["wacRadio"], usesInheritance: true, ngImport: i0 });
871
+ RadioDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.1", type: RadioDirective, selector: "[wacRadio]", providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: RadioDirective }], exportAs: ["wacRadio"], usesInheritance: true, ngImport: i0 });
886
872
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: RadioDirective, decorators: [{
887
873
  type: Directive,
888
874
  args: [{
@@ -890,10 +876,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
890
876
  exportAs: 'wacRadio',
891
877
  providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: RadioDirective }],
892
878
  }]
893
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { onClick: [{
894
- type: HostListener,
895
- args: ['click', ['$event']]
896
- }] } });
879
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; } });
897
880
 
898
881
  class RadioGroupDirective extends SelectDirective {
899
882
  get multiple() {
@@ -5252,10 +5235,10 @@ class BlockWithCheckboxComponent {
5252
5235
  }
5253
5236
  }
5254
5237
  BlockWithCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: BlockWithCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5255
- BlockWithCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: BlockWithCheckboxComponent, selector: "wac-block-with-checkbox", inputs: { selected: "selected", disabled: "disabled", nameRadio: "nameRadio", isFirst: "isFirst", opacity: "opacity" }, outputs: { checkboxAction: "checkboxAction" }, ngImport: i0, template: "<div class=\"block-with-checkbox\" (click)=\"disabled ? $event.preventDefault() : ''\" [ngClass]=\"{'selected': inputRadioA.checked || selected, 'firstWacRadioBLock': isFirst, 'disabled': disabled}\" [style.opacity]=\"opacity\" (mouseover)=\"removeFirstClass()\">\n <div class=\"block-with-checkbox__left\" (click)=\"inputRadioA.click()\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input #inputRadioA [name]=\"nameRadio\" type=\"radio\" [checked]=\"selected\" [value]=\"selected\" (change)=\"eventSelected($event)\" [id]=\"randomLabelName\">\n <label [for]=\"randomLabelName\"></label>\n </div>\n </div>\n </div>\n <div class=\"block-with-checkbox__center\" (click)=\"$event.target['className'] !== 'wac-link' && $event.target['localName'] !== 'a' ? inputRadioA.click() : '';\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
5238
+ BlockWithCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: BlockWithCheckboxComponent, selector: "wac-block-with-checkbox", inputs: { selected: "selected", disabled: "disabled", nameRadio: "nameRadio", isFirst: "isFirst", opacity: "opacity" }, outputs: { checkboxAction: "checkboxAction" }, ngImport: i0, template: "<div class=\"block-with-checkbox\" (click)=\"disabled && $event.target['className'] !== 'wac-link' && $event.target['localName'] !== 'a' ? $event.preventDefault() : ''\" [ngClass]=\"{'selected': inputRadioA.checked || selected, 'firstWacRadioBLock': isFirst, 'disabled': disabled}\" [style.opacity]=\"opacity\" (mouseover)=\"removeFirstClass()\">\n <div class=\"block-with-checkbox__left\" (click)=\"inputRadioA.click()\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input #inputRadioA [name]=\"nameRadio\" type=\"radio\" [checked]=\"selected\" [value]=\"selected\" (change)=\"eventSelected($event)\" [id]=\"randomLabelName\">\n <label [for]=\"randomLabelName\"></label>\n </div>\n </div>\n </div>\n <div class=\"block-with-checkbox__center\" (click)=\"$event.target['className'] !== 'wac-link' && $event.target['localName'] !== 'a' ? inputRadioA.click() : '';\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
5256
5239
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: BlockWithCheckboxComponent, decorators: [{
5257
5240
  type: Component,
5258
- args: [{ selector: 'wac-block-with-checkbox', template: "<div class=\"block-with-checkbox\" (click)=\"disabled ? $event.preventDefault() : ''\" [ngClass]=\"{'selected': inputRadioA.checked || selected, 'firstWacRadioBLock': isFirst, 'disabled': disabled}\" [style.opacity]=\"opacity\" (mouseover)=\"removeFirstClass()\">\n <div class=\"block-with-checkbox__left\" (click)=\"inputRadioA.click()\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input #inputRadioA [name]=\"nameRadio\" type=\"radio\" [checked]=\"selected\" [value]=\"selected\" (change)=\"eventSelected($event)\" [id]=\"randomLabelName\">\n <label [for]=\"randomLabelName\"></label>\n </div>\n </div>\n </div>\n <div class=\"block-with-checkbox__center\" (click)=\"$event.target['className'] !== 'wac-link' && $event.target['localName'] !== 'a' ? inputRadioA.click() : '';\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
5241
+ args: [{ selector: 'wac-block-with-checkbox', template: "<div class=\"block-with-checkbox\" (click)=\"disabled && $event.target['className'] !== 'wac-link' && $event.target['localName'] !== 'a' ? $event.preventDefault() : ''\" [ngClass]=\"{'selected': inputRadioA.checked || selected, 'firstWacRadioBLock': isFirst, 'disabled': disabled}\" [style.opacity]=\"opacity\" (mouseover)=\"removeFirstClass()\">\n <div class=\"block-with-checkbox__left\" (click)=\"inputRadioA.click()\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input #inputRadioA [name]=\"nameRadio\" type=\"radio\" [checked]=\"selected\" [value]=\"selected\" (change)=\"eventSelected($event)\" [id]=\"randomLabelName\">\n <label [for]=\"randomLabelName\"></label>\n </div>\n </div>\n </div>\n <div class=\"block-with-checkbox__center\" (click)=\"$event.target['className'] !== 'wac-link' && $event.target['localName'] !== 'a' ? inputRadioA.click() : '';\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
5259
5242
  }], ctorParameters: function () { return []; }, propDecorators: { selected: [{
5260
5243
  type: Input
5261
5244
  }], disabled: [{