@wizishop/angular-components 15.1.51 → 15.1.53

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.
@@ -1972,38 +1972,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
1972
1972
  }] } });
1973
1973
 
1974
1974
  class TabComponent {
1975
- constructor() {
1976
- // TODO implement ng-content
1977
- // TODO implement ngModel
1975
+ set selected(value) {
1976
+ this._selected = value;
1977
+ this.changeDetectorRef.detectChanges();
1978
+ }
1979
+ get selected() {
1980
+ return this._selected;
1981
+ }
1982
+ constructor(changeDetectorRef) {
1983
+ this.changeDetectorRef = changeDetectorRef;
1984
+ }
1985
+ select(selected) {
1986
+ this._selected = selected;
1987
+ }
1988
+ }
1989
+ TabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TabComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1990
+ TabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: TabComponent, isStandalone: true, selector: "wac-tab", inputs: { label: "label", selected: "selected" }, ngImport: i0, template: "<div class=\"wac-tab\">\n <ng-content *ngIf=\"selected\"></ng-content>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
1991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TabComponent, decorators: [{
1992
+ type: Component,
1993
+ args: [{ selector: 'wac-tab', encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule], template: "<div class=\"wac-tab\">\n <ng-content *ngIf=\"selected\"></ng-content>\n</div>" }]
1994
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { label: [{
1995
+ type: Input
1996
+ }], selected: [{
1997
+ type: Input
1998
+ }] } });
1999
+
2000
+ class TabsComponent {
2001
+ get selectedIndex() {
2002
+ return this._selectedIndex;
2003
+ }
2004
+ set selectedIndex(selectedIndex) {
2005
+ if (this.disabled) {
2006
+ return;
2007
+ }
2008
+ this.setIndex(null, selectedIndex);
2009
+ this.onChange(selectedIndex);
2010
+ }
2011
+ constructor(changeDetectorRef) {
2012
+ this.changeDetectorRef = changeDetectorRef;
2013
+ this._selectedIndex = 0;
2014
+ this.disabled = false;
1978
2015
  this.underline = false;
1979
2016
  this.button = false;
2017
+ this.right = false;
1980
2018
  this.marginBottom = '30px';
1981
- this.tabs = [];
1982
- this.index = 0;
1983
- this.indexChange = new EventEmitter();
2019
+ this.listIsOpen = false;
2020
+ this.onTouched = () => { };
2021
+ this.onChange = (selectedIndex) => { };
1984
2022
  }
1985
- valueChanged(i) {
1986
- this.index = i;
1987
- this.indexChange.emit(this.index);
2023
+ ngOnInit() {
2024
+ this.setIndex(null, this._selectedIndex);
2025
+ }
2026
+ writeValue(selectedIndex) {
2027
+ this.setIndex(null, selectedIndex);
2028
+ }
2029
+ registerOnChange(onChange) {
2030
+ this.onChange = onChange;
2031
+ }
2032
+ onBlur() {
2033
+ this.onTouched();
2034
+ }
2035
+ registerOnTouched(onTouched) {
2036
+ this.onTouched = onTouched;
2037
+ }
2038
+ setDisabledState(disabled) {
2039
+ this.disabled = disabled;
2040
+ this.changeDetectorRef.markForCheck();
2041
+ }
2042
+ setIndex($event, currentIndex) {
2043
+ $event?.stopPropagation();
2044
+ this._selectedIndex = currentIndex;
2045
+ this.tabList?.forEach((tab, index) => {
2046
+ tab.selected = currentIndex === index;
2047
+ this.selected = (currentIndex === index ? tab : this.selected);
2048
+ });
2049
+ this.listIsOpen = false;
2050
+ this.onChange(currentIndex);
2051
+ }
2052
+ openList($event) {
2053
+ $event?.stopPropagation();
2054
+ this.listIsOpen = !this.listIsOpen;
1988
2055
  }
1989
2056
  }
1990
- TabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1991
- TabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: TabComponent, isStandalone: true, selector: "wac-tab", inputs: { underline: "underline", button: "button", marginBottom: "marginBottom", tabs: "tabs", index: "index" }, outputs: { indexChange: "indexChange" }, ngImport: i0, template: "<div class=\"wac-tab\" [ngClass]=\"{'wac-tab--underline': underline, 'wac-tab--button' : button}\">\n <div class=\"wac-tab__wrapper\" [ngStyle]=\"{'margin-bottom': marginBottom}\">\n <a\n *ngFor=\"let tab of tabs\"\n class=\"wac-tab__wrapper__tab\"\n [ngClass]=\"{'wac-tab__wrapper__tab--selected': index === tab.index, 'wac-tab__wrapper__tab--right': tab.right}\"\n (click)=\"valueChanged(tab.index)\"\n [innerHTML]=\"tab.label\"\n >\n </a>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], encapsulation: i0.ViewEncapsulation.None });
1992
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TabComponent, decorators: [{
2057
+ TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TabsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2058
+ TabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: TabsComponent, isStandalone: true, selector: "wac-tabs", inputs: { underline: "underline", button: "button", right: "right", marginBottom: "marginBottom" }, providers: [
2059
+ { provide: NG_VALUE_ACCESSOR, useExisting: TabsComponent, multi: true },
2060
+ ], queries: [{ propertyName: "tabList", predicate: TabComponent }], ngImport: i0, template: "<div class=\"wac-tabs\"\n [ngClass]=\"{'wac-tabs--underline': underline, 'wac-tabs--button' : button, 'wac-tabs--right' : right}\"\n wzAutoHide\n (clickOutside)=\"listIsOpen = false\"\n [triggerElement]=\"'wac-select__header__selection'\"\n>\n <div class=\"wac-tabs__mobile\" (click)=\"openList($event)\">\n <div>{{ selected?.label }}</div><i [class]=\"'fa-solid fa-caret-' + (listIsOpen ? 'up' : 'down')\"></i>\n </div>\n <div class=\"wac-tabs__wrapper\" [ngClass]=\"{ 'open' : listIsOpen }\" [ngStyle]=\"{'margin-bottom': marginBottom}\">\n <a\n *ngFor=\"let tab of tabList; let i = index\"\n class=\"wac-tabs__wrapper__tab\"\n [ngClass]=\"{'wac-tabs__wrapper__tab--selected': i === selectedIndex}\"\n (click)=\"setIndex($event, i)\"\n >\n {{ tab.label }}\n </a>\n </div>\n</div>\n<ng-content></ng-content>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: SharedDirectives }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }], encapsulation: i0.ViewEncapsulation.None });
2061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TabsComponent, decorators: [{
1993
2062
  type: Component,
1994
- args: [{ selector: 'wac-tab', encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule], template: "<div class=\"wac-tab\" [ngClass]=\"{'wac-tab--underline': underline, 'wac-tab--button' : button}\">\n <div class=\"wac-tab__wrapper\" [ngStyle]=\"{'margin-bottom': marginBottom}\">\n <a\n *ngFor=\"let tab of tabs\"\n class=\"wac-tab__wrapper__tab\"\n [ngClass]=\"{'wac-tab__wrapper__tab--selected': index === tab.index, 'wac-tab__wrapper__tab--right': tab.right}\"\n (click)=\"valueChanged(tab.index)\"\n [innerHTML]=\"tab.label\"\n >\n </a>\n </div>\n</div>\n" }]
1995
- }], ctorParameters: function () { return []; }, propDecorators: { underline: [{
2063
+ args: [{ selector: 'wac-tabs', encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule, FormsModule, TabComponent, SharedDirectives], providers: [
2064
+ { provide: NG_VALUE_ACCESSOR, useExisting: TabsComponent, multi: true },
2065
+ ], template: "<div class=\"wac-tabs\"\n [ngClass]=\"{'wac-tabs--underline': underline, 'wac-tabs--button' : button, 'wac-tabs--right' : right}\"\n wzAutoHide\n (clickOutside)=\"listIsOpen = false\"\n [triggerElement]=\"'wac-select__header__selection'\"\n>\n <div class=\"wac-tabs__mobile\" (click)=\"openList($event)\">\n <div>{{ selected?.label }}</div><i [class]=\"'fa-solid fa-caret-' + (listIsOpen ? 'up' : 'down')\"></i>\n </div>\n <div class=\"wac-tabs__wrapper\" [ngClass]=\"{ 'open' : listIsOpen }\" [ngStyle]=\"{'margin-bottom': marginBottom}\">\n <a\n *ngFor=\"let tab of tabList; let i = index\"\n class=\"wac-tabs__wrapper__tab\"\n [ngClass]=\"{'wac-tabs__wrapper__tab--selected': i === selectedIndex}\"\n (click)=\"setIndex($event, i)\"\n >\n {{ tab.label }}\n </a>\n </div>\n</div>\n<ng-content></ng-content>" }]
2066
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { underline: [{
1996
2067
  type: Input
1997
2068
  }], button: [{
1998
2069
  type: Input
1999
- }], marginBottom: [{
2000
- type: Input
2001
- }], tabs: [{
2070
+ }], right: [{
2002
2071
  type: Input
2003
- }], index: [{
2072
+ }], marginBottom: [{
2004
2073
  type: Input
2005
- }], indexChange: [{
2006
- type: Output
2074
+ }], tabList: [{
2075
+ type: ContentChildren,
2076
+ args: [TabComponent]
2007
2077
  }] } });
2008
2078
 
2009
2079
  class ButtonComponent {
@@ -6125,6 +6195,7 @@ const exportsFromModule = [
6125
6195
  ...ExpansionExport
6126
6196
  ];
6127
6197
  const standaloneComponents = [
6198
+ TabsComponent,
6128
6199
  TabComponent,
6129
6200
  SnackbarComponent,
6130
6201
  BlockComponent,
@@ -6217,7 +6288,8 @@ SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
6217
6288
  NgScrollbarModule,
6218
6289
  NgScrollbarReachedModule,
6219
6290
  TreeModule,
6220
- ExpansionModule, TabComponent,
6291
+ ExpansionModule, TabsComponent,
6292
+ TabComponent,
6221
6293
  SnackbarComponent,
6222
6294
  BlockComponent,
6223
6295
  LoaderComponent,
@@ -6294,7 +6366,8 @@ SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
6294
6366
  TooltipComponent,
6295
6367
  CheckboxComponent,
6296
6368
  LoaderComponent,
6297
- TreeComponent, ExpansionPanelComponent, ExpansionPanelHeaderComponent, AccordionComponent, ExpansionPanelDirective, ExpansionPanelHeaderDirective, TabComponent,
6369
+ TreeComponent, ExpansionPanelComponent, ExpansionPanelHeaderComponent, AccordionComponent, ExpansionPanelDirective, ExpansionPanelHeaderDirective, TabsComponent,
6370
+ TabComponent,
6298
6371
  SnackbarComponent,
6299
6372
  BlockComponent,
6300
6373
  LoaderComponent,
@@ -6551,5 +6624,5 @@ const switchInOut = trigger('switchInOut', [
6551
6624
  * Generated bundle index. Do not edit.
6552
6625
  */
6553
6626
 
6554
- export { ACCORDION_ITEM, AbstractDebounceDirective, AccordionComponent, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AreAllOptionsSelectedPipe, AutoHideDirective, BackComponent, BlockComponent, BlockSeparatorComponent, BlockTitleLegacyComponent, BlockWithCheckboxComponent, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CallComponentFunctionPipe, CardPriceComponent, ChargingBarComponent, CheckBoxRow, CheckboxComponent, ColumnComponent, ConfirmDeleteComponent, ContentWithButtonsComponent, CopyToClipBoardDirective, DebounceKeyupDirective, DeleteComponent, DraganddropListComponent, DropdownComponent, EXPANSION_PANEL_HEADER, ExpandedPanelComponent, ExpansionExport, ExpansionModule, ExpansionPanelComponent, ExpansionPanelDirective, ExpansionPanelHeaderComponent, ExpansionPanelHeaderDirective, FilterOptionsPipe, FiltersComponent, FiltersTableService, FindOptionSelectedPipe, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, GooglePreviewComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HistoryService, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, KeypressEnterDirective, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MosaicComponent, MultipleSearchComponent, MultipleSearchPlusComponent, OnlyNumberDirective, OptionCallToActionComponent, OptionComponent, OptionalDisableContainerComponent, PaginationComponent, PlaceholderComponent, PopinComponent, ProgressBarComponent, RadioComponent, RadioDirective, RadioGroupDirective, RowComponent, ScrollToDirective, SearchComponent, SelectComponent, SelectDirective, SelectFiltersPipe, SelectInTextComponent, SelectOptionDirective, SelectSearchTriggerComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SummaryComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableFiltersGroup, TableRow, TagComponent, TagLabelComponent, TextAreaComponent, TextComponent, TokenCheckComponent, TooltipComponent, TreeComponent, TreeModule, TwoDigitDecimalNumberDirective, UploadComponent, ValueChangeService, VarDirective, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WrapperMultipleBlockComponent, WrapperSidebarComponent, WzEditInPlaceComponent, ZindexToggleDirective, animateListFromBottom, animateListFromLeft, animateListFromRight, animateListFromTop, distinctUntilTableFiltersChanged, inOutX, inOutY, opacityAnimation, showFromBottom, showFromLeft, showFromRight, showFromTop, switchInOut, updateTableFiltersTotalItems, uuid };
6627
+ export { ACCORDION_ITEM, AbstractDebounceDirective, AccordionComponent, AlertComponent, AlertPopupComponent, AlertPopupModule, AlertPopupService, AreAllOptionsSelectedPipe, AutoHideDirective, BackComponent, BlockComponent, BlockSeparatorComponent, BlockTitleLegacyComponent, BlockWithCheckboxComponent, BreadcrumbsComponent, ButtonComponent, CalendarComponent, CallComponentFunctionPipe, CardPriceComponent, ChargingBarComponent, CheckBoxRow, CheckboxComponent, ColumnComponent, ConfirmDeleteComponent, ContentWithButtonsComponent, CopyToClipBoardDirective, DebounceKeyupDirective, DeleteComponent, DraganddropListComponent, DropdownComponent, EXPANSION_PANEL_HEADER, ExpandedPanelComponent, ExpansionExport, ExpansionModule, ExpansionPanelComponent, ExpansionPanelDirective, ExpansionPanelHeaderComponent, ExpansionPanelHeaderDirective, FilterOptionsPipe, FiltersComponent, FiltersTableService, FindOptionSelectedPipe, FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe, FreePopinComponent, GooglePreviewComponent, H1Component, H2Component, H3Component, H4Component, HeaderPageComponent, HistoryService, HtmlContainer, ImageComponent, InfoComponent, InputComponent, InputSearchComponent, InputWithSelectComponent, KeypressEnterDirective, LabelComponent, LinkComponent, LoaderComponent, LogoComponent, MosaicComponent, MultipleSearchComponent, MultipleSearchPlusComponent, OnlyNumberDirective, OptionCallToActionComponent, OptionComponent, OptionalDisableContainerComponent, PaginationComponent, PlaceholderComponent, PopinComponent, ProgressBarComponent, RadioComponent, RadioDirective, RadioGroupDirective, RowComponent, ScrollToDirective, SearchComponent, SelectComponent, SelectDirective, SelectFiltersPipe, SelectInTextComponent, SelectOptionDirective, SelectSearchTriggerComponent, SelectedListComponent, SeparatorComponent, SettingsComponent, SharedComponentsModule, SharedDirectives, SharedPipes, SnackbarComponent, StateComponent, SummaryComponent, SwitchComponent, TabComponent, TableColumn, TableColumnHeader, TableComponent, TableFiltersGroup, TableRow, TabsComponent, TagComponent, TagLabelComponent, TextAreaComponent, TextComponent, TokenCheckComponent, TooltipComponent, TreeComponent, TreeModule, TwoDigitDecimalNumberDirective, UploadComponent, ValueChangeService, VarDirective, WiziComponentsModule, WrapperBlocsComponent, WrapperComponent, WrapperMultipleBlockComponent, WrapperSidebarComponent, WzEditInPlaceComponent, ZindexToggleDirective, animateListFromBottom, animateListFromLeft, animateListFromRight, animateListFromTop, distinctUntilTableFiltersChanged, inOutX, inOutY, opacityAnimation, showFromBottom, showFromLeft, showFromRight, showFromTop, switchInOut, updateTableFiltersTotalItems, uuid };
6555
6628
  //# sourceMappingURL=wizishop-angular-components.mjs.map