@wizishop/angular-components 15.1.51 → 15.1.54

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,105 @@ 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
+ writeValue(selectedIndex) {
2024
+ this.setIndex(null, selectedIndex);
2025
+ }
2026
+ registerOnChange(onChange) {
2027
+ this.onChange = onChange;
2028
+ }
2029
+ onBlur() {
2030
+ this.onTouched();
2031
+ }
2032
+ registerOnTouched(onTouched) {
2033
+ this.onTouched = onTouched;
2034
+ }
2035
+ setDisabledState(disabled) {
2036
+ this.disabled = disabled;
2037
+ this.changeDetectorRef.markForCheck();
2038
+ }
2039
+ setIndex($event, currentIndex) {
2040
+ $event?.stopPropagation();
2041
+ this._selectedIndex = currentIndex;
2042
+ this.tabList?.forEach((tab, index) => {
2043
+ tab.selected = currentIndex === index;
2044
+ this.selected = (currentIndex === index ? tab : this.selected);
2045
+ });
2046
+ this.listIsOpen = false;
2047
+ this.onChange(currentIndex);
2048
+ }
2049
+ openList($event) {
2050
+ $event?.stopPropagation();
2051
+ this.listIsOpen = !this.listIsOpen;
1988
2052
  }
1989
2053
  }
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: [{
2054
+ TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TabsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2055
+ 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: [
2056
+ { provide: NG_VALUE_ACCESSOR, useExisting: TabsComponent, multi: true },
2057
+ ], 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 });
2058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: TabsComponent, decorators: [{
1993
2059
  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: [{
2060
+ args: [{ selector: 'wac-tabs', encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule, FormsModule, TabComponent, SharedDirectives], providers: [
2061
+ { provide: NG_VALUE_ACCESSOR, useExisting: TabsComponent, multi: true },
2062
+ ], 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>" }]
2063
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { underline: [{
1996
2064
  type: Input
1997
2065
  }], button: [{
1998
2066
  type: Input
1999
- }], marginBottom: [{
2000
- type: Input
2001
- }], tabs: [{
2067
+ }], right: [{
2002
2068
  type: Input
2003
- }], index: [{
2069
+ }], marginBottom: [{
2004
2070
  type: Input
2005
- }], indexChange: [{
2006
- type: Output
2071
+ }], tabList: [{
2072
+ type: ContentChildren,
2073
+ args: [TabComponent]
2007
2074
  }] } });
2008
2075
 
2009
2076
  class ButtonComponent {
@@ -6125,6 +6192,7 @@ const exportsFromModule = [
6125
6192
  ...ExpansionExport
6126
6193
  ];
6127
6194
  const standaloneComponents = [
6195
+ TabsComponent,
6128
6196
  TabComponent,
6129
6197
  SnackbarComponent,
6130
6198
  BlockComponent,
@@ -6217,7 +6285,8 @@ SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
6217
6285
  NgScrollbarModule,
6218
6286
  NgScrollbarReachedModule,
6219
6287
  TreeModule,
6220
- ExpansionModule, TabComponent,
6288
+ ExpansionModule, TabsComponent,
6289
+ TabComponent,
6221
6290
  SnackbarComponent,
6222
6291
  BlockComponent,
6223
6292
  LoaderComponent,
@@ -6294,7 +6363,8 @@ SharedComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0",
6294
6363
  TooltipComponent,
6295
6364
  CheckboxComponent,
6296
6365
  LoaderComponent,
6297
- TreeComponent, ExpansionPanelComponent, ExpansionPanelHeaderComponent, AccordionComponent, ExpansionPanelDirective, ExpansionPanelHeaderDirective, TabComponent,
6366
+ TreeComponent, ExpansionPanelComponent, ExpansionPanelHeaderComponent, AccordionComponent, ExpansionPanelDirective, ExpansionPanelHeaderDirective, TabsComponent,
6367
+ TabComponent,
6298
6368
  SnackbarComponent,
6299
6369
  BlockComponent,
6300
6370
  LoaderComponent,
@@ -6551,5 +6621,5 @@ const switchInOut = trigger('switchInOut', [
6551
6621
  * Generated bundle index. Do not edit.
6552
6622
  */
6553
6623
 
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 };
6624
+ 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
6625
  //# sourceMappingURL=wizishop-angular-components.mjs.map