@wizishop/angular-components 14.3.1 → 14.3.3

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.
@@ -20,7 +20,7 @@ import * as i4 from 'ngx-autosize';
20
20
  import { AutosizeModule } from 'ngx-autosize';
21
21
  import * as i2$1 from '@angular/router';
22
22
  import { RouterModule } from '@angular/router';
23
- import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey, ESCAPE } from '@angular/cdk/keycodes';
23
+ import { DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, ENTER, SPACE, hasModifierKey, ESCAPE, A, Z, ZERO, NINE } from '@angular/cdk/keycodes';
24
24
  import * as i2$2 from 'ngx-scrollbar';
25
25
  import { NgScrollbarModule } from 'ngx-scrollbar';
26
26
  import * as i3 from 'ngx-scrollbar/reached-event';
@@ -357,8 +357,6 @@ class SelectOptionDirective {
357
357
  onClick() {
358
358
  this.onSelectOption();
359
359
  }
360
- ngOnInit() {
361
- }
362
360
  onSelectOption() {
363
361
  if (this.disabled) {
364
362
  return;
@@ -384,11 +382,11 @@ class SelectOptionDirective {
384
382
  }
385
383
  }
386
384
  SelectOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectOptionDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
387
- SelectOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: SelectOptionDirective, selector: "[selectOption]", inputs: { disabled: "disabled", value: "value", selected: "selected" }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "click": "onClick()" } }, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: SelectOptionDirective }], ngImport: i0 });
385
+ SelectOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.7", type: SelectOptionDirective, selector: "[wacSelectOption]", inputs: { disabled: "disabled", value: "value", selected: "selected" }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "click": "onClick()" } }, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: SelectOptionDirective }], ngImport: i0 });
388
386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectOptionDirective, decorators: [{
389
387
  type: Directive,
390
388
  args: [{
391
- selector: '[selectOption]',
389
+ selector: '[wacSelectOption]',
392
390
  providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: SelectOptionDirective }]
393
391
  }]
394
392
  }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { onClick: [{
@@ -4235,7 +4233,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
4235
4233
  }] } });
4236
4234
 
4237
4235
  class ValueChangeService {
4238
- constructor() {
4236
+ constructor(changeDetectorRef) {
4237
+ this.changeDetectorRef = changeDetectorRef;
4239
4238
  this.valueChange$ = new Subject();
4240
4239
  this.indexSelectedOption = null;
4241
4240
  this.resetListeners$ = new Subject();
@@ -4263,6 +4262,7 @@ class ValueChangeService {
4263
4262
  handleValueChange() {
4264
4263
  this.changeSelectedOption();
4265
4264
  this.updateSelectPlaceholder();
4265
+ this.changeDetectorRef.markForCheck();
4266
4266
  }
4267
4267
  selectNextOption() {
4268
4268
  if (this.indexSelectedOption + 1 >= this.optionChildren.length) {
@@ -4285,6 +4285,31 @@ class ValueChangeService {
4285
4285
  this.indexSelectedOption = this.indexSelectedOption - 1;
4286
4286
  this.assignValue(this.optionChildren.get(this.indexSelectedOption).value);
4287
4287
  }
4288
+ searchOptionByFirstLetter(letter) {
4289
+ const matchedOptionsIndex = this.optionChildren
4290
+ .map((option, index) => {
4291
+ const textOption = option.getContentRef().nativeElement.textContent.trim().toLowerCase();
4292
+ return textOption.startsWith(letter) ? index : null;
4293
+ })
4294
+ .filter((index) => index !== null);
4295
+ if (!matchedOptionsIndex.length) { // reset the selection
4296
+ this.indexSelectedOption = null;
4297
+ this.assignValue(null);
4298
+ return;
4299
+ }
4300
+ // find the next option after the current selected option, or the first option
4301
+ const validOptionIndex = matchedOptionsIndex.find((index) => {
4302
+ if (isNaN(this.indexSelectedOption)) {
4303
+ return true;
4304
+ }
4305
+ if (index > this.indexSelectedOption) {
4306
+ return true;
4307
+ }
4308
+ return false;
4309
+ });
4310
+ this.indexSelectedOption = isNaN(validOptionIndex) ? matchedOptionsIndex[0] : validOptionIndex;
4311
+ this.assignValue(this.optionChildren.get(this.indexSelectedOption).value);
4312
+ }
4288
4313
  handleInitialSelectedOption() {
4289
4314
  setTimeout(() => {
4290
4315
  if (!this.value) {
@@ -4340,11 +4365,11 @@ class ValueChangeService {
4340
4365
  this.resetListeners$.complete();
4341
4366
  }
4342
4367
  }
4343
- ValueChangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4368
+ ValueChangeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable });
4344
4369
  ValueChangeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService });
4345
4370
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: ValueChangeService, decorators: [{
4346
4371
  type: Injectable
4347
- }], ctorParameters: function () { return []; } });
4372
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
4348
4373
 
4349
4374
  class SelectSearchTriggerComponent {
4350
4375
  constructor() {
@@ -4398,7 +4423,8 @@ class SelectTestComponent {
4398
4423
  constructor(valueChangeService) {
4399
4424
  this.valueChangeService = valueChangeService;
4400
4425
  //! Refacto improve sroll on mobile, see with Pauline
4401
- // todo handle multiple selection ?
4426
+ // todo handle when user search with first letter from keyboard event
4427
+ // angular material select https://github.com/angular/components/blob/main/src/material/select/select.ts
4402
4428
  this.role = 'combobox';
4403
4429
  this.valueChange = new EventEmitter();
4404
4430
  this.disabled = false;
@@ -4515,28 +4541,34 @@ class SelectTestComponent {
4515
4541
  }
4516
4542
  /** Handles keyboard events when the selected is open. */
4517
4543
  _handleOpenKeydown(event) {
4544
+ console.log('event', event);
4518
4545
  const keyCode = event.keyCode;
4519
4546
  const isArrowKey = keyCode === DOWN_ARROW ||
4520
4547
  keyCode === UP_ARROW ||
4521
4548
  keyCode === LEFT_ARROW ||
4522
4549
  keyCode === RIGHT_ARROW;
4523
4550
  const isEscapeKey = keyCode === ESCAPE || keyCode === ENTER || keyCode === SPACE;
4551
+ const isTyping = (keyCode >= A && keyCode <= Z) || (keyCode >= ZERO && keyCode <= NINE);
4524
4552
  if ((isArrowKey && event.altKey) || isEscapeKey) {
4525
4553
  // Close the select on ALT + arrow key to match the native <select>
4526
4554
  event.preventDefault();
4527
4555
  this.openPanel = false;
4528
4556
  return;
4529
4557
  }
4530
- if (!isArrowKey) {
4558
+ else if (isArrowKey) {
4559
+ event.preventDefault(); // prevents the page from scrolling
4560
+ // select the next option on arrow key down
4561
+ if (keyCode === DOWN_ARROW || keyCode === RIGHT_ARROW) {
4562
+ this.valueChangeService.selectNextOption();
4563
+ return;
4564
+ }
4565
+ this.valueChangeService.selectPreviousOption();
4531
4566
  return;
4532
4567
  }
4533
- event.preventDefault(); // prevents the page from scrolling
4534
- // select the next option on arrow key down
4535
- if (keyCode === DOWN_ARROW || keyCode === RIGHT_ARROW) {
4536
- this.valueChangeService.selectNextOption();
4568
+ if (isTyping && !this.customSearchTrigger) {
4569
+ this.valueChangeService.searchOptionByFirstLetter(event.key);
4537
4570
  return;
4538
4571
  }
4539
- this.valueChangeService.selectPreviousOption();
4540
4572
  }
4541
4573
  writeValue(value) {
4542
4574
  if (isNaN(value)) {
@@ -4559,13 +4591,13 @@ SelectTestComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", vers
4559
4591
  SelectTestComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SelectTestComponent, selector: "wac-select-test", inputs: { value: "value", required: "required", disabled: "disabled", keepPanelOpen: "keepPanelOpen", openPanel: "openPanel", enableSearch: "enableSearch" }, outputs: { valueChange: "valueChange", openPanelChange: "openPanelChange" }, host: { listeners: { "document:keydown": "_handleKeydown($event)" }, properties: { "attr.role": "this.role" } }, providers: [
4560
4592
  { provide: NG_VALUE_ACCESSOR, useExisting: SelectTestComponent, multi: true },
4561
4593
  ValueChangeService
4562
- ], queries: [{ propertyName: "customSearchTrigger", first: true, predicate: SelectSearchTriggerComponent, descendants: true }, { propertyName: "label", first: true, predicate: LabelComponent, descendants: true }, { propertyName: "optionChildren", predicate: OPTION_SELECTION_HANDLER, descendants: true }], ngImport: i0, template: "<p *ngIf=\"!!label\" class=\"wac-select-test__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n\n<div\n class=\"wac-select-test\"\n wzAutoHide\n (clickOutside)=\"onClosePanel()\"\n [triggerElement]=\"'wac-select-test__header__selection'\"\n [zIndexToggle]=\"openPanel\"\n >\n\n <div class=\"wac-select-test__header\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && onTogglePanel()\" tabindex=\"0\">\n\n <ng-container [ngTemplateOutlet]=\"openPanel ? openPanelTrigger : closePanelTrigger\" >\n\n <ng-template #closePanelTrigger>\n <ng-container [ngTemplateOutlet]=\"defaultTrigger\"></ng-container>\n </ng-template>\n\n <ng-template #openPanelTrigger>\n <ng-content *ngIf=\"!!customSearchTrigger; else defaultTrigger\" select=\"wac-select-search-trigger\" ></ng-content>\n </ng-template>\n\n <ng-template #defaultTrigger>\n <ng-content *ngIf=\"!selectedOptionContent\" select=\"wac-placeholder,[role=placeholder]\"></ng-content>\n <div\n class=\"wac-select-test__header__selection wac-option__placeholder\"\n *ngIf=\"!!selectedOptionContent\"\n [innerHtml]=\"selectedOptionContent\">\n </div>\n </ng-template>\n\n </ng-container>\n\n <span class=\"wac-select-test__header__chevron\"><i class=\"fas fa-chevron-down\"></i></span>\n\n </div>\n\n\n <div class=\"wac-select-test__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openPanel, open: openPanel }\">\n\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\">\n <ng-content\n select=\"wac-option-call-to-action, wac-option, option, .option, [selectOption]\">\n </ng-content>\n </perfect-scrollbar>\n\n <div *ngIf=\"!optionChildren?.length\" class=\"wac-select-test__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "component", type: i4$1.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
4594
+ ], queries: [{ propertyName: "customSearchTrigger", first: true, predicate: SelectSearchTriggerComponent, descendants: true }, { propertyName: "label", first: true, predicate: LabelComponent, descendants: true }, { propertyName: "optionChildren", predicate: OPTION_SELECTION_HANDLER, descendants: true }], ngImport: i0, template: "<p *ngIf=\"!!label\" class=\"wac-select-test__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n\n<div\n class=\"wac-select-test\"\n wzAutoHide\n (clickOutside)=\"onClosePanel()\"\n [triggerElement]=\"'wac-select-test__header__selection'\"\n [zIndexToggle]=\"openPanel\"\n >\n\n <div class=\"wac-select-test__header\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && onTogglePanel()\" tabindex=\"0\">\n\n <ng-container [ngTemplateOutlet]=\"openPanel ? openPanelTrigger : closePanelTrigger\" >\n\n <ng-template #closePanelTrigger>\n <ng-container [ngTemplateOutlet]=\"defaultTrigger\"></ng-container>\n </ng-template>\n\n <ng-template #openPanelTrigger>\n <ng-content *ngIf=\"!!customSearchTrigger; else defaultTrigger\" select=\"wac-select-search-trigger\" ></ng-content>\n </ng-template>\n\n <ng-template #defaultTrigger>\n <ng-content *ngIf=\"!selectedOptionContent\" select=\"wac-placeholder,[role=placeholder]\"></ng-content>\n <div\n class=\"wac-select-test__header__selection wac-option__placeholder\"\n *ngIf=\"!!selectedOptionContent\"\n [innerHtml]=\"selectedOptionContent\">\n </div>\n </ng-template>\n\n </ng-container>\n\n <span class=\"wac-select-test__header__chevron\"><i class=\"fas fa-chevron-down\"></i></span>\n\n </div>\n\n\n <div class=\"wac-select-test__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openPanel, open: openPanel }\">\n\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\">\n <ng-content\n select=\"wac-option-call-to-action, wac-option, option, .option, [selectOption]\">\n </ng-content>\n </perfect-scrollbar>\n\n <div *ngIf=\"!optionChildren?.length\" class=\"wac-select-test__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }, { kind: "directive", type: ZindexToggleDirective, selector: "[zIndexToggle]", inputs: ["zIndexToggle"], outputs: ["onEventChange"] }, { kind: "component", type: i4$1.PerfectScrollbarComponent, selector: "perfect-scrollbar", inputs: ["disabled", "usePSClass", "autoPropagation", "scrollIndicators", "config"], outputs: ["psScrollY", "psScrollX", "psScrollUp", "psScrollDown", "psScrollLeft", "psScrollRight", "psYReachEnd", "psYReachStart", "psXReachEnd", "psXReachStart"], exportAs: ["ngxPerfectScrollbar"] }, { kind: "pipe", type: i1$3.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4563
4595
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SelectTestComponent, decorators: [{
4564
4596
  type: Component,
4565
4597
  args: [{ selector: 'wac-select-test', providers: [
4566
4598
  { provide: NG_VALUE_ACCESSOR, useExisting: SelectTestComponent, multi: true },
4567
4599
  ValueChangeService
4568
- ], encapsulation: ViewEncapsulation.None, template: "<p *ngIf=\"!!label\" class=\"wac-select-test__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n\n<div\n class=\"wac-select-test\"\n wzAutoHide\n (clickOutside)=\"onClosePanel()\"\n [triggerElement]=\"'wac-select-test__header__selection'\"\n [zIndexToggle]=\"openPanel\"\n >\n\n <div class=\"wac-select-test__header\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && onTogglePanel()\" tabindex=\"0\">\n\n <ng-container [ngTemplateOutlet]=\"openPanel ? openPanelTrigger : closePanelTrigger\" >\n\n <ng-template #closePanelTrigger>\n <ng-container [ngTemplateOutlet]=\"defaultTrigger\"></ng-container>\n </ng-template>\n\n <ng-template #openPanelTrigger>\n <ng-content *ngIf=\"!!customSearchTrigger; else defaultTrigger\" select=\"wac-select-search-trigger\" ></ng-content>\n </ng-template>\n\n <ng-template #defaultTrigger>\n <ng-content *ngIf=\"!selectedOptionContent\" select=\"wac-placeholder,[role=placeholder]\"></ng-content>\n <div\n class=\"wac-select-test__header__selection wac-option__placeholder\"\n *ngIf=\"!!selectedOptionContent\"\n [innerHtml]=\"selectedOptionContent\">\n </div>\n </ng-template>\n\n </ng-container>\n\n <span class=\"wac-select-test__header__chevron\"><i class=\"fas fa-chevron-down\"></i></span>\n\n </div>\n\n\n <div class=\"wac-select-test__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openPanel, open: openPanel }\">\n\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\">\n <ng-content\n select=\"wac-option-call-to-action, wac-option, option, .option, [selectOption]\">\n </ng-content>\n </perfect-scrollbar>\n\n <div *ngIf=\"!optionChildren?.length\" class=\"wac-select-test__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>" }]
4600
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<p *ngIf=\"!!label\" class=\"wac-select-test__label\">\n <ng-content select=\"wac-label, .wac-label\" ></ng-content>\n</p>\n\n\n<div\n class=\"wac-select-test\"\n wzAutoHide\n (clickOutside)=\"onClosePanel()\"\n [triggerElement]=\"'wac-select-test__header__selection'\"\n [zIndexToggle]=\"openPanel\"\n >\n\n <div class=\"wac-select-test__header\" [ngClass]=\"{ 'select-disabled' : disabled }\" (click)=\"!disabled && onTogglePanel()\" tabindex=\"0\">\n\n <ng-container [ngTemplateOutlet]=\"openPanel ? openPanelTrigger : closePanelTrigger\" >\n\n <ng-template #closePanelTrigger>\n <ng-container [ngTemplateOutlet]=\"defaultTrigger\"></ng-container>\n </ng-template>\n\n <ng-template #openPanelTrigger>\n <ng-content *ngIf=\"!!customSearchTrigger; else defaultTrigger\" select=\"wac-select-search-trigger\" ></ng-content>\n </ng-template>\n\n <ng-template #defaultTrigger>\n <ng-content *ngIf=\"!selectedOptionContent\" select=\"wac-placeholder,[role=placeholder]\"></ng-content>\n <div\n class=\"wac-select-test__header__selection wac-option__placeholder\"\n *ngIf=\"!!selectedOptionContent\"\n [innerHtml]=\"selectedOptionContent\">\n </div>\n </ng-template>\n\n </ng-container>\n\n <span class=\"wac-select-test__header__chevron\"><i class=\"fas fa-chevron-down\"></i></span>\n\n </div>\n\n\n <div class=\"wac-select-test__content\" *ngIf=\"!disabled\" [ngClass]=\"{ hidden: !openPanel, open: openPanel }\">\n\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\">\n <ng-content\n select=\"wac-option-call-to-action, wac-option, option, .option, [selectOption]\">\n </ng-content>\n </perfect-scrollbar>\n\n <div *ngIf=\"!optionChildren?.length\" class=\"wac-select-test__content__empty\">\n <span>{{'wac.datatable.noresult' | translate}}</span>\n </div>\n\n </div>\n</div>" }]
4569
4601
  }], ctorParameters: function () { return [{ type: ValueChangeService }]; }, propDecorators: { role: [{
4570
4602
  type: HostBinding,
4571
4603
  args: ['attr.role']
@@ -4600,33 +4632,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
4600
4632
  }] } });
4601
4633
 
4602
4634
  class OptionComponent {
4603
- constructor(renderer, elementRef) {
4635
+ constructor(renderer, elementRef, changeDetectorRef) {
4604
4636
  this.renderer = renderer;
4605
4637
  this.elementRef = elementRef;
4638
+ this.changeDetectorRef = changeDetectorRef;
4606
4639
  this.disabled = false;
4607
4640
  this.selectedChange = new EventEmitter();
4608
4641
  }
4609
4642
  set selected(selected) {
4610
4643
  this._selected = selected;
4611
4644
  selected ? this.renderer.addClass(this.elementRef.nativeElement, 'selected') : this.renderer.removeClass(this.elementRef.nativeElement, 'selected');
4645
+ this.changeDetectorRef.markForCheck();
4612
4646
  }
4613
4647
  get selected() {
4614
4648
  return this._selected;
4615
4649
  }
4616
- ngOnInit() {
4617
- }
4618
4650
  onSelectOption() {
4619
4651
  if (this.disabled) {
4620
4652
  return;
4621
4653
  }
4622
4654
  this.selected = !this.selected;
4623
4655
  this.selectedChange.emit(this.value);
4656
+ this.changeDetectorRef.markForCheck();
4624
4657
  }
4625
4658
  getValue() {
4626
4659
  return this.value;
4627
4660
  }
4628
4661
  setValue(value) {
4629
4662
  this.value = value;
4663
+ this.changeDetectorRef.markForCheck();
4630
4664
  }
4631
4665
  isSelected() {
4632
4666
  return this.selected;
@@ -4639,12 +4673,12 @@ class OptionComponent {
4639
4673
  return this.contentRef;
4640
4674
  }
4641
4675
  }
4642
- OptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: OptionComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4643
- OptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: OptionComponent, selector: "wac-option", inputs: { disabled: "disabled", value: "value", selected: "selected" }, outputs: { selectedChange: "selectedChange" }, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: OptionComponent }], viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentWrapper"], descendants: true }], ngImport: i0, template: "<div\n [ngClass]=\"{ 'disabled': disabled }\"\n class=\"wac-option\"\n (click)=\"onSelectOption()\"\n >\n <div [ngClass]=\"{ 'selected': !disabled && selected, 'disabled': disabled }\" #contentWrapper>\n <ng-content></ng-content>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None });
4676
+ OptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: OptionComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4677
+ OptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: OptionComponent, selector: "wac-option", inputs: { disabled: "disabled", value: "value", selected: "selected" }, outputs: { selectedChange: "selectedChange" }, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: OptionComponent }], viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentWrapper"], descendants: true }], ngImport: i0, template: "<div\n [ngClass]=\"{ 'disabled': disabled }\"\n class=\"wac-option\"\n (click)=\"onSelectOption()\"\n >\n <div [ngClass]=\"{ 'selected': !disabled && selected, 'disabled': disabled }\" #contentWrapper>\n <ng-content></ng-content>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4644
4678
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: OptionComponent, decorators: [{
4645
4679
  type: Component,
4646
- args: [{ selector: 'wac-option', encapsulation: ViewEncapsulation.None, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: OptionComponent }], template: "<div\n [ngClass]=\"{ 'disabled': disabled }\"\n class=\"wac-option\"\n (click)=\"onSelectOption()\"\n >\n <div [ngClass]=\"{ 'selected': !disabled && selected, 'disabled': disabled }\" #contentWrapper>\n <ng-content></ng-content>\n </div>\n</div>" }]
4647
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { contentRef: [{
4680
+ args: [{ selector: 'wac-option', encapsulation: ViewEncapsulation.None, providers: [{ provide: OPTION_SELECTION_HANDLER, useExisting: OptionComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [ngClass]=\"{ 'disabled': disabled }\"\n class=\"wac-option\"\n (click)=\"onSelectOption()\"\n >\n <div [ngClass]=\"{ 'selected': !disabled && selected, 'disabled': disabled }\" #contentWrapper>\n <ng-content></ng-content>\n </div>\n</div>" }]
4681
+ }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { contentRef: [{
4648
4682
  type: ViewChild,
4649
4683
  args: ['contentWrapper']
4650
4684
  }], disabled: [{
@@ -4686,13 +4720,14 @@ class WrapperSidebarComponent {
4686
4720
  this.reverse = false;
4687
4721
  this.hideBackground = false;
4688
4722
  this.stickySidebar = false;
4723
+ this.transparentSidebar = false;
4689
4724
  }
4690
4725
  }
4691
4726
  WrapperSidebarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WrapperSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4692
- WrapperSidebarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: WrapperSidebarComponent, selector: "wac-wrapper-sidebar", inputs: { reverse: "reverse", hideBackground: "hideBackground", backgroundGrey: "backgroundGrey", backgroundWidth: "backgroundWidth", stickySidebar: "stickySidebar" }, ngImport: i0, template: "<div class=\"wac-wrapper-sidebar\" [ngClass]=\"{'reverse': reverse}\">\n <div class=\"wac-wrapper-sidebar__left\" [ngClass]=\"{'sticky': stickySidebar}\">\n <ng-content select=\"[sidebar]\"></ng-content>\n </div>\n <div class=\"wac-wrapper-sidebar__right\" [style.backgroundImage]=\"!hideBackground && backgroundGrey !== '' ? 'url(' + backgroundGrey + ')' : ''\" [style.backgroundSize]=\"backgroundWidth\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
4727
+ WrapperSidebarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: WrapperSidebarComponent, selector: "wac-wrapper-sidebar", inputs: { reverse: "reverse", hideBackground: "hideBackground", backgroundGrey: "backgroundGrey", backgroundWidth: "backgroundWidth", stickySidebar: "stickySidebar", transparentSidebar: "transparentSidebar" }, ngImport: i0, template: "<div class=\"wac-wrapper-sidebar\" [ngClass]=\"{'reverse': reverse}\">\n <div class=\"wac-wrapper-sidebar__left\" [ngClass]=\"{'sticky': stickySidebar, 'transparent': transparentSidebar}\">\n <ng-content select=\"[sidebar]\"></ng-content>\n </div>\n <div class=\"wac-wrapper-sidebar__right\" [style.backgroundImage]=\"!hideBackground && backgroundGrey !== '' ? 'url(' + backgroundGrey + ')' : ''\" [style.backgroundSize]=\"backgroundWidth\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
4693
4728
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: WrapperSidebarComponent, decorators: [{
4694
4729
  type: Component,
4695
- args: [{ selector: 'wac-wrapper-sidebar', template: "<div class=\"wac-wrapper-sidebar\" [ngClass]=\"{'reverse': reverse}\">\n <div class=\"wac-wrapper-sidebar__left\" [ngClass]=\"{'sticky': stickySidebar}\">\n <ng-content select=\"[sidebar]\"></ng-content>\n </div>\n <div class=\"wac-wrapper-sidebar__right\" [style.backgroundImage]=\"!hideBackground && backgroundGrey !== '' ? 'url(' + backgroundGrey + ')' : ''\" [style.backgroundSize]=\"backgroundWidth\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</div>\n" }]
4730
+ args: [{ selector: 'wac-wrapper-sidebar', template: "<div class=\"wac-wrapper-sidebar\" [ngClass]=\"{'reverse': reverse}\">\n <div class=\"wac-wrapper-sidebar__left\" [ngClass]=\"{'sticky': stickySidebar, 'transparent': transparentSidebar}\">\n <ng-content select=\"[sidebar]\"></ng-content>\n </div>\n <div class=\"wac-wrapper-sidebar__right\" [style.backgroundImage]=\"!hideBackground && backgroundGrey !== '' ? 'url(' + backgroundGrey + ')' : ''\" [style.backgroundSize]=\"backgroundWidth\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</div>\n" }]
4696
4731
  }], ctorParameters: function () { return []; }, propDecorators: { reverse: [{
4697
4732
  type: Input
4698
4733
  }], hideBackground: [{
@@ -4703,6 +4738,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
4703
4738
  type: Input
4704
4739
  }], stickySidebar: [{
4705
4740
  type: Input
4741
+ }], transparentSidebar: [{
4742
+ type: Input
4706
4743
  }] } });
4707
4744
 
4708
4745
  class BreadcrumbsComponent {
@@ -5448,6 +5485,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImpor
5448
5485
  type: Input
5449
5486
  }] } });
5450
5487
 
5488
+ ;
5489
+ class SummaryComponent {
5490
+ constructor() {
5491
+ this._activeItem = 0;
5492
+ this.itemChanged = new EventEmitter();
5493
+ }
5494
+ set activeItem(activeItem) {
5495
+ this._activeItem = activeItem;
5496
+ }
5497
+ get activeItem() {
5498
+ return this._activeItem;
5499
+ }
5500
+ scrollToItem(i) {
5501
+ this._activeItem = i;
5502
+ this.itemChanged.emit(i);
5503
+ if (this.items[i].href) {
5504
+ const yOffset = -20;
5505
+ const element = window.document.getElementById(this.items[i].href);
5506
+ if (element) {
5507
+ const y = element.getBoundingClientRect().top + window.pageYOffset + yOffset;
5508
+ window.scrollTo({ top: y, behavior: 'smooth' });
5509
+ }
5510
+ }
5511
+ }
5512
+ }
5513
+ SummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SummaryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5514
+ SummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.7", type: SummaryComponent, selector: "wac-summary", inputs: { activeItem: "activeItem", items: "items" }, outputs: { itemChanged: "itemChanged" }, ngImport: i0, template: "<div class=\"wac-summary\">\n <ng-container *ngFor=\"let item of items; let i = index\">\n <p [ngClass]=\"{'active' : activeItem === i, 'item-link': item.href}\" (click)=\"scrollToItem(i)\">{{ item.label }}</p>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], encapsulation: i0.ViewEncapsulation.None });
5515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: SummaryComponent, decorators: [{
5516
+ type: Component,
5517
+ args: [{ selector: 'wac-summary', encapsulation: ViewEncapsulation.None, template: "<div class=\"wac-summary\">\n <ng-container *ngFor=\"let item of items; let i = index\">\n <p [ngClass]=\"{'active' : activeItem === i, 'item-link': item.href}\" (click)=\"scrollToItem(i)\">{{ item.label }}</p>\n </ng-container>\n</div>\n" }]
5518
+ }], ctorParameters: function () { return []; }, propDecorators: { activeItem: [{
5519
+ type: Input
5520
+ }], items: [{
5521
+ type: Input
5522
+ }], itemChanged: [{
5523
+ type: Output
5524
+ }] } });
5525
+
5451
5526
  const components = [
5452
5527
  TagComponent,
5453
5528
  TabComponent,
@@ -5508,7 +5583,8 @@ const components = [
5508
5583
  ContentWithButtonsComponent,
5509
5584
  WrapperMultipleBlockComponent,
5510
5585
  DraganddropListComponent,
5511
- BlockSeparatorComponent
5586
+ BlockSeparatorComponent,
5587
+ SummaryComponent
5512
5588
  ];
5513
5589
  const exportsFromModule = [
5514
5590
  PaginationComponent,
@@ -5588,7 +5664,8 @@ SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
5588
5664
  ContentWithButtonsComponent,
5589
5665
  WrapperMultipleBlockComponent,
5590
5666
  DraganddropListComponent,
5591
- BlockSeparatorComponent], imports: [CommonModule,
5667
+ BlockSeparatorComponent,
5668
+ SummaryComponent], imports: [CommonModule,
5592
5669
  FormsModule,
5593
5670
  NwbAllModule, i1$3.TranslateModule, ReactiveFormsModule,
5594
5671
  SharedDirectives,
@@ -5670,7 +5747,8 @@ SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
5670
5747
  ContentWithButtonsComponent,
5671
5748
  WrapperMultipleBlockComponent,
5672
5749
  DraganddropListComponent,
5673
- BlockSeparatorComponent, PaginationComponent,
5750
+ BlockSeparatorComponent,
5751
+ SummaryComponent, PaginationComponent,
5674
5752
  TableComponent,
5675
5753
  TableColumn,
5676
5754
  CheckBoxRow,
@@ -5789,5 +5867,5 @@ class TableFiltersGroup extends NwbFilterGroup {
5789
5867
  * Generated bundle index. Do not edit.
5790
5868
  */
5791
5869
 
5792
- export { ACCORDION_ITEM, AbstractDebounceDirective, AccordionComponent, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AreAllOptionsSelectedPipe, AutoHideDirective, BackComponent, BlockComponent, BlockSeparatorComponent, BlockTitleLegacyComponent, BlockWithCheckboxComponent, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CardPriceComponent, CheckBoxRow, CheckboxComponent, ConfirmDeleteComponent, ContentWithButtonsComponent, DebounceKeyupDirective, DeleteComponent, DraganddropListComponent, DropdownComponent, EXPANSION_PANEL_HEADER, ExpansionExport, ExpansionModule, ExpansionPanelBase, ExpansionPanelComponent, ExpansionPanelDirective, ExpansionPanelHeaderComponent, ExpansionPanelHeaderDirective, FilterOptionsPipe, FiltersComponent, FiltersTableService, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, KeypressEnterDirective, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MosaicComponent, MultipleSearchComponent, MultipleSearchPlusComponent, OptionCallToActionComponent, OptionComponent, OptionalDisableContainerComponent, PaginationComponent, PlaceholderComponent, PopinComponent, ProgressBarComponent, RadioComponent, SearchComponent, SelectComponent, SelectFiltersPipe, SelectInTextComponent, SelectOptionDirective, SelectSearchTriggerComponent, SelectTestComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableFiltersGroup, TableRow, TagComponent, TagLabelComponent, TextAreaComponent, TextComponent, TokenCheckComponent, TooltipComponent, TreeComponent, TreeModule, UploadComponent, VarDirective, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WrapperMultipleBlockComponent, WrapperSidebarComponent, WzEditInPlaceComponent, ZindexToggleDirective };
5870
+ export { ACCORDION_ITEM, AbstractDebounceDirective, AccordionComponent, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AreAllOptionsSelectedPipe, AutoHideDirective, BackComponent, BlockComponent, BlockSeparatorComponent, BlockTitleLegacyComponent, BlockWithCheckboxComponent, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CardPriceComponent, CheckBoxRow, CheckboxComponent, ConfirmDeleteComponent, ContentWithButtonsComponent, DebounceKeyupDirective, DeleteComponent, DraganddropListComponent, DropdownComponent, EXPANSION_PANEL_HEADER, ExpansionExport, ExpansionModule, ExpansionPanelBase, ExpansionPanelComponent, ExpansionPanelDirective, ExpansionPanelHeaderComponent, ExpansionPanelHeaderDirective, FilterOptionsPipe, FiltersComponent, FiltersTableService, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, KeypressEnterDirective, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MosaicComponent, MultipleSearchComponent, MultipleSearchPlusComponent, OptionCallToActionComponent, OptionComponent, OptionalDisableContainerComponent, PaginationComponent, PlaceholderComponent, PopinComponent, ProgressBarComponent, RadioComponent, SearchComponent, SelectComponent, SelectFiltersPipe, SelectInTextComponent, SelectOptionDirective, SelectSearchTriggerComponent, SelectTestComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SummaryComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableFiltersGroup, TableRow, TagComponent, TagLabelComponent, TextAreaComponent, TextComponent, TokenCheckComponent, TooltipComponent, TreeComponent, TreeModule, UploadComponent, VarDirective, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WrapperMultipleBlockComponent, WrapperSidebarComponent, WzEditInPlaceComponent, ZindexToggleDirective };
5793
5871
  //# sourceMappingURL=wizishop-angular-components.mjs.map