@propbinder/mobile-design 0.2.10 → 0.2.11
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.
|
@@ -7580,19 +7580,19 @@ class DsMobileTabBarComponent {
|
|
|
7580
7580
|
this.setupBreakpointDetection();
|
|
7581
7581
|
// Debug: Log initial state
|
|
7582
7582
|
setTimeout(() => {
|
|
7583
|
-
console.log('[ds-mobile-tab-bar] Initial state:', {
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
});
|
|
7583
|
+
// console.log('[ds-mobile-tab-bar] Initial state:', {
|
|
7584
|
+
// isDesktop: this.isDesktop(),
|
|
7585
|
+
// windowWidth: window.innerWidth,
|
|
7586
|
+
// mediaQuery: this.mediaQuery?.matches,
|
|
7587
|
+
// userAgent: navigator.userAgent
|
|
7588
|
+
// });
|
|
7589
7589
|
}, 100);
|
|
7590
7590
|
// Watch for isDesktop changes and update slot reactively
|
|
7591
7591
|
// effect() must be called in constructor (injection context)
|
|
7592
7592
|
effect(() => {
|
|
7593
7593
|
// This effect runs whenever isDesktop() changes
|
|
7594
7594
|
const _ = this.isDesktop(); // Read the signal to create dependency
|
|
7595
|
-
console.log('[ds-mobile-tab-bar] effect() triggered, isDesktop:', this.isDesktop());
|
|
7595
|
+
// console.log('[ds-mobile-tab-bar] effect() triggered, isDesktop:', this.isDesktop());
|
|
7596
7596
|
if (this.elementRef.nativeElement) {
|
|
7597
7597
|
// Use setTimeout to ensure DOM is ready
|
|
7598
7598
|
setTimeout(() => this.updateSlot(), 0);
|
|
@@ -7603,7 +7603,7 @@ class DsMobileTabBarComponent {
|
|
|
7603
7603
|
// Listen to router events to detect active tab from URL
|
|
7604
7604
|
if (this.router) {
|
|
7605
7605
|
this.routerSubscription = this.router.events
|
|
7606
|
-
.pipe(filter(event => event instanceof NavigationEnd))
|
|
7606
|
+
.pipe(filter((event) => event instanceof NavigationEnd))
|
|
7607
7607
|
.subscribe((event) => {
|
|
7608
7608
|
const url = event.urlAfterRedirects || event.url;
|
|
7609
7609
|
// Extract the route segment (e.g., /tab-bar-test/home -> home)
|
|
@@ -7611,7 +7611,7 @@ class DsMobileTabBarComponent {
|
|
|
7611
7611
|
const lastSegment = segments[segments.length - 1];
|
|
7612
7612
|
// Find matching tab by route
|
|
7613
7613
|
if (this.tabs && lastSegment) {
|
|
7614
|
-
const matchingTab = this.tabs.find(tab => tab.route === lastSegment);
|
|
7614
|
+
const matchingTab = this.tabs.find((tab) => tab.route === lastSegment);
|
|
7615
7615
|
if (matchingTab) {
|
|
7616
7616
|
this.activeTab.set(matchingTab.route);
|
|
7617
7617
|
}
|
|
@@ -7643,14 +7643,14 @@ class DsMobileTabBarComponent {
|
|
|
7643
7643
|
const hostSlotValue = this.isDesktop() ? 'top' : 'bottom';
|
|
7644
7644
|
const currentHostSlot = hostElement.getAttribute('slot');
|
|
7645
7645
|
if (currentHostSlot !== hostSlotValue) {
|
|
7646
|
-
console.log('[ds-mobile-tab-bar] updateSlot: Setting HOST slot from', currentHostSlot, 'to', hostSlotValue);
|
|
7646
|
+
// console.log('[ds-mobile-tab-bar] updateSlot: Setting HOST slot from', currentHostSlot, 'to', hostSlotValue);
|
|
7647
7647
|
hostElement.setAttribute('slot', hostSlotValue);
|
|
7648
7648
|
hostElement.slot = hostSlotValue;
|
|
7649
7649
|
}
|
|
7650
7650
|
// Get the ion-tab-bar element
|
|
7651
7651
|
const tabBar = this.elementRef.nativeElement.querySelector('ion-tab-bar');
|
|
7652
7652
|
if (!tabBar) {
|
|
7653
|
-
console.log('[ds-mobile-tab-bar] updateSlot: tabBar not found, retrying...');
|
|
7653
|
+
// console.log('[ds-mobile-tab-bar] updateSlot: tabBar not found, retrying...');
|
|
7654
7654
|
// Retry if element not found yet
|
|
7655
7655
|
setTimeout(() => this.updateSlot(), 50);
|
|
7656
7656
|
return;
|
|
@@ -7659,26 +7659,26 @@ class DsMobileTabBarComponent {
|
|
|
7659
7659
|
const currentSlot = tabBar.getAttribute('slot');
|
|
7660
7660
|
const currentSlotProperty = tabBar.slot;
|
|
7661
7661
|
// Debug logging
|
|
7662
|
-
console.log('[ds-mobile-tab-bar] updateSlot:', {
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
});
|
|
7662
|
+
// console.log('[ds-mobile-tab-bar] updateSlot:', {
|
|
7663
|
+
// isDesktop: this.isDesktop(),
|
|
7664
|
+
// windowWidth: window.innerWidth,
|
|
7665
|
+
// slotValue,
|
|
7666
|
+
// currentSlotAttribute: currentSlot,
|
|
7667
|
+
// currentSlotProperty: currentSlotProperty,
|
|
7668
|
+
// tabBarElement: tabBar,
|
|
7669
|
+
// tabBarParent: tabBar.parentElement?.tagName,
|
|
7670
|
+
// tabBarInIonTabs: tabBar.closest('ion-tabs') !== null
|
|
7671
|
+
// });
|
|
7672
7672
|
// Only update if different to avoid unnecessary DOM manipulation
|
|
7673
7673
|
if (currentSlot !== slotValue || currentSlotProperty !== slotValue) {
|
|
7674
|
-
console.log('[ds-mobile-tab-bar] updateSlot: Setting slot from', currentSlot, 'to', slotValue);
|
|
7674
|
+
// console.log('[ds-mobile-tab-bar] updateSlot: Setting slot from', currentSlot, 'to', slotValue);
|
|
7675
7675
|
// Set both attribute and property to ensure it works
|
|
7676
7676
|
tabBar.setAttribute('slot', slotValue);
|
|
7677
7677
|
tabBar.slot = slotValue;
|
|
7678
7678
|
// Also try setting it on the parent ion-tabs
|
|
7679
7679
|
const parentIonTabs = tabBar.closest('ion-tabs');
|
|
7680
7680
|
if (parentIonTabs) {
|
|
7681
|
-
console.log('[ds-mobile-tab-bar] updateSlot: Found parent ion-tabs');
|
|
7681
|
+
// console.log('[ds-mobile-tab-bar] updateSlot: Found parent ion-tabs');
|
|
7682
7682
|
// Force Ionic to recognize the slot change
|
|
7683
7683
|
parentIonTabs.forceUpdate?.();
|
|
7684
7684
|
}
|
|
@@ -7687,143 +7687,150 @@ class DsMobileTabBarComponent {
|
|
|
7687
7687
|
// Verify it was set
|
|
7688
7688
|
const verifySlot = tabBar.getAttribute('slot');
|
|
7689
7689
|
const verifySlotProperty = tabBar.slot;
|
|
7690
|
-
console.log('[ds-mobile-tab-bar] updateSlot: After update, slot attribute:', verifySlot, 'slot property:', verifySlotProperty);
|
|
7690
|
+
// console.log('[ds-mobile-tab-bar] updateSlot: After update, slot attribute:', verifySlot, 'slot property:', verifySlotProperty);
|
|
7691
7691
|
// Check computed styles
|
|
7692
7692
|
const computedStyle = window.getComputedStyle(tabBar);
|
|
7693
|
-
const parentComputedStyle = tabBar.parentElement
|
|
7693
|
+
const parentComputedStyle = tabBar.parentElement
|
|
7694
|
+
? window.getComputedStyle(tabBar.parentElement)
|
|
7695
|
+
: null;
|
|
7694
7696
|
const ionTabsForStyles = tabBar.closest('ion-tabs');
|
|
7695
|
-
const ionTabsComputedStyle = ionTabsForStyles
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7697
|
+
const ionTabsComputedStyle = ionTabsForStyles
|
|
7698
|
+
? window.getComputedStyle(ionTabsForStyles)
|
|
7699
|
+
: null;
|
|
7700
|
+
// console.log('[ds-mobile-tab-bar] updateSlot: Computed styles:', {
|
|
7701
|
+
// tabBar: {
|
|
7702
|
+
// position: computedStyle.position,
|
|
7703
|
+
// top: computedStyle.top,
|
|
7704
|
+
// bottom: computedStyle.bottom,
|
|
7705
|
+
// order: computedStyle.order,
|
|
7706
|
+
// display: computedStyle.display,
|
|
7707
|
+
// zIndex: computedStyle.zIndex,
|
|
7708
|
+
// transform: computedStyle.transform
|
|
7709
|
+
// },
|
|
7710
|
+
// parent: parentComputedStyle ? {
|
|
7711
|
+
// display: parentComputedStyle.display,
|
|
7712
|
+
// flexDirection: parentComputedStyle.flexDirection,
|
|
7713
|
+
// gridTemplateRows: parentComputedStyle.gridTemplateRows
|
|
7714
|
+
// } : null,
|
|
7715
|
+
// ionTabs: ionTabsComputedStyle ? {
|
|
7716
|
+
// display: ionTabsComputedStyle.display,
|
|
7717
|
+
// flexDirection: ionTabsComputedStyle.flexDirection,
|
|
7718
|
+
// gridTemplateRows: ionTabsComputedStyle.gridTemplateRows,
|
|
7719
|
+
// position: ionTabsComputedStyle.position
|
|
7720
|
+
// } : null,
|
|
7721
|
+
// tabBarRect: tabBar.getBoundingClientRect(),
|
|
7722
|
+
// windowHeight: window.innerHeight
|
|
7723
|
+
// });
|
|
7720
7724
|
}
|
|
7721
7725
|
else {
|
|
7722
|
-
console.log('[ds-mobile-tab-bar] updateSlot: Slot already correct, no update needed');
|
|
7726
|
+
// console.log('[ds-mobile-tab-bar] updateSlot: Slot already correct, no update needed');
|
|
7723
7727
|
// Even if slot is correct, check computed styles to see why it's not at top
|
|
7724
7728
|
const computedStyle = window.getComputedStyle(tabBar);
|
|
7725
7729
|
const ionTabsForStyles = tabBar.closest('ion-tabs');
|
|
7726
|
-
const ionTabsComputedStyle = ionTabsForStyles
|
|
7730
|
+
const ionTabsComputedStyle = ionTabsForStyles
|
|
7731
|
+
? window.getComputedStyle(ionTabsForStyles)
|
|
7732
|
+
: null;
|
|
7727
7733
|
const tabBarRect = tabBar.getBoundingClientRect();
|
|
7728
7734
|
// Log key values directly so they're always visible
|
|
7729
|
-
console.log('[ds-mobile-tab-bar] KEY VALUES:');
|
|
7730
|
-
console.log(' tabBar.position:', computedStyle.position);
|
|
7731
|
-
console.log(' tabBar.top:', computedStyle.top);
|
|
7732
|
-
console.log(' tabBar.bottom:', computedStyle.bottom);
|
|
7733
|
-
console.log(' tabBar.order:', computedStyle.order);
|
|
7734
|
-
console.log(' tabBar.display:', computedStyle.display);
|
|
7735
|
-
console.log(' tabBarRect.top:', tabBarRect.top, 'px from top');
|
|
7736
|
-
console.log(' tabBarRect.bottom:', tabBarRect.bottom, 'px from top');
|
|
7737
|
-
console.log(' window.innerHeight:', window.innerHeight);
|
|
7735
|
+
// console.log('[ds-mobile-tab-bar] KEY VALUES:');
|
|
7736
|
+
// console.log(' tabBar.position:', computedStyle.position);
|
|
7737
|
+
// console.log(' tabBar.top:', computedStyle.top);
|
|
7738
|
+
// console.log(' tabBar.bottom:', computedStyle.bottom);
|
|
7739
|
+
// console.log(' tabBar.order:', computedStyle.order);
|
|
7740
|
+
// console.log(' tabBar.display:', computedStyle.display);
|
|
7741
|
+
// console.log(' tabBarRect.top:', tabBarRect.top, 'px from top');
|
|
7742
|
+
// console.log(' tabBarRect.bottom:', tabBarRect.bottom, 'px from top');
|
|
7743
|
+
// console.log(' window.innerHeight:', window.innerHeight);
|
|
7738
7744
|
if (ionTabsComputedStyle) {
|
|
7739
|
-
console.log(' ionTabs.display:', ionTabsComputedStyle.display);
|
|
7740
|
-
console.log(' ionTabs.flexDirection:', ionTabsComputedStyle.flexDirection);
|
|
7741
|
-
console.log(' ionTabs.gridTemplateRows:', ionTabsComputedStyle.gridTemplateRows);
|
|
7745
|
+
// console.log(' ionTabs.display:', ionTabsComputedStyle.display);
|
|
7746
|
+
// console.log(' ionTabs.flexDirection:', ionTabsComputedStyle.flexDirection);
|
|
7747
|
+
// console.log(' ionTabs.gridTemplateRows:', ionTabsComputedStyle.gridTemplateRows);
|
|
7742
7748
|
}
|
|
7743
7749
|
if (ionTabsForStyles) {
|
|
7744
7750
|
const children = Array.from(ionTabsForStyles.children);
|
|
7745
|
-
console.log(' ionTabs children count:', children.length);
|
|
7751
|
+
// console.log(' ionTabs children count:', children.length);
|
|
7746
7752
|
children.forEach((child, index) => {
|
|
7747
|
-
console.log(` [${index}] ${child.tagName} slot="${child.getAttribute('slot')}" order="${window.getComputedStyle(child).order}"`);
|
|
7753
|
+
// console.log(` [${index}] ${child.tagName} slot="${child.getAttribute('slot')}" order="${window.getComputedStyle(child).order}"`);
|
|
7748
7754
|
});
|
|
7749
7755
|
}
|
|
7750
|
-
console.log('[ds-mobile-tab-bar] updateSlot: Computed styles (slot correct but visually wrong):', {
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
});
|
|
7756
|
+
// console.log('[ds-mobile-tab-bar] updateSlot: Computed styles (slot correct but visually wrong):', {
|
|
7757
|
+
// tabBar: {
|
|
7758
|
+
// position: computedStyle.position,
|
|
7759
|
+
// top: computedStyle.top,
|
|
7760
|
+
// bottom: computedStyle.bottom,
|
|
7761
|
+
// order: computedStyle.order,
|
|
7762
|
+
// display: computedStyle.display,
|
|
7763
|
+
// zIndex: computedStyle.zIndex,
|
|
7764
|
+
// transform: computedStyle.transform,
|
|
7765
|
+
// marginTop: computedStyle.marginTop,
|
|
7766
|
+
// marginBottom: computedStyle.marginBottom,
|
|
7767
|
+
// width: computedStyle.width,
|
|
7768
|
+
// height: computedStyle.height
|
|
7769
|
+
// },
|
|
7770
|
+
// ionTabs: ionTabsComputedStyle ? {
|
|
7771
|
+
// display: ionTabsComputedStyle.display,
|
|
7772
|
+
// flexDirection: ionTabsComputedStyle.flexDirection,
|
|
7773
|
+
// gridTemplateRows: ionTabsComputedStyle.gridTemplateRows,
|
|
7774
|
+
// gridTemplateColumns: ionTabsComputedStyle.gridTemplateColumns,
|
|
7775
|
+
// position: ionTabsComputedStyle.position,
|
|
7776
|
+
// alignItems: ionTabsComputedStyle.alignItems,
|
|
7777
|
+
// justifyContent: ionTabsComputedStyle.justifyContent,
|
|
7778
|
+
// height: ionTabsComputedStyle.height,
|
|
7779
|
+
// minHeight: ionTabsComputedStyle.minHeight
|
|
7780
|
+
// } : null,
|
|
7781
|
+
// tabBarRect: {
|
|
7782
|
+
// top: tabBarRect.top,
|
|
7783
|
+
// bottom: tabBarRect.bottom,
|
|
7784
|
+
// height: tabBarRect.height,
|
|
7785
|
+
// y: tabBarRect.y,
|
|
7786
|
+
// left: tabBarRect.left,
|
|
7787
|
+
// right: tabBarRect.right,
|
|
7788
|
+
// width: tabBarRect.width
|
|
7789
|
+
// },
|
|
7790
|
+
// windowHeight: window.innerHeight,
|
|
7791
|
+
// distanceFromTop: tabBarRect.top,
|
|
7792
|
+
// distanceFromBottom: window.innerHeight - tabBarRect.bottom,
|
|
7793
|
+
// // Check if tab bar is actually in the DOM at the right position
|
|
7794
|
+
// tabBarParent: tabBar.parentElement?.tagName,
|
|
7795
|
+
// tabBarNextSibling: tabBar.nextElementSibling?.tagName,
|
|
7796
|
+
// tabBarPreviousSibling: tabBar.previousElementSibling?.tagName,
|
|
7797
|
+
// // Check all children of ion-tabs to see DOM order
|
|
7798
|
+
// ionTabsChildren: ionTabsForStyles ? Array.from(ionTabsForStyles.children).map((child: any) => ({
|
|
7799
|
+
// tagName: child.tagName,
|
|
7800
|
+
// slot: child.getAttribute('slot'),
|
|
7801
|
+
// order: window.getComputedStyle(child).order
|
|
7802
|
+
// })) : null
|
|
7803
|
+
// });
|
|
7798
7804
|
}
|
|
7799
7805
|
}
|
|
7800
7806
|
setupSlotEnforcement() {
|
|
7801
7807
|
const hostElement = this.elementRef.nativeElement;
|
|
7802
7808
|
const tabBar = this.elementRef.nativeElement.querySelector('ion-tab-bar');
|
|
7803
7809
|
if (!tabBar) {
|
|
7804
|
-
console.log('[ds-mobile-tab-bar] setupSlotEnforcement: tabBar not found, retrying...');
|
|
7810
|
+
// console.log('[ds-mobile-tab-bar] setupSlotEnforcement: tabBar not found, retrying...');
|
|
7805
7811
|
// Retry if element not found yet
|
|
7806
7812
|
setTimeout(() => this.setupSlotEnforcement(), 50);
|
|
7807
7813
|
return;
|
|
7808
7814
|
}
|
|
7809
|
-
console.log('[ds-mobile-tab-bar] setupSlotEnforcement: Setting up MutationObserver');
|
|
7815
|
+
// console.log('[ds-mobile-tab-bar] setupSlotEnforcement: Setting up MutationObserver');
|
|
7810
7816
|
const observer = new MutationObserver((mutations) => {
|
|
7811
7817
|
mutations.forEach((mutation) => {
|
|
7812
|
-
if (mutation.type === 'attributes' &&
|
|
7818
|
+
if (mutation.type === 'attributes' &&
|
|
7819
|
+
mutation.attributeName === 'slot') {
|
|
7813
7820
|
const target = mutation.target;
|
|
7814
7821
|
const expectedSlot = this.isDesktop() ? 'top' : 'bottom';
|
|
7815
7822
|
// Check both host element and tab bar
|
|
7816
7823
|
if (target === hostElement || target === tabBar) {
|
|
7817
7824
|
const currentSlot = target.getAttribute('slot');
|
|
7818
|
-
console.log('[ds-mobile-tab-bar] Slot changed by external source:', {
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
});
|
|
7825
|
+
// console.log('[ds-mobile-tab-bar] Slot changed by external source:', {
|
|
7826
|
+
// target: target.tagName,
|
|
7827
|
+
// currentSlot,
|
|
7828
|
+
// expectedSlot,
|
|
7829
|
+
// isDesktop: this.isDesktop()
|
|
7830
|
+
// });
|
|
7824
7831
|
// If Ionic or something else changed it, force it back
|
|
7825
7832
|
if (currentSlot !== expectedSlot) {
|
|
7826
|
-
console.log('[ds-mobile-tab-bar] Enforcing slot back to:', expectedSlot);
|
|
7833
|
+
// console.log('[ds-mobile-tab-bar] Enforcing slot back to:', expectedSlot);
|
|
7827
7834
|
// Use requestAnimationFrame to avoid infinite loops
|
|
7828
7835
|
requestAnimationFrame(() => {
|
|
7829
7836
|
target.setAttribute('slot', expectedSlot);
|
|
@@ -7837,11 +7844,11 @@ class DsMobileTabBarComponent {
|
|
|
7837
7844
|
// Observe both host element and tab bar for slot changes
|
|
7838
7845
|
observer.observe(hostElement, {
|
|
7839
7846
|
attributes: true,
|
|
7840
|
-
attributeFilter: ['slot']
|
|
7847
|
+
attributeFilter: ['slot'],
|
|
7841
7848
|
});
|
|
7842
7849
|
observer.observe(tabBar, {
|
|
7843
7850
|
attributes: true,
|
|
7844
|
-
attributeFilter: ['slot']
|
|
7851
|
+
attributeFilter: ['slot'],
|
|
7845
7852
|
});
|
|
7846
7853
|
// Store observer for cleanup
|
|
7847
7854
|
this.slotEnforcementObserver = observer;
|
|
@@ -7868,11 +7875,11 @@ class DsMobileTabBarComponent {
|
|
|
7868
7875
|
this.mediaQuery.addEventListener('change', this.handleBreakpointChange);
|
|
7869
7876
|
}
|
|
7870
7877
|
handleBreakpointChange = (e) => {
|
|
7871
|
-
console.log('[ds-mobile-tab-bar] handleBreakpointChange:', {
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
});
|
|
7878
|
+
// console.log('[ds-mobile-tab-bar] handleBreakpointChange:', {
|
|
7879
|
+
// matches: e.matches,
|
|
7880
|
+
// windowWidth: window.innerWidth,
|
|
7881
|
+
// previousIsDesktop: this.isDesktop()
|
|
7882
|
+
// });
|
|
7876
7883
|
this.isDesktop.set(e.matches);
|
|
7877
7884
|
// Force update the slot when breakpoint changes
|
|
7878
7885
|
this.updateSlot();
|
|
@@ -7882,13 +7889,15 @@ class DsMobileTabBarComponent {
|
|
|
7882
7889
|
attributes: true,
|
|
7883
7890
|
attributeFilter: ['title'],
|
|
7884
7891
|
subtree: true,
|
|
7885
|
-
childList: true
|
|
7892
|
+
childList: true,
|
|
7886
7893
|
};
|
|
7887
7894
|
this.mutationObserver = new MutationObserver((mutations) => {
|
|
7888
7895
|
mutations.forEach((mutation) => {
|
|
7889
|
-
if (mutation.type === 'attributes' &&
|
|
7896
|
+
if (mutation.type === 'attributes' &&
|
|
7897
|
+
mutation.attributeName === 'title') {
|
|
7890
7898
|
const target = mutation.target;
|
|
7891
|
-
if (target.tagName === 'ION-TAB-BUTTON' &&
|
|
7899
|
+
if (target.tagName === 'ION-TAB-BUTTON' &&
|
|
7900
|
+
target.hasAttribute('title')) {
|
|
7892
7901
|
target.removeAttribute('title');
|
|
7893
7902
|
}
|
|
7894
7903
|
}
|
|
@@ -7946,13 +7955,13 @@ class DsMobileTabBarComponent {
|
|
|
7946
7955
|
attributes: true,
|
|
7947
7956
|
attributeFilter: ['selected', 'tab'],
|
|
7948
7957
|
subtree: true,
|
|
7949
|
-
childList: true
|
|
7958
|
+
childList: true,
|
|
7950
7959
|
});
|
|
7951
7960
|
// Also watch the parent ion-tabs for changes
|
|
7952
7961
|
observer.observe(ionTabs, {
|
|
7953
7962
|
attributes: true,
|
|
7954
7963
|
attributeFilter: ['selected', 'tab'],
|
|
7955
|
-
subtree: true
|
|
7964
|
+
subtree: true,
|
|
7956
7965
|
});
|
|
7957
7966
|
// Periodic check as fallback (in case events don't fire)
|
|
7958
7967
|
setInterval(() => {
|
|
@@ -8032,17 +8041,42 @@ class DsMobileTabBarComponent {
|
|
|
8032
8041
|
actionGroups: menuItems,
|
|
8033
8042
|
currentLanguage: 'da', // TODO: Get from language service
|
|
8034
8043
|
availableLanguages: [
|
|
8035
|
-
{
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8044
|
+
{
|
|
8045
|
+
code: 'da',
|
|
8046
|
+
nativeName: 'Dansk',
|
|
8047
|
+
englishName: 'Danish',
|
|
8048
|
+
flagIcon: '/Assets/country-flags/denmark.svg',
|
|
8049
|
+
},
|
|
8050
|
+
{
|
|
8051
|
+
code: 'en',
|
|
8052
|
+
nativeName: 'English',
|
|
8053
|
+
englishName: 'English',
|
|
8054
|
+
flagIcon: '/Assets/country-flags/united kingdom.svg',
|
|
8055
|
+
},
|
|
8056
|
+
{
|
|
8057
|
+
code: 'sv',
|
|
8058
|
+
nativeName: 'Svenska',
|
|
8059
|
+
englishName: 'Swedish',
|
|
8060
|
+
flagIcon: '/Assets/country-flags/sweden.svg',
|
|
8061
|
+
},
|
|
8062
|
+
{
|
|
8063
|
+
code: 'no',
|
|
8064
|
+
nativeName: 'Norsk',
|
|
8065
|
+
englishName: 'Norwegian',
|
|
8066
|
+
flagIcon: '/Assets/country-flags/norway.svg',
|
|
8067
|
+
},
|
|
8068
|
+
{
|
|
8069
|
+
code: 'de',
|
|
8070
|
+
nativeName: 'Deutsch',
|
|
8071
|
+
englishName: 'German',
|
|
8072
|
+
flagIcon: '/Assets/country-flags/germany.svg',
|
|
8073
|
+
},
|
|
8074
|
+
],
|
|
8041
8075
|
},
|
|
8042
8076
|
breakpoints: [0, 1],
|
|
8043
8077
|
initialBreakpoint: 1,
|
|
8044
8078
|
handle: true,
|
|
8045
|
-
cssClass: ['ds-bottom-sheet', 'auto-height']
|
|
8079
|
+
cssClass: ['ds-bottom-sheet', 'auto-height'],
|
|
8046
8080
|
});
|
|
8047
8081
|
await sheet.present();
|
|
8048
8082
|
const result = await sheet.onWillDismiss();
|
|
@@ -8053,34 +8087,35 @@ class DsMobileTabBarComponent {
|
|
|
8053
8087
|
}
|
|
8054
8088
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DsMobileTabBarComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8055
8089
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: DsMobileTabBarComponent, isStandalone: true, selector: "ds-mobile-tab-bar", inputs: { tabs: "tabs", avatarType: "avatarType", avatarInitials: "avatarInitials", avatarSrc: "avatarSrc", avatarIconName: "avatarIconName", profileMenuItems: "profileMenuItems" }, outputs: { avatarClick: "avatarClick", profileActionSelected: "profileActionSelected" }, ngImport: i0, template: `
|
|
8056
|
-
<ion-tab-bar
|
|
8057
|
-
[attr.slot]="isDesktop() ? 'top' : 'bottom'"
|
|
8090
|
+
<ion-tab-bar
|
|
8091
|
+
[attr.slot]="isDesktop() ? 'top' : 'bottom'"
|
|
8058
8092
|
class="ds-tab-bar"
|
|
8059
|
-
[class.ds-tab-bar--desktop]="isDesktop()"
|
|
8060
|
-
|
|
8093
|
+
[class.ds-tab-bar--desktop]="isDesktop()"
|
|
8094
|
+
>
|
|
8061
8095
|
<!-- Logo (desktop only, positioned via CSS) -->
|
|
8062
8096
|
<div class="ds-tab-bar__logo">
|
|
8063
8097
|
<ds-logo variant="mark" size="lg" />
|
|
8064
8098
|
</div>
|
|
8065
|
-
|
|
8099
|
+
|
|
8066
8100
|
<!-- Tab buttons container -->
|
|
8067
8101
|
<div class="ds-tab-bar__tabs" *ngIf="tabs">
|
|
8068
|
-
<ion-tab-button
|
|
8102
|
+
<ion-tab-button
|
|
8069
8103
|
*ngFor="let tab of tabs; trackBy: trackByTabId"
|
|
8070
8104
|
[tab]="tab.route"
|
|
8071
8105
|
[attr.data-icon]="tab.icon"
|
|
8072
8106
|
[attr.data-icon-active]="tab.iconActive"
|
|
8073
8107
|
[attr.aria-label]="tab.label"
|
|
8074
8108
|
class="ds-tab-button ion-activatable"
|
|
8075
|
-
[class.tab-selected]="isTabActive(tab.route)"
|
|
8109
|
+
[class.tab-selected]="isTabActive(tab.route)"
|
|
8110
|
+
>
|
|
8076
8111
|
<div class="tab-icon-ripple"></div>
|
|
8077
8112
|
<div class="tab-icon-wrapper">
|
|
8078
|
-
<ds-icon
|
|
8113
|
+
<ds-icon
|
|
8079
8114
|
[name]="tab.icon"
|
|
8080
8115
|
[size]="isDesktop() ? '20px' : '24px'"
|
|
8081
8116
|
class="tab-icon-inactive"
|
|
8082
8117
|
/>
|
|
8083
|
-
<ds-icon
|
|
8118
|
+
<ds-icon
|
|
8084
8119
|
[name]="tab.iconActive"
|
|
8085
8120
|
[size]="isDesktop() ? '20px' : '24px'"
|
|
8086
8121
|
class="tab-icon-active"
|
|
@@ -8089,7 +8124,7 @@ class DsMobileTabBarComponent {
|
|
|
8089
8124
|
<ion-label [attr.aria-hidden]="true">{{ tab.label }}</ion-label>
|
|
8090
8125
|
</ion-tab-button>
|
|
8091
8126
|
</div>
|
|
8092
|
-
|
|
8127
|
+
|
|
8093
8128
|
<!-- Avatar (desktop only, positioned via CSS) -->
|
|
8094
8129
|
<div class="ds-tab-bar__actions">
|
|
8095
8130
|
<ds-avatar
|
|
@@ -8113,36 +8148,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
8113
8148
|
IonLabel,
|
|
8114
8149
|
DsIconComponent,
|
|
8115
8150
|
DsAvatarComponent,
|
|
8116
|
-
DsLogoComponent
|
|
8151
|
+
DsLogoComponent,
|
|
8117
8152
|
], template: `
|
|
8118
|
-
<ion-tab-bar
|
|
8119
|
-
[attr.slot]="isDesktop() ? 'top' : 'bottom'"
|
|
8153
|
+
<ion-tab-bar
|
|
8154
|
+
[attr.slot]="isDesktop() ? 'top' : 'bottom'"
|
|
8120
8155
|
class="ds-tab-bar"
|
|
8121
|
-
[class.ds-tab-bar--desktop]="isDesktop()"
|
|
8122
|
-
|
|
8156
|
+
[class.ds-tab-bar--desktop]="isDesktop()"
|
|
8157
|
+
>
|
|
8123
8158
|
<!-- Logo (desktop only, positioned via CSS) -->
|
|
8124
8159
|
<div class="ds-tab-bar__logo">
|
|
8125
8160
|
<ds-logo variant="mark" size="lg" />
|
|
8126
8161
|
</div>
|
|
8127
|
-
|
|
8162
|
+
|
|
8128
8163
|
<!-- Tab buttons container -->
|
|
8129
8164
|
<div class="ds-tab-bar__tabs" *ngIf="tabs">
|
|
8130
|
-
<ion-tab-button
|
|
8165
|
+
<ion-tab-button
|
|
8131
8166
|
*ngFor="let tab of tabs; trackBy: trackByTabId"
|
|
8132
8167
|
[tab]="tab.route"
|
|
8133
8168
|
[attr.data-icon]="tab.icon"
|
|
8134
8169
|
[attr.data-icon-active]="tab.iconActive"
|
|
8135
8170
|
[attr.aria-label]="tab.label"
|
|
8136
8171
|
class="ds-tab-button ion-activatable"
|
|
8137
|
-
[class.tab-selected]="isTabActive(tab.route)"
|
|
8172
|
+
[class.tab-selected]="isTabActive(tab.route)"
|
|
8173
|
+
>
|
|
8138
8174
|
<div class="tab-icon-ripple"></div>
|
|
8139
8175
|
<div class="tab-icon-wrapper">
|
|
8140
|
-
<ds-icon
|
|
8176
|
+
<ds-icon
|
|
8141
8177
|
[name]="tab.icon"
|
|
8142
8178
|
[size]="isDesktop() ? '20px' : '24px'"
|
|
8143
8179
|
class="tab-icon-inactive"
|
|
8144
8180
|
/>
|
|
8145
|
-
<ds-icon
|
|
8181
|
+
<ds-icon
|
|
8146
8182
|
[name]="tab.iconActive"
|
|
8147
8183
|
[size]="isDesktop() ? '20px' : '24px'"
|
|
8148
8184
|
class="tab-icon-active"
|
|
@@ -8151,7 +8187,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
8151
8187
|
<ion-label [attr.aria-hidden]="true">{{ tab.label }}</ion-label>
|
|
8152
8188
|
</ion-tab-button>
|
|
8153
8189
|
</div>
|
|
8154
|
-
|
|
8190
|
+
|
|
8155
8191
|
<!-- Avatar (desktop only, positioned via CSS) -->
|
|
8156
8192
|
<div class="ds-tab-bar__actions">
|
|
8157
8193
|
<ds-avatar
|