@softpak/components 19.25.1 → 19.25.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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, input, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { signal, computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { FormsModule } from '@angular/forms';
4
4
  import { FaIconComponent } from '@fortawesome/angular-fontawesome';
5
5
  import { IonTabs, IonTabBar, IonTabButton } from '@ionic/angular/standalone';
@@ -40,6 +40,12 @@ class SpxTabsComponent {
40
40
  constructor(store) {
41
41
  this.store = store;
42
42
  this.navItems = signal([]);
43
+ this.shownNavItems = computed(() => {
44
+ const show = this.optionalNavItemBool();
45
+ return this.navItems().filter((navItem) => {
46
+ return !navItem.currentSettingsRequired || (navItem.currentSettingsRequired && show);
47
+ });
48
+ });
43
49
  this.showShortcuts = signal(false);
44
50
  this.optionalNavItemBool = input(true);
45
51
  this.subscription = {};
@@ -58,11 +64,11 @@ class SpxTabsComponent {
58
64
  }
59
65
  listenToMenuState() {
60
66
  this.subscription.menuState = this.store.select(spxNavigationReducer.default.selectTabs).subscribe((tabs) => {
61
- this.navItems.set(tabs.filter(tab => !tab.currentSettingsRequired || (tab.currentSettingsRequired && this.optionalNavItemBool())));
67
+ this.navItems.set(tabs.filter(tab => !tab.currentSettingsRequired));
62
68
  });
63
69
  }
64
70
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxTabsComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
65
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: SpxTabsComponent, isStandalone: true, selector: "spx-tabs", inputs: { optionalNavItemBool: { classPropertyName: "optionalNavItemBool", publicName: "optionalNavItemBool", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ion-tabs #tabs select=\"home\">\r\n <ion-tab-bar slot=\"bottom\" class=\"border-t border-gray-200\">\r\n @for (item of navItems(); track item.title) {\r\n <ion-tab-button [ngClass]=\"'ion-tab-button--' + item.code\" [tab]=\"item.code\"\r\n [attr.data-e2e]=\"'tab--' + item.code\">\r\n <fa-icon class=\"text-xl\" [icon]=\"showShortcuts() ? item.iconShortcut! : item.iconTab!\"></fa-icon>\r\n </ion-tab-button>\r\n }\r\n </ion-tab-bar>\r\n</ion-tabs>", styles: ["ion-tab-button{--color--active-tab: #FAB206;--color-focused: var(--color--active-tab);--color-selected: var(--color--active-tab);font-size:14px;padding-top:10px;padding-bottom:10px}ion-tab-button.ion-tab-button--hme{--color--active-tab: var(--color-hme);--ripple-color: var(--color-hme)}ion-tab-button.ion-tab-button--ord{--color--active-tab: var(--color-ord);--ripple-color: var(--color-ord)}ion-tab-button.ion-tab-button--qua{--color--active-tab: var(--color-qua);--ripple-color: var(--color-qua)}ion-tab-button.ion-tab-button--rel{--color--active-tab: var(--color-rel);--ripple-color: var(--color-rel)}ion-tab-button.ion-tab-button--rfr{--color--active-tab: var(--color-rfr);--ripple-color: var(--color-rfr)}ion-tab-button.ion-tab-button--sta{--color--active-tab: var(--color-sta);--ripple-color: var(--color-sta)}\n"], dependencies: [{ kind: "component", type: IonTabs, selector: "ion-tabs" }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: IonTabBar, selector: "ion-tab-bar", inputs: ["color", "mode", "selectedTab", "translucent"] }, { kind: "component", type: IonTabButton, selector: "ion-tab-button", inputs: ["disabled", "download", "href", "layout", "mode", "rel", "selected", "tab", "target"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
71
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: SpxTabsComponent, isStandalone: true, selector: "spx-tabs", inputs: { optionalNavItemBool: { classPropertyName: "optionalNavItemBool", publicName: "optionalNavItemBool", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ion-tabs #tabs select=\"home\">\r\n <ion-tab-bar slot=\"bottom\" class=\"border-t border-gray-200\">\r\n @for (item of shownNavItems(); track item.title) {\r\n <ion-tab-button [ngClass]=\"'ion-tab-button--' + item.code\" [tab]=\"item.code\"\r\n [attr.data-e2e]=\"'tab--' + item.code\">\r\n <fa-icon class=\"text-xl\" [icon]=\"showShortcuts() ? item.iconShortcut! : item.iconTab!\"></fa-icon>\r\n </ion-tab-button>\r\n }\r\n </ion-tab-bar>\r\n</ion-tabs>", styles: ["ion-tab-button{--color--active-tab: #FAB206;--color-focused: var(--color--active-tab);--color-selected: var(--color--active-tab);font-size:14px;padding-top:10px;padding-bottom:10px}ion-tab-button.ion-tab-button--hme{--color--active-tab: var(--color-hme);--ripple-color: var(--color-hme)}ion-tab-button.ion-tab-button--ord{--color--active-tab: var(--color-ord);--ripple-color: var(--color-ord)}ion-tab-button.ion-tab-button--qua{--color--active-tab: var(--color-qua);--ripple-color: var(--color-qua)}ion-tab-button.ion-tab-button--rel{--color--active-tab: var(--color-rel);--ripple-color: var(--color-rel)}ion-tab-button.ion-tab-button--rfr{--color--active-tab: var(--color-rfr);--ripple-color: var(--color-rfr)}ion-tab-button.ion-tab-button--sta{--color--active-tab: var(--color-sta);--ripple-color: var(--color-sta)}\n"], dependencies: [{ kind: "component", type: IonTabs, selector: "ion-tabs" }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: IonTabBar, selector: "ion-tab-bar", inputs: ["color", "mode", "selectedTab", "translucent"] }, { kind: "component", type: IonTabButton, selector: "ion-tab-button", inputs: ["disabled", "download", "href", "layout", "mode", "rel", "selected", "tab", "target"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
66
72
  }
67
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxTabsComponent, decorators: [{
68
74
  type: Component,
@@ -73,7 +79,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
73
79
  IonTabButton,
74
80
  FaIconComponent,
75
81
  NgClass
76
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-tabs #tabs select=\"home\">\r\n <ion-tab-bar slot=\"bottom\" class=\"border-t border-gray-200\">\r\n @for (item of navItems(); track item.title) {\r\n <ion-tab-button [ngClass]=\"'ion-tab-button--' + item.code\" [tab]=\"item.code\"\r\n [attr.data-e2e]=\"'tab--' + item.code\">\r\n <fa-icon class=\"text-xl\" [icon]=\"showShortcuts() ? item.iconShortcut! : item.iconTab!\"></fa-icon>\r\n </ion-tab-button>\r\n }\r\n </ion-tab-bar>\r\n</ion-tabs>", styles: ["ion-tab-button{--color--active-tab: #FAB206;--color-focused: var(--color--active-tab);--color-selected: var(--color--active-tab);font-size:14px;padding-top:10px;padding-bottom:10px}ion-tab-button.ion-tab-button--hme{--color--active-tab: var(--color-hme);--ripple-color: var(--color-hme)}ion-tab-button.ion-tab-button--ord{--color--active-tab: var(--color-ord);--ripple-color: var(--color-ord)}ion-tab-button.ion-tab-button--qua{--color--active-tab: var(--color-qua);--ripple-color: var(--color-qua)}ion-tab-button.ion-tab-button--rel{--color--active-tab: var(--color-rel);--ripple-color: var(--color-rel)}ion-tab-button.ion-tab-button--rfr{--color--active-tab: var(--color-rfr);--ripple-color: var(--color-rfr)}ion-tab-button.ion-tab-button--sta{--color--active-tab: var(--color-sta);--ripple-color: var(--color-sta)}\n"] }]
82
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-tabs #tabs select=\"home\">\r\n <ion-tab-bar slot=\"bottom\" class=\"border-t border-gray-200\">\r\n @for (item of shownNavItems(); track item.title) {\r\n <ion-tab-button [ngClass]=\"'ion-tab-button--' + item.code\" [tab]=\"item.code\"\r\n [attr.data-e2e]=\"'tab--' + item.code\">\r\n <fa-icon class=\"text-xl\" [icon]=\"showShortcuts() ? item.iconShortcut! : item.iconTab!\"></fa-icon>\r\n </ion-tab-button>\r\n }\r\n </ion-tab-bar>\r\n</ion-tabs>", styles: ["ion-tab-button{--color--active-tab: #FAB206;--color-focused: var(--color--active-tab);--color-selected: var(--color--active-tab);font-size:14px;padding-top:10px;padding-bottom:10px}ion-tab-button.ion-tab-button--hme{--color--active-tab: var(--color-hme);--ripple-color: var(--color-hme)}ion-tab-button.ion-tab-button--ord{--color--active-tab: var(--color-ord);--ripple-color: var(--color-ord)}ion-tab-button.ion-tab-button--qua{--color--active-tab: var(--color-qua);--ripple-color: var(--color-qua)}ion-tab-button.ion-tab-button--rel{--color--active-tab: var(--color-rel);--ripple-color: var(--color-rel)}ion-tab-button.ion-tab-button--rfr{--color--active-tab: var(--color-rfr);--ripple-color: var(--color-rfr)}ion-tab-button.ion-tab-button--sta{--color--active-tab: var(--color-sta);--ripple-color: var(--color-sta)}\n"] }]
77
83
  }], ctorParameters: () => [{ type: i1.Store }] });
78
84
 
79
85
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-tabs.mjs","sources":["../../../../projects/softpak/components/spx-tabs/store/spx-shortcuts.actions.ts","../../../../projects/softpak/components/spx-tabs/store/spx-shortcuts.reducer.ts","../../../../projects/softpak/components/spx-tabs/src/spx-tabs.component.ts","../../../../projects/softpak/components/spx-tabs/src/spx-tabs.component.html","../../../../projects/softpak/components/spx-tabs/softpak-components-spx-tabs.ts"],"sourcesContent":["import { createAction, props, union } from '@ngrx/store';\r\n\r\nexport const ctrl = createAction('[SPX / Shortcuts] CTRL', props<{ keyIsDown: boolean; }>());\r\n\r\nconst all = union({\r\n ctrl: ctrl,\r\n});\r\nexport type Actions = typeof all;","import * as actions from './spx-shortcuts.actions';\r\nimport { createFeature, createReducer, on } from '@ngrx/store';\r\n\r\nexport interface StateI {\r\n ctrlIsDown: boolean;\r\n}\r\n\r\nexport const initialState: StateI = {\r\n ctrlIsDown: false,\r\n};\r\n\r\nexport default createFeature({\r\n name: 'spxShortcuts',\r\n reducer: createReducer(\r\n initialState,\r\n on(actions.ctrl, (state: StateI, { keyIsDown }): StateI => ({\r\n ...state,\r\n ctrlIsDown: keyIsDown,\r\n })),\r\n )}\r\n);","import { ChangeDetectionStrategy, Component, input, OnInit, signal } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { FaIconComponent } from \"@fortawesome/angular-fontawesome\";\r\nimport { IonTabBar, IonTabButton, IonTabs } from \"@ionic/angular/standalone\";\r\nimport { Store } from \"@ngrx/store\";\r\nimport { unsubscribeSubscriptions } from \"@softpak/components/spx-helpers\";\r\nimport { SpxNavigationItemI, spxNavigationReducer } from \"@softpak/components/spx-navigation\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { NgClass } from \"@angular/common\";\r\nimport spxShortCutsReducer from '../store/spx-shortcuts.reducer';\r\n\r\n@Component({\r\n // eslint-disable-next-line @angular-eslint/component-selector\r\n selector: 'spx-tabs',\r\n standalone: true,\r\n imports: [\r\n IonTabs, \r\n FormsModule,\r\n IonTabBar,\r\n IonTabButton,\r\n FaIconComponent,\r\n NgClass\r\n ],\r\n templateUrl: './spx-tabs.component.html',\r\n styleUrl: './spx-tabs.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SpxTabsComponent implements OnInit {\r\n navItems = signal<SpxNavigationItemI[]>([]);\r\n showShortcuts = signal<boolean>(false);\r\n optionalNavItemBool = input<boolean>(true);\r\n private subscription: {\r\n ctrlState?: Subscription;\r\n menuState?: Subscription;\r\n } = {};\r\n\r\n constructor(\r\n private readonly store: Store,\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.listenToMenuState();\r\n this.listenToCtrlState();\r\n }\r\n\r\n ngOnDestroy() {\r\n unsubscribeSubscriptions(this.subscription);\r\n }\r\n\r\n private listenToCtrlState(): void {\r\n this.subscription.ctrlState = this.store.select(spxShortCutsReducer.selectCtrlIsDown).subscribe(ctrlIsDown => {\r\n this.showShortcuts.set(ctrlIsDown);\r\n });\r\n }\r\n\r\n private listenToMenuState(): void {\r\n this.subscription.menuState = this.store.select(spxNavigationReducer.default.selectTabs).subscribe((tabs) => {\r\n this.navItems.set(tabs.filter(tab => !tab.currentSettingsRequired || (tab.currentSettingsRequired && this.optionalNavItemBool())));\r\n });\r\n }\r\n\r\n}","<ion-tabs #tabs select=\"home\">\r\n <ion-tab-bar slot=\"bottom\" class=\"border-t border-gray-200\">\r\n @for (item of navItems(); track item.title) {\r\n <ion-tab-button [ngClass]=\"'ion-tab-button--' + item.code\" [tab]=\"item.code\"\r\n [attr.data-e2e]=\"'tab--' + item.code\">\r\n <fa-icon class=\"text-xl\" [icon]=\"showShortcuts() ? item.iconShortcut! : item.iconTab!\"></fa-icon>\r\n </ion-tab-button>\r\n }\r\n </ion-tab-bar>\r\n</ion-tabs>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.ctrl","spxShortCutsReducer"],"mappings":";;;;;;;;;;;AAEO,MAAM,IAAI,GAAG,YAAY,CAAC,wBAAwB,EAAE,KAAK,EAA2B,CAAC;AAE5F,MAAM,GAAG,GAAG,KAAK,CAAC;AACd,IAAA,IAAI,EAAE,IAAI;AACb,CAAA,CAAC;;;;;;;ACCK,MAAM,YAAY,GAAW;AAClC,IAAA,UAAU,EAAE,KAAK;CAClB;AAED,4BAAe,aAAa,CAAC;AAC3B,IAAA,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,aAAa,CACpB,YAAY,EACZ,EAAE,CAACA,IAAY,EAAE,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,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAMA,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAhB5B,SAAS;+BAEI,UAAU,EAAA,UAAA,EACR,IAAI,EACP,OAAA,EAAA;wBACP,OAAO;wBACP,WAAW;wBACX,SAAS;wBACT,YAAY;wBACZ,eAAe;wBACf;qBACD,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,meAAA,EAAA,MAAA,EAAA,CAAA,qzBAAA,CAAA,EAAA;;;AEzBnD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-tabs.mjs","sources":["../../../../projects/softpak/components/spx-tabs/store/spx-shortcuts.actions.ts","../../../../projects/softpak/components/spx-tabs/store/spx-shortcuts.reducer.ts","../../../../projects/softpak/components/spx-tabs/src/spx-tabs.component.ts","../../../../projects/softpak/components/spx-tabs/src/spx-tabs.component.html","../../../../projects/softpak/components/spx-tabs/softpak-components-spx-tabs.ts"],"sourcesContent":["import { createAction, props, union } from '@ngrx/store';\r\n\r\nexport const ctrl = createAction('[SPX / Shortcuts] CTRL', props<{ keyIsDown: boolean; }>());\r\n\r\nconst all = union({\r\n ctrl: ctrl,\r\n});\r\nexport type Actions = typeof all;","import * as actions from './spx-shortcuts.actions';\r\nimport { createFeature, createReducer, on } from '@ngrx/store';\r\n\r\nexport interface StateI {\r\n ctrlIsDown: boolean;\r\n}\r\n\r\nexport const initialState: StateI = {\r\n ctrlIsDown: false,\r\n};\r\n\r\nexport default createFeature({\r\n name: 'spxShortcuts',\r\n reducer: createReducer(\r\n initialState,\r\n on(actions.ctrl, (state: StateI, { keyIsDown }): StateI => ({\r\n ...state,\r\n ctrlIsDown: keyIsDown,\r\n })),\r\n )}\r\n);","import { ChangeDetectionStrategy, Component, computed, input, OnInit, signal } from \"@angular/core\";\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { FaIconComponent } from \"@fortawesome/angular-fontawesome\";\r\nimport { IonTabBar, IonTabButton, IonTabs } from \"@ionic/angular/standalone\";\r\nimport { Store } from \"@ngrx/store\";\r\nimport { unsubscribeSubscriptions } from \"@softpak/components/spx-helpers\";\r\nimport { SpxNavigationItemI, spxNavigationReducer } from \"@softpak/components/spx-navigation\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { NgClass } from \"@angular/common\";\r\nimport spxShortCutsReducer from '../store/spx-shortcuts.reducer';\r\n\r\n@Component({\r\n // eslint-disable-next-line @angular-eslint/component-selector\r\n selector: 'spx-tabs',\r\n standalone: true,\r\n imports: [\r\n IonTabs, \r\n FormsModule,\r\n IonTabBar,\r\n IonTabButton,\r\n FaIconComponent,\r\n NgClass\r\n ],\r\n templateUrl: './spx-tabs.component.html',\r\n styleUrl: './spx-tabs.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SpxTabsComponent implements OnInit {\r\n navItems = signal<SpxNavigationItemI[]>([]);\r\n shownNavItems = computed(() => {\r\n const show = this.optionalNavItemBool();\r\n return this.navItems().filter((navItem) => {\r\n return !navItem.currentSettingsRequired || (navItem.currentSettingsRequired && show);\r\n });\r\n });\r\n\r\n showShortcuts = signal<boolean>(false);\r\n optionalNavItemBool = input<boolean>(true);\r\n private subscription: {\r\n ctrlState?: Subscription;\r\n menuState?: Subscription;\r\n } = {};\r\n\r\n constructor(\r\n private readonly store: Store,\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.listenToMenuState();\r\n this.listenToCtrlState();\r\n }\r\n\r\n ngOnDestroy() {\r\n unsubscribeSubscriptions(this.subscription);\r\n }\r\n\r\n private listenToCtrlState(): void {\r\n this.subscription.ctrlState = this.store.select(spxShortCutsReducer.selectCtrlIsDown).subscribe(ctrlIsDown => {\r\n this.showShortcuts.set(ctrlIsDown);\r\n });\r\n }\r\n\r\n private listenToMenuState(): void {\r\n this.subscription.menuState = this.store.select(spxNavigationReducer.default.selectTabs).subscribe((tabs) => {\r\n this.navItems.set(tabs.filter(tab => !tab.currentSettingsRequired));\r\n });\r\n }\r\n\r\n}","<ion-tabs #tabs select=\"home\">\r\n <ion-tab-bar slot=\"bottom\" class=\"border-t border-gray-200\">\r\n @for (item of shownNavItems(); track item.title) {\r\n <ion-tab-button [ngClass]=\"'ion-tab-button--' + item.code\" [tab]=\"item.code\"\r\n [attr.data-e2e]=\"'tab--' + item.code\">\r\n <fa-icon class=\"text-xl\" [icon]=\"showShortcuts() ? item.iconShortcut! : item.iconTab!\"></fa-icon>\r\n </ion-tab-button>\r\n }\r\n </ion-tab-bar>\r\n</ion-tabs>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.ctrl","spxShortCutsReducer"],"mappings":";;;;;;;;;;;AAEO,MAAM,IAAI,GAAG,YAAY,CAAC,wBAAwB,EAAE,KAAK,EAA2B,CAAC;AAE5F,MAAM,GAAG,GAAG,KAAK,CAAC;AACd,IAAA,IAAI,EAAE,IAAI;AACb,CAAA,CAAC;;;;;;;ACCK,MAAM,YAAY,GAAW;AAClC,IAAA,UAAU,EAAE,KAAK;CAClB;AAED,4BAAe,aAAa,CAAC;AAC3B,IAAA,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,aAAa,CACpB,YAAY,EACZ,EAAE,CAACA,IAAY,EAAE,CAAC,KAAa,EAAE,EAAE,SAAS,EAAE,MAAc;AACxD,QAAA,GAAG,KAAK;AACR,QAAA,UAAU,EAAE,SAAS;AACxB,KAAA,CAAC,CAAC;AACH,CAAA,CACH;;;;;;;;MCOY,gBAAgB,CAAA;AAgB3B,IAAA,WAAA,CACmB,KAAY,EAAA;QAAZ,IAAK,CAAA,KAAA,GAAL,KAAK;AAhBxB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAuB,EAAE,CAAC;AAC3C,QAAA,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAK;A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MAAA,EAAA,CAAA,CAAA;;4FAMA,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAhB5B,SAAS;+BAEI,UAAU,EAAA,UAAA,EACR,IAAI,EACP,OAAA,EAAA;wBACP,OAAO;wBACP,WAAW;wBACX,SAAS;wBACT,YAAY;wBACZ,eAAe;wBACf;qBACD,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,weAAA,EAAA,MAAA,EAAA,CAAA,qzBAAA,CAAA,EAAA;;;AEzBnD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softpak/components",
3
- "version": "19.25.1",
3
+ "version": "19.25.3",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "19.x.x",
@@ -33,34 +33,34 @@
33
33
  "types": "./spx-404-page/index.d.ts",
34
34
  "default": "./fesm2022/softpak-components-spx-404-page.mjs"
35
35
  },
36
- "./spx-alert": {
37
- "types": "./spx-alert/index.d.ts",
38
- "default": "./fesm2022/softpak-components-spx-alert.mjs"
39
- },
40
36
  "./spx-app-expiry": {
41
37
  "types": "./spx-app-expiry/index.d.ts",
42
38
  "default": "./fesm2022/softpak-components-spx-app-expiry.mjs"
43
39
  },
40
+ "./spx-alert": {
41
+ "types": "./spx-alert/index.d.ts",
42
+ "default": "./fesm2022/softpak-components-spx-alert.mjs"
43
+ },
44
44
  "./spx-app-configuration": {
45
45
  "types": "./spx-app-configuration/index.d.ts",
46
46
  "default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
47
47
  },
48
- "./spx-card": {
49
- "types": "./spx-card/index.d.ts",
50
- "default": "./fesm2022/softpak-components-spx-card.mjs"
51
- },
52
48
  "./spx-button": {
53
49
  "types": "./spx-button/index.d.ts",
54
50
  "default": "./fesm2022/softpak-components-spx-button.mjs"
55
51
  },
56
- "./spx-change-details": {
57
- "types": "./spx-change-details/index.d.ts",
58
- "default": "./fesm2022/softpak-components-spx-change-details.mjs"
59
- },
60
52
  "./spx-capitalize": {
61
53
  "types": "./spx-capitalize/index.d.ts",
62
54
  "default": "./fesm2022/softpak-components-spx-capitalize.mjs"
63
55
  },
56
+ "./spx-card": {
57
+ "types": "./spx-card/index.d.ts",
58
+ "default": "./fesm2022/softpak-components-spx-card.mjs"
59
+ },
60
+ "./spx-change-details": {
61
+ "types": "./spx-change-details/index.d.ts",
62
+ "default": "./fesm2022/softpak-components-spx-change-details.mjs"
63
+ },
64
64
  "./spx-channel-selection": {
65
65
  "types": "./spx-channel-selection/index.d.ts",
66
66
  "default": "./fesm2022/softpak-components-spx-channel-selection.mjs"
@@ -105,14 +105,14 @@
105
105
  "types": "./spx-patch/index.d.ts",
106
106
  "default": "./fesm2022/softpak-components-spx-patch.mjs"
107
107
  },
108
- "./spx-progress-bar": {
109
- "types": "./spx-progress-bar/index.d.ts",
110
- "default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
111
- },
112
108
  "./spx-pipes": {
113
109
  "types": "./spx-pipes/index.d.ts",
114
110
  "default": "./fesm2022/softpak-components-spx-pipes.mjs"
115
111
  },
112
+ "./spx-progress-bar": {
113
+ "types": "./spx-progress-bar/index.d.ts",
114
+ "default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
115
+ },
116
116
  "./spx-spinner": {
117
117
  "types": "./spx-spinner/index.d.ts",
118
118
  "default": "./fesm2022/softpak-components-spx-spinner.mjs"
@@ -121,26 +121,26 @@
121
121
  "types": "./spx-stock-info/index.d.ts",
122
122
  "default": "./fesm2022/softpak-components-spx-stock-info.mjs"
123
123
  },
124
- "./spx-suggestion": {
125
- "types": "./spx-suggestion/index.d.ts",
126
- "default": "./fesm2022/softpak-components-spx-suggestion.mjs"
127
- },
128
124
  "./spx-storage": {
129
125
  "types": "./spx-storage/index.d.ts",
130
126
  "default": "./fesm2022/softpak-components-spx-storage.mjs"
131
127
  },
128
+ "./spx-suggestion": {
129
+ "types": "./spx-suggestion/index.d.ts",
130
+ "default": "./fesm2022/softpak-components-spx-suggestion.mjs"
131
+ },
132
132
  "./spx-tabs": {
133
133
  "types": "./spx-tabs/index.d.ts",
134
134
  "default": "./fesm2022/softpak-components-spx-tabs.mjs"
135
135
  },
136
- "./spx-toggle": {
137
- "types": "./spx-toggle/index.d.ts",
138
- "default": "./fesm2022/softpak-components-spx-toggle.mjs"
139
- },
140
136
  "./spx-toaster": {
141
137
  "types": "./spx-toaster/index.d.ts",
142
138
  "default": "./fesm2022/softpak-components-spx-toaster.mjs"
143
139
  },
140
+ "./spx-toggle": {
141
+ "types": "./spx-toggle/index.d.ts",
142
+ "default": "./fesm2022/softpak-components-spx-toggle.mjs"
143
+ },
144
144
  "./spx-translate": {
145
145
  "types": "./spx-translate/index.d.ts",
146
146
  "default": "./fesm2022/softpak-components-spx-translate.mjs"
@@ -5,6 +5,7 @@ import * as i0 from "@angular/core";
5
5
  export declare class SpxTabsComponent implements OnInit {
6
6
  private readonly store;
7
7
  navItems: import("@angular/core").WritableSignal<SpxNavigationItemI[]>;
8
+ shownNavItems: import("@angular/core").Signal<SpxNavigationItemI[]>;
8
9
  showShortcuts: import("@angular/core").WritableSignal<boolean>;
9
10
  optionalNavItemBool: import("@angular/core").InputSignal<boolean>;
10
11
  private subscription;