@propbinder/mobile-design 0.0.1 → 0.0.2
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.
- package/ng-package.json +7 -0
- package/package.json +12 -39
- package/src/animations/page-transitions.ts +86 -0
- package/src/assets/fonts/Brockmann-Bold.otf +0 -0
- package/src/assets/fonts/Brockmann-BoldItalic.otf +0 -0
- package/src/assets/fonts/Brockmann-Medium.otf +0 -0
- package/src/assets/fonts/Brockmann-MediumItalic.otf +0 -0
- package/src/assets/fonts/Brockmann-Regular.otf +0 -0
- package/src/assets/fonts/Brockmann-RegularItalic.otf +0 -0
- package/src/assets/fonts/Brockmann-SemiBold.otf +0 -0
- package/src/assets/fonts/Brockmann-SemiBoldItalic.otf +0 -0
- package/src/assets/fonts/Brockmann_desktop_license.pdf +0 -0
- package/src/assets/fonts/brockmann-medium-webfont.woff2 +0 -0
- package/src/assets/fonts/brockmann-regular-webfont.woff2 +0 -0
- package/src/assets/fonts/brockmann-semibold-webfont.woff2 +0 -0
- package/src/components/action-list-item/ds-mobile-action-list-item.ts +83 -0
- package/src/components/action-list-item/index.ts +2 -0
- package/src/components/app-layout/ds-mobile-app-layout.css +343 -0
- package/src/components/app-layout/ds-mobile-app-layout.ts +271 -0
- package/src/components/app-layout/index.ts +2 -0
- package/src/components/avatar-with-badge/ds-avatar-with-badge.ts +130 -0
- package/src/components/avatar-with-badge/index.ts +2 -0
- package/src/components/bottom-sheet/ds-mobile-actions-bottom-sheet.ts +273 -0
- package/src/components/bottom-sheet/ds-mobile-bottom-sheet.css +110 -0
- package/src/components/bottom-sheet/ds-mobile-bottom-sheet.service.ts +167 -0
- package/src/components/bottom-sheet/ds-mobile-post-create-bottom-sheet.ts +656 -0
- package/src/components/bottom-sheet/index.ts +3 -0
- package/src/components/comment/ds-mobile-comment.ts +516 -0
- package/src/components/comment/index.ts +2 -0
- package/src/components/contact-list-item/ds-mobile-contact-list-item.ts +182 -0
- package/src/components/contact-list-item/index.ts +2 -0
- package/src/components/content/ds-mobile-content.ts +158 -0
- package/src/components/content/index.ts +2 -0
- package/src/components/ds-mobile-tabs.css +372 -0
- package/src/components/ds-mobile-tabs.ts +217 -0
- package/src/components/file-attachment/ds-mobile-file-attachment.ts +164 -0
- package/src/components/file-attachment/index.ts +2 -0
- package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.service.ts +98 -0
- package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.ts +514 -0
- package/src/components/handbook-detail-modal/index.ts +3 -0
- package/src/components/handbook-folder/ds-mobile-handbook-folder-mini.ts +130 -0
- package/src/components/handbook-folder/ds-mobile-handbook-folder.ts +444 -0
- package/src/components/handbook-folder/index.ts +4 -0
- package/src/components/header-content/ds-mobile-header-content.ts +211 -0
- package/src/components/header-content/index.ts +2 -0
- package/src/components/index.ts +45 -0
- package/src/components/inline-photo/ds-mobile-inline-photo.ts +269 -0
- package/src/components/inline-photo/index.ts +1 -0
- package/src/components/interactive-list-item-inquiry/ds-mobile-interactive-list-item-inquiry.css +60 -0
- package/src/components/interactive-list-item-inquiry/ds-mobile-interactive-list-item-inquiry.ts +280 -0
- package/src/components/interactive-list-item-inquiry/index.ts +2 -0
- package/src/components/interactive-list-item-message/ds-mobile-interactive-list-item-message.ts +197 -0
- package/src/components/interactive-list-item-message/index.ts +2 -0
- package/src/components/interactive-list-item-post/ds-mobile-interactive-list-item-post.css +70 -0
- package/src/components/interactive-list-item-post/ds-mobile-interactive-list-item-post.ts +594 -0
- package/src/components/interactive-list-item-post/ds-mobile-post-pdf-attachment.ts +124 -0
- package/src/components/interactive-list-item-post/index.ts +13 -0
- package/src/components/lightbox/ds-mobile-lightbox-footer.ts +331 -0
- package/src/components/lightbox/ds-mobile-lightbox-header.ts +173 -0
- package/src/components/lightbox/ds-mobile-lightbox-image.ts +464 -0
- package/src/components/lightbox/ds-mobile-lightbox-pdf.css +375 -0
- package/src/components/lightbox/ds-mobile-lightbox-pdf.ts +374 -0
- package/src/components/lightbox/ds-mobile-lightbox.css +587 -0
- package/src/components/lightbox/ds-mobile-lightbox.service.ts +293 -0
- package/src/components/lightbox/ds-mobile-lightbox.ts +529 -0
- package/src/components/lightbox/index.ts +22 -0
- package/src/components/list-item/ds-mobile-list-item.ts +499 -0
- package/src/components/list-item/index.ts +2 -0
- package/src/components/list-item-static/ds-mobile-list-item-static.ts +133 -0
- package/src/components/list-item-static/index.ts +2 -0
- package/src/components/logo/ds-logo.ts +85 -0
- package/src/components/logo/index.ts +2 -0
- package/src/components/modal/ds-mobile-modal.css +163 -0
- package/src/components/modal/ds-mobile-modal.service.ts +329 -0
- package/src/components/modal/index.ts +8 -0
- package/src/components/page-details/ds-mobile-page-details.css +285 -0
- package/src/components/page-details/ds-mobile-page-details.ts +128 -0
- package/src/components/page-details/index.ts +2 -0
- package/src/components/page-main/ds-mobile-page-main.css +346 -0
- package/src/components/page-main/ds-mobile-page-main.ts +331 -0
- package/src/components/page-main/index.ts +2 -0
- package/src/components/post-card/ds-mobile-post-card.ts +685 -0
- package/src/components/post-card/ds-mobile-post-pdf-attachment.ts +124 -0
- package/src/components/post-card/index.ts +11 -0
- package/src/components/post-composer/ds-mobile-post-composer.ts +140 -0
- package/src/components/post-composer/index.ts +2 -0
- package/src/components/post-detail-modal/ds-mobile-post-detail-modal.service.ts +104 -0
- package/src/components/post-detail-modal/ds-mobile-post-detail-modal.ts +1273 -0
- package/src/components/post-detail-modal/index.ts +9 -0
- package/src/components/shared/directives/index.ts +2 -0
- package/src/components/shared/directives/long-press.directive.ts +208 -0
- package/src/components/shared/index.ts +3 -0
- package/src/components/shared/mobile-common.css +94 -0
- package/src/components/shared/mobile-page-base.css +315 -0
- package/src/components/shared/mobile-page-base.ts +70 -0
- package/src/components/swiper/ds-mobile-swiper.ts +123 -0
- package/src/components/swiper/index.ts +2 -0
- package/src/components/tab-bar/ds-mobile-tab-bar.ts +132 -0
- package/src/components/tab-bar/index.ts +2 -0
- package/src/components/tabs/ds-mobile-tabs.css +405 -0
- package/src/components/tabs/ds-mobile-tabs.ts +204 -0
- package/src/components/tabs/index.ts +2 -0
- package/src/pages/community.page.ts +768 -0
- package/src/pages/handbook.page.ts +298 -0
- package/src/pages/home.page.ts +192 -0
- package/src/pages/index.ts +9 -0
- package/src/pages/inquiries.example.ts +212 -0
- package/src/pages/inquiry-detail.example.css +434 -0
- package/src/pages/inquiry-detail.example.ts +416 -0
- package/src/pages/mobile-tabs-example.component.ts +146 -0
- package/src/pages/post-create.page.ts +311 -0
- package/src/pages/post-detail.page.ts +295 -0
- package/src/pages/whitelabel-demo.page.ts +548 -0
- package/src/public-api.ts +5 -0
- package/src/services/user.service.ts +35 -0
- package/src/services/whitelabel.service.ts +171 -0
- package/src/styles/ionic.css +673 -0
- package/tsconfig.lib.json +17 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +13 -0
- package/fesm2022/propbinder-mobile-design.mjs +0 -8294
- package/fesm2022/propbinder-mobile-design.mjs.map +0 -1
- package/index.d.ts +0 -2860
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
import { Component, signal, computed, ElementRef, ViewChild, AfterViewInit, inject } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { NavController, Platform } from '@ionic/angular/standalone';
|
|
4
|
+
import {
|
|
5
|
+
IonHeader,
|
|
6
|
+
IonToolbar,
|
|
7
|
+
IonTitle,
|
|
8
|
+
IonContent,
|
|
9
|
+
IonRefresher,
|
|
10
|
+
IonRefresherContent
|
|
11
|
+
} from '@ionic/angular/standalone';
|
|
12
|
+
import { DsIconComponent, DsAvatarComponent } from '@propbinder/design-system';
|
|
13
|
+
import { DsMobileTabBarComponent, type TabItem } from '../components/tab-bar';
|
|
14
|
+
import { DsMobileListItemStaticComponent } from '../components/list-item-static';
|
|
15
|
+
import { DsMobileInteractiveListItemMessageComponent } from '../components/interactive-list-item-message';
|
|
16
|
+
import { UserService } from '../services/user.service';
|
|
17
|
+
import { MobilePageBase } from '../components/shared/mobile-page-base';
|
|
18
|
+
import { customBackTransition } from '../animations/page-transitions';
|
|
19
|
+
|
|
20
|
+
interface ActivityItem {
|
|
21
|
+
id: string;
|
|
22
|
+
type: 'assignment' | 'status_change' | 'creation';
|
|
23
|
+
actor?: string;
|
|
24
|
+
actorInitials?: string;
|
|
25
|
+
title: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
timestamp: string;
|
|
28
|
+
date: string;
|
|
29
|
+
iconName: string;
|
|
30
|
+
iconBgColor?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface MessageThread {
|
|
34
|
+
id: string;
|
|
35
|
+
senderName: string;
|
|
36
|
+
senderAvatar: string;
|
|
37
|
+
senderInitials: string;
|
|
38
|
+
message: string;
|
|
39
|
+
role: string;
|
|
40
|
+
timestamp: string;
|
|
41
|
+
unread: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@Component({
|
|
45
|
+
selector: 'app-mobile-inquiry-detail-page',
|
|
46
|
+
standalone: true,
|
|
47
|
+
imports: [
|
|
48
|
+
CommonModule,
|
|
49
|
+
IonHeader,
|
|
50
|
+
IonToolbar,
|
|
51
|
+
IonTitle,
|
|
52
|
+
IonContent,
|
|
53
|
+
IonRefresher,
|
|
54
|
+
IonRefresherContent,
|
|
55
|
+
DsIconComponent,
|
|
56
|
+
DsAvatarComponent,
|
|
57
|
+
DsMobileTabBarComponent,
|
|
58
|
+
DsMobileListItemStaticComponent,
|
|
59
|
+
DsMobileInteractiveListItemMessageComponent
|
|
60
|
+
],
|
|
61
|
+
host: {
|
|
62
|
+
class: 'ion-page'
|
|
63
|
+
},
|
|
64
|
+
styleUrls: ['./inquiry-detail.example.css'],
|
|
65
|
+
template: `
|
|
66
|
+
<!-- Fixed header at top -->
|
|
67
|
+
<ion-header>
|
|
68
|
+
<ion-toolbar>
|
|
69
|
+
<div class="header-detail">
|
|
70
|
+
<!-- Back Button -->
|
|
71
|
+
<button class="back-button" (click)="goBack()" [attr.aria-label]="'Go back'">
|
|
72
|
+
<ds-icon name="remixArrowLeftSLine" size="24px" color="white" />
|
|
73
|
+
</button>
|
|
74
|
+
|
|
75
|
+
<!-- Title - fades in on scroll -->
|
|
76
|
+
<ion-title class="header-detail__title">{{ inquiryTitle }}</ion-title>
|
|
77
|
+
</div>
|
|
78
|
+
</ion-toolbar>
|
|
79
|
+
</ion-header>
|
|
80
|
+
|
|
81
|
+
<!-- Content with expandable header -->
|
|
82
|
+
<ion-content [scrollEvents]="true" (ionScroll)="handleScroll($event)">
|
|
83
|
+
<!-- Pull to refresh (only on native iOS/Android) -->
|
|
84
|
+
@if (isNativePlatform()) {
|
|
85
|
+
<ion-refresher
|
|
86
|
+
slot="fixed"
|
|
87
|
+
(ionRefresh)="handleRefresh($event)"
|
|
88
|
+
[pullFactor]="0.4"
|
|
89
|
+
[pullMin]="80"
|
|
90
|
+
[pullMax]="240"
|
|
91
|
+
closeDuration="600ms">
|
|
92
|
+
<ion-refresher-content
|
|
93
|
+
pullingIcon="chevron-down-circle-outline"
|
|
94
|
+
refreshingSpinner="lines">
|
|
95
|
+
</ion-refresher-content>
|
|
96
|
+
</ion-refresher>
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
<!-- Expandable header section (purple background) -->
|
|
100
|
+
<div class="header-expandable">
|
|
101
|
+
<div class="header-expandable-inner">
|
|
102
|
+
<div class="header-expandable__text">
|
|
103
|
+
<h1 class="header-expandable__title">{{ inquiryTitle }}</h1>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<!-- Tabs in header -->
|
|
107
|
+
<ds-mobile-tab-bar
|
|
108
|
+
[tabs]="tabItems"
|
|
109
|
+
[activeTab]="activeTab()"
|
|
110
|
+
(tabChange)="setActiveTab($event)">
|
|
111
|
+
</ds-mobile-tab-bar>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<!-- Content wrapper -->
|
|
116
|
+
<div class="content-wrapper">
|
|
117
|
+
<div class="content-inner">
|
|
118
|
+
<!-- Activity Tab Content -->
|
|
119
|
+
@if (activeTab() === 'activity') {
|
|
120
|
+
<div class="activity-list">
|
|
121
|
+
@for (activity of activities; track activity.id) {
|
|
122
|
+
<div class="activity-item">
|
|
123
|
+
@if (activity.actor) {
|
|
124
|
+
<!-- Avatar with badge for actor activities -->
|
|
125
|
+
<div class="avatar-wrapper">
|
|
126
|
+
<ds-avatar
|
|
127
|
+
[type]="'initials'"
|
|
128
|
+
[initials]="activity.actorInitials || ''"
|
|
129
|
+
size="md" />
|
|
130
|
+
|
|
131
|
+
<div class="avatar-badge">
|
|
132
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 32" fill="none">
|
|
133
|
+
<path d="M33.9862 5.51709H23.1724V8.82743H26.0413C26.2841 8.82743 26.4827 9.02606 26.4827 9.26881V12.7998C26.4827 13.0426 26.2841 13.2412 26.0413 13.2412H23.1724V14.3447H26.0413C26.2841 14.3447 26.4827 14.5433 26.4827 14.7861V18.3171C26.4827 18.5598 26.2841 18.7585 26.0413 18.7585H23.1724V19.8619H26.0413C26.2841 19.8619 26.4827 20.0605 26.4827 20.3033V23.8343C26.4827 24.0771 26.2841 24.2757 26.0413 24.2757H23.1724V26.2619C23.1724 26.7496 23.0267 27.2043 22.7773 27.5861H27.5862L32 31.9999V27.5861H33.9862C34.7167 27.5861 35.3103 26.9924 35.3103 26.2619V6.84123C35.3103 6.11075 34.7167 5.51709 33.9862 5.51709ZM32 23.8343C32 24.0771 31.8013 24.2757 31.5586 24.2757H28.0276C27.7848 24.2757 27.5862 24.0771 27.5862 23.8343V20.3033C27.5862 20.0605 27.7848 19.8619 28.0276 19.8619H31.5586C31.8013 19.8619 32 20.0605 32 20.3033V23.8343ZM32 18.3171C32 18.5598 31.8013 18.7585 31.5586 18.7585H28.0276C27.7848 18.7585 27.5862 18.5598 27.5862 18.3171V14.7861C27.5862 14.5433 27.7848 14.3447 28.0276 14.3447H31.5586C31.8013 14.3447 32 14.5433 32 14.7861V18.3171ZM32 12.7998C32 13.0426 31.8013 13.2412 31.5586 13.2412H28.0276C27.7848 13.2412 27.5862 13.0426 27.5862 12.7998V9.26881C27.5862 9.02606 27.7848 8.82743 28.0276 8.82743H31.5586C31.8013 8.82743 32 9.02606 32 9.26881V12.7998Z" fill="white"/>
|
|
134
|
+
<path d="M20.7448 0H1.32414C0.593655 0 0 0.593655 0 1.32414V26.2621C0 26.9926 0.593655 27.5862 1.32414 27.5862H3.31034V32L7.72414 27.5862H20.7448C21.4753 27.5862 22.069 26.9926 22.069 26.2621V1.32414C22.069 0.593655 21.4753 0 20.7448 0ZM7.72414 23.8345C7.72414 24.0772 7.52552 24.2759 7.28276 24.2759H3.75172C3.50897 24.2759 3.31034 24.0772 3.31034 23.8345V20.3034C3.31034 20.0607 3.50897 19.8621 3.75172 19.8621H7.28276C7.52552 19.8621 7.72414 20.0607 7.72414 20.3034V23.8345ZM7.72414 18.3172C7.72414 18.56 7.52552 18.7586 7.28276 18.7586H3.75172C3.50897 18.7586 3.31034 18.56 3.31034 18.3172V14.7862C3.31034 14.5434 3.50897 14.3448 3.75172 14.3448H7.28276C7.52552 14.3448 7.72414 14.5434 7.72414 14.7862V18.3172ZM7.72414 12.8C7.72414 13.0428 7.52552 13.2414 7.28276 13.2414H3.75172C3.50897 13.2414 3.31034 13.0428 3.31034 12.8V9.26897C3.31034 9.02621 3.50897 8.82759 3.75172 8.82759H7.28276C7.52552 8.82759 7.72414 9.02621 7.72414 9.26897V12.8ZM7.72414 7.28276C7.72414 7.52552 7.52552 7.72414 7.28276 7.72414H3.75172C3.50897 7.72414 3.31034 7.52552 3.31034 7.28276V3.75172C3.31034 3.50897 3.50897 3.31034 3.75172 3.31034H7.28276C7.52552 3.31034 7.72414 3.50897 7.72414 3.75172V7.28276ZM13.2414 23.8345C13.2414 24.0772 13.0428 24.2759 12.8 24.2759H9.26897C9.02621 24.2759 8.82759 24.0772 8.82759 23.8345V20.3034C8.82759 20.0607 9.02621 19.8621 9.26897 19.8621H12.8C13.0428 19.8621 13.2414 20.0607 13.2414 20.3034V23.8345ZM13.2414 18.3172C13.2414 18.56 13.0428 18.7586 12.8 18.7586H9.26897C9.02621 18.7586 8.82759 18.56 8.82759 18.3172V14.7862C8.82759 14.5434 9.02621 14.3448 9.26897 14.3448H12.8C13.0428 14.3448 13.2414 14.5434 13.2414 14.7862V18.3172ZM13.2414 12.8C13.2414 13.0428 13.0428 13.2414 12.8 13.2414H9.26897C9.02621 13.2414 8.82759 13.0428 8.82759 12.8V9.26897C8.82759 9.02621 9.02621 8.82759 9.26897 8.82759H12.8C13.0428 8.82759 13.2414 9.02621 13.2414 9.26897V12.8ZM13.2414 6.84138V7.28276C13.2414 7.52552 13.0428 7.72414 12.8 7.72414H9.26897C9.02621 7.72414 8.82759 7.52552 8.82759 7.28276V3.75172C8.82759 3.50897 9.02621 3.31034 9.26897 3.31034H12.8C13.0428 3.31034 13.2414 3.50897 13.2414 3.75172V6.84138ZM18.7586 23.8345C18.7586 24.0772 18.56 24.2759 18.3172 24.2759H14.7862C14.5434 24.2759 14.3448 24.0772 14.3448 23.8345V20.3034C14.3448 20.0607 14.5434 19.8621 14.7862 19.8621H18.3172C18.56 19.8621 18.7586 20.0607 18.7586 20.3034V23.8345ZM18.7586 18.3172C18.7586 18.56 18.56 18.7586 18.3172 18.7586H14.7862C14.5434 18.7586 14.3448 18.56 14.3448 18.3172V14.7862C14.3448 14.5434 14.5434 14.3448 14.7862 14.3448H18.3172C18.56 14.3448 18.7586 14.5434 18.7586 14.7862V18.3172ZM18.7586 12.8C18.7586 13.0428 18.56 13.2414 18.3172 13.2414H14.7862C14.5434 13.2414 14.3448 13.0428 14.3448 12.8V9.26897C14.3448 9.02621 14.5434 8.82759 14.7862 8.82759H18.3172C18.56 8.82759 18.7586 9.02621 18.7586 9.26897V12.8ZM18.7586 5.51724V7.28276C18.7586 7.52552 18.56 7.72414 18.3172 7.72414H14.7862C14.5434 7.72414 14.3448 7.52552 14.3448 7.28276V3.75172C14.3448 3.50897 14.5434 3.31034 14.7862 3.31034H18.3172C18.56 3.31034 18.7586 3.50897 18.7586 3.75172V5.51724Z" fill="white"/>
|
|
135
|
+
</svg>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
} @else {
|
|
139
|
+
<!-- Icon wrapper for non-actor activities -->
|
|
140
|
+
<div class="activity-icon-wrapper">
|
|
141
|
+
<ds-icon
|
|
142
|
+
[name]="activity.iconName"
|
|
143
|
+
size="18px"
|
|
144
|
+
color="secondary" />
|
|
145
|
+
</div>
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
<div class="activity-content">
|
|
149
|
+
<p class="activity-title">
|
|
150
|
+
@if (activity.actor) {
|
|
151
|
+
<span class="actor-name">{{ activity.actor }}</span>
|
|
152
|
+
<span class="activity-text"> {{ activity.title }}</span>
|
|
153
|
+
} @else {
|
|
154
|
+
<span class="actor-name">{{ activity.title }}</span>
|
|
155
|
+
}
|
|
156
|
+
</p>
|
|
157
|
+
@if (activity.description) {
|
|
158
|
+
<p class="activity-description">{{ activity.description }}</p>
|
|
159
|
+
}
|
|
160
|
+
<div class="activity-timestamp">
|
|
161
|
+
<ds-icon name="remixCalendarLine" size="12px" color="--color-text-tertiary" />
|
|
162
|
+
<span>{{ activity.date }}</span>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
}
|
|
167
|
+
</div>
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
<!-- Messages Tab Content -->
|
|
171
|
+
@if (activeTab() === 'messages') {
|
|
172
|
+
<div class="messages-list">
|
|
173
|
+
@for (message of messageThreads; track message.id) {
|
|
174
|
+
<ds-mobile-interactive-list-item-message
|
|
175
|
+
[senderName]="message.senderName"
|
|
176
|
+
[senderRole]="message.role"
|
|
177
|
+
[message]="message.message"
|
|
178
|
+
[avatarInitials]="message.senderInitials"
|
|
179
|
+
[unread]="message.unread"
|
|
180
|
+
(messageClick)="openMessage(message.id)">
|
|
181
|
+
</ds-mobile-interactive-list-item-message>
|
|
182
|
+
}
|
|
183
|
+
</div>
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
<!-- Details Tab Content -->
|
|
187
|
+
@if (activeTab() === 'details') {
|
|
188
|
+
<div class="details-list">
|
|
189
|
+
<!-- Assignee -->
|
|
190
|
+
<ds-mobile-list-item-static [leadingSize]="'32px'">
|
|
191
|
+
<div content-leading>
|
|
192
|
+
<ds-avatar
|
|
193
|
+
[size]="'sm'"
|
|
194
|
+
[type]="'initials'"
|
|
195
|
+
[initials]="'R'" />
|
|
196
|
+
</div>
|
|
197
|
+
<div content-main>
|
|
198
|
+
<div class="detail-label">Sagsbehandler</div>
|
|
199
|
+
<div class="detail-value">Ricki Meihlen</div>
|
|
200
|
+
</div>
|
|
201
|
+
</ds-mobile-list-item-static>
|
|
202
|
+
|
|
203
|
+
<!-- Technician -->
|
|
204
|
+
<ds-mobile-list-item-static [leadingSize]="'32px'">
|
|
205
|
+
<div content-leading>
|
|
206
|
+
<ds-avatar
|
|
207
|
+
[size]="'sm'"
|
|
208
|
+
[type]="'initials'"
|
|
209
|
+
[initials]="'M'" />
|
|
210
|
+
</div>
|
|
211
|
+
<div content-main>
|
|
212
|
+
<div class="detail-label">Tekniker</div>
|
|
213
|
+
<div class="detail-value">Martin Smith</div>
|
|
214
|
+
</div>
|
|
215
|
+
</ds-mobile-list-item-static>
|
|
216
|
+
|
|
217
|
+
<!-- Title -->
|
|
218
|
+
<ds-mobile-list-item-static [leadingSize]="'32px'">
|
|
219
|
+
<div content-leading>
|
|
220
|
+
<ds-icon name="remixTextBlock" size="20px" color="tertiary" />
|
|
221
|
+
</div>
|
|
222
|
+
<div content-main>
|
|
223
|
+
<div class="detail-value">{{ inquiryTitle }}</div>
|
|
224
|
+
</div>
|
|
225
|
+
</ds-mobile-list-item-static>
|
|
226
|
+
|
|
227
|
+
<!-- Description -->
|
|
228
|
+
<ds-mobile-list-item-static [leadingSize]="'32px'">
|
|
229
|
+
<div content-leading>
|
|
230
|
+
<ds-icon name="remixAlignLeft" size="20px" color="tertiary" />
|
|
231
|
+
</div>
|
|
232
|
+
<div content-main>
|
|
233
|
+
<div class="detail-value description-text">
|
|
234
|
+
I de sidste tre dage har vi oplevet vedvarende problemer med tørretumbleren i vores lejlighed. På trods af at vi følger betjeningsvejledningen, fejler maskinen konsekvent i at fuldføre sine tørrecyklusser.
|
|
235
|
+
</div>
|
|
236
|
+
<div class="detail-tag">Husholdningsapparater</div>
|
|
237
|
+
</div>
|
|
238
|
+
</ds-mobile-list-item-static>
|
|
239
|
+
|
|
240
|
+
<!-- Photos -->
|
|
241
|
+
<ds-mobile-list-item-static [leadingSize]="'32px'">
|
|
242
|
+
<div content-leading>
|
|
243
|
+
<ds-icon name="remixCameraLine" size="20px" color="tertiary" />
|
|
244
|
+
</div>
|
|
245
|
+
<div content-main>
|
|
246
|
+
<div class="photo-grid">
|
|
247
|
+
<button class="photo-add">
|
|
248
|
+
<ds-icon name="remixAddLine" size="20px" color="tertiary" />
|
|
249
|
+
</button>
|
|
250
|
+
<!-- Placeholder photos -->
|
|
251
|
+
<div class="photo-item"></div>
|
|
252
|
+
<div class="photo-item"></div>
|
|
253
|
+
<div class="photo-item"></div>
|
|
254
|
+
<div class="photo-item"></div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
</ds-mobile-list-item-static>
|
|
258
|
+
</div>
|
|
259
|
+
}
|
|
260
|
+
</div>
|
|
261
|
+
</div>
|
|
262
|
+
</ion-content>
|
|
263
|
+
`
|
|
264
|
+
})
|
|
265
|
+
export class MobileInquiryDetailPageComponent extends MobilePageBase implements AfterViewInit {
|
|
266
|
+
@ViewChild(IonContent) ionContent?: IonContent;
|
|
267
|
+
|
|
268
|
+
// Platform detection
|
|
269
|
+
private platform = inject(Platform);
|
|
270
|
+
|
|
271
|
+
// Computed property to check if running on native platform
|
|
272
|
+
isNativePlatform = computed(() =>
|
|
273
|
+
this.platform.is('ios') ||
|
|
274
|
+
this.platform.is('android') ||
|
|
275
|
+
this.platform.is('capacitor')
|
|
276
|
+
);
|
|
277
|
+
|
|
278
|
+
inquiryTitle = 'Tørretumbler virker ikke';
|
|
279
|
+
activeTab = signal<string>('activity');
|
|
280
|
+
|
|
281
|
+
tabItems: TabItem[] = [
|
|
282
|
+
{ id: 'activity', label: 'Aktivitet' },
|
|
283
|
+
{ id: 'messages', label: 'Beskeder', badge: 0 },
|
|
284
|
+
{ id: 'details', label: 'Detaljer' }
|
|
285
|
+
];
|
|
286
|
+
|
|
287
|
+
activities: ActivityItem[] = [
|
|
288
|
+
{
|
|
289
|
+
id: '1',
|
|
290
|
+
type: 'assignment',
|
|
291
|
+
actor: 'Martin Smith',
|
|
292
|
+
actorInitials: 'MS',
|
|
293
|
+
title: 'er blevet tildelt som din dedikerede tekniker.',
|
|
294
|
+
timestamp: '2 dage siden',
|
|
295
|
+
date: '28. feb 2025',
|
|
296
|
+
iconName: 'remixUserAddLine'
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
id: '2',
|
|
300
|
+
type: 'assignment',
|
|
301
|
+
actor: 'Ricki Meihlen',
|
|
302
|
+
actorInitials: 'RM',
|
|
303
|
+
title: 'er blevet tildelt til at håndtere din henvendelse.',
|
|
304
|
+
timestamp: '8 dage siden',
|
|
305
|
+
date: '22. feb 2025',
|
|
306
|
+
iconName: 'remixUserLine'
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
id: '3',
|
|
310
|
+
type: 'creation',
|
|
311
|
+
title: 'Henvendelse oprettet',
|
|
312
|
+
timestamp: '8 dage siden',
|
|
313
|
+
date: '22. feb 2025',
|
|
314
|
+
iconName: 'remixAddCircleLine'
|
|
315
|
+
}
|
|
316
|
+
];
|
|
317
|
+
|
|
318
|
+
messageThreads: MessageThread[] = [
|
|
319
|
+
{
|
|
320
|
+
id: '1',
|
|
321
|
+
senderName: 'Ove Hindborg',
|
|
322
|
+
senderAvatar: '',
|
|
323
|
+
senderInitials: 'OH',
|
|
324
|
+
message: 'Dejligt at høre! Jeg venter på din teknikerbesøg tidsplan.',
|
|
325
|
+
role: 'Sagsbehandler',
|
|
326
|
+
timestamp: '2t siden',
|
|
327
|
+
unread: true
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
id: '2',
|
|
331
|
+
senderName: 'Martin Smith',
|
|
332
|
+
senderAvatar: '',
|
|
333
|
+
senderInitials: 'MS',
|
|
334
|
+
message: 'Dejligt at høre! Jeg venter på din teknikerbesøg tidsplan.',
|
|
335
|
+
role: 'Tekniker',
|
|
336
|
+
timestamp: '4t siden',
|
|
337
|
+
unread: true
|
|
338
|
+
}
|
|
339
|
+
];
|
|
340
|
+
|
|
341
|
+
unreadMessagesCount = computed(() => {
|
|
342
|
+
const count = this.messageThreads.filter(m => m.unread).length;
|
|
343
|
+
// Update badge in tab items
|
|
344
|
+
const messagesTab = this.tabItems.find(t => t.id === 'messages');
|
|
345
|
+
if (messagesTab) {
|
|
346
|
+
messagesTab.badge = count;
|
|
347
|
+
}
|
|
348
|
+
return count;
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
constructor(
|
|
352
|
+
public userService: UserService,
|
|
353
|
+
private navCtrl: NavController,
|
|
354
|
+
private elementRef: ElementRef
|
|
355
|
+
) {
|
|
356
|
+
super();
|
|
357
|
+
// Trigger initial badge update
|
|
358
|
+
this.unreadMessagesCount();
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
ngAfterViewInit(): void {
|
|
362
|
+
// Initial setup if needed
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
setActiveTab(tabId: string): void {
|
|
366
|
+
this.activeTab.set(tabId);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
goBack(): void {
|
|
370
|
+
this.navCtrl.back({ animation: customBackTransition });
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
handleScroll(event: any): void {
|
|
374
|
+
const scrollTop = event.detail.scrollTop;
|
|
375
|
+
const threshold = 160;
|
|
376
|
+
const fadeDistance = 200;
|
|
377
|
+
const header = this.elementRef.nativeElement.querySelector('ion-header:not([collapse])');
|
|
378
|
+
const headerExpandable = this.elementRef.nativeElement.querySelector('.header-expandable');
|
|
379
|
+
|
|
380
|
+
// Show title in fixed header when scrolled past threshold
|
|
381
|
+
if (scrollTop > threshold) {
|
|
382
|
+
header?.classList.add('header-scrolled');
|
|
383
|
+
} else {
|
|
384
|
+
header?.classList.remove('header-scrolled');
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// Fade out header-expandable content based on scroll
|
|
388
|
+
if (headerExpandable) {
|
|
389
|
+
const fadeProgress = Math.min(scrollTop / fadeDistance, 1);
|
|
390
|
+
|
|
391
|
+
// Calculate opacity (1 to 0)
|
|
392
|
+
const opacity = 1 - fadeProgress;
|
|
393
|
+
|
|
394
|
+
// Calculate transform (0px to -20px upward)
|
|
395
|
+
const translateY = fadeProgress * -20;
|
|
396
|
+
|
|
397
|
+
// Apply styles
|
|
398
|
+
headerExpandable.style.opacity = opacity.toString();
|
|
399
|
+
headerExpandable.style.transform = `translateY(${translateY}px)`;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
handleRefresh(event: any): void {
|
|
404
|
+
console.log('Pull-to-refresh triggered');
|
|
405
|
+
setTimeout(() => {
|
|
406
|
+
console.log('Refresh complete');
|
|
407
|
+
event.target.complete();
|
|
408
|
+
}, 1000);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
openMessage(messageId: string): void {
|
|
412
|
+
console.log('Opening message:', messageId);
|
|
413
|
+
// Navigate to message thread detail
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { Component, OnInit } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { UserService } from '../services/user.service';
|
|
4
|
+
import { DsMobileTabsComponent, TabConfig } from '../components/ds-mobile-tabs';
|
|
5
|
+
import { ModalController } from '@ionic/angular/standalone';
|
|
6
|
+
import { DsMobileActionsBottomSheetComponent, ActionResult } from '../components/bottom-sheet';
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'app-mobile-tabs-example',
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [DsMobileTabsComponent],
|
|
12
|
+
styles: [`
|
|
13
|
+
:host {
|
|
14
|
+
display: block;
|
|
15
|
+
height: 100vh;
|
|
16
|
+
width: 100vw;
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
`],
|
|
20
|
+
template: `
|
|
21
|
+
<ds-mobile-tabs
|
|
22
|
+
[tabs]="tabs"
|
|
23
|
+
[avatarInitials]="userService.avatarInitials()"
|
|
24
|
+
(avatarClick)="handleAvatarClick()"
|
|
25
|
+
/>
|
|
26
|
+
`
|
|
27
|
+
})
|
|
28
|
+
export class MobileTabsExampleComponent implements OnInit {
|
|
29
|
+
constructor(
|
|
30
|
+
public userService: UserService,
|
|
31
|
+
private modalController: ModalController,
|
|
32
|
+
private router: Router
|
|
33
|
+
) {
|
|
34
|
+
console.log('MobileTabsExampleComponent constructor');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
ngOnInit() {
|
|
38
|
+
console.log('MobileTabsExampleComponent ngOnInit');
|
|
39
|
+
// Configure user avatar globally - this is now the single source of truth
|
|
40
|
+
this.userService.setAvatarInitials('LM');
|
|
41
|
+
this.userService.setAvatarType('initials');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
tabs: TabConfig[] = [
|
|
45
|
+
{
|
|
46
|
+
id: 'home',
|
|
47
|
+
label: 'Hjem',
|
|
48
|
+
route: 'home',
|
|
49
|
+
icon: 'remixHomeSmile2Line',
|
|
50
|
+
iconActive: 'remixHomeSmile2Fill'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'inquiries',
|
|
54
|
+
label: 'Henvendelser',
|
|
55
|
+
route: 'inquiries',
|
|
56
|
+
icon: 'remixFileList3Line',
|
|
57
|
+
iconActive: 'remixFileList3Fill'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'announcements',
|
|
61
|
+
label: 'Fællesskab',
|
|
62
|
+
route: 'announcements',
|
|
63
|
+
icon: 'remixCommunityLine',
|
|
64
|
+
iconActive: 'remixCommunityFill'
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'handbook',
|
|
68
|
+
label: 'Håndbog',
|
|
69
|
+
route: 'handbook',
|
|
70
|
+
icon: 'remixBook2Line',
|
|
71
|
+
iconActive: 'remixBook2Fill'
|
|
72
|
+
}
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
async handleAvatarClick(): Promise<void> {
|
|
76
|
+
console.log('Avatar clicked - opening profile bottom sheet');
|
|
77
|
+
|
|
78
|
+
const sheet = await this.modalController.create({
|
|
79
|
+
component: DsMobileActionsBottomSheetComponent,
|
|
80
|
+
componentProps: {
|
|
81
|
+
customActionGroups: [
|
|
82
|
+
{
|
|
83
|
+
actions: [
|
|
84
|
+
{
|
|
85
|
+
action: 'profile',
|
|
86
|
+
title: 'Min profil',
|
|
87
|
+
icon: 'remixUser3Line',
|
|
88
|
+
destructive: false
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
action: 'settings',
|
|
92
|
+
title: 'Indstillinger',
|
|
93
|
+
icon: 'remixSettings3Line',
|
|
94
|
+
destructive: false
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
action: 'whitelabel-demo',
|
|
98
|
+
title: 'Whitelabel Demo',
|
|
99
|
+
icon: 'remixPaletteLine',
|
|
100
|
+
destructive: false
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
actions: [
|
|
106
|
+
{
|
|
107
|
+
action: 'logout',
|
|
108
|
+
title: 'Log ud',
|
|
109
|
+
icon: 'remixLogoutBoxLine',
|
|
110
|
+
destructive: true
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
// Auto-height: no breakpoints, no handle
|
|
117
|
+
cssClass: 'ds-bottom-sheet auto-height'
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
await sheet.present();
|
|
121
|
+
|
|
122
|
+
const result = await sheet.onWillDismiss<ActionResult>();
|
|
123
|
+
if (result.data?.action) {
|
|
124
|
+
console.log('Profile action selected:', result.data.action);
|
|
125
|
+
|
|
126
|
+
switch (result.data.action) {
|
|
127
|
+
case 'logout':
|
|
128
|
+
console.log('Logging out...');
|
|
129
|
+
// TODO: Implement logout logic
|
|
130
|
+
break;
|
|
131
|
+
case 'profile':
|
|
132
|
+
console.log('Opening profile...');
|
|
133
|
+
// TODO: Navigate to profile page
|
|
134
|
+
break;
|
|
135
|
+
case 'settings':
|
|
136
|
+
console.log('Opening settings...');
|
|
137
|
+
// TODO: Navigate to settings page
|
|
138
|
+
break;
|
|
139
|
+
case 'whitelabel-demo':
|
|
140
|
+
console.log('Opening whitelabel demo...');
|
|
141
|
+
this.router.navigate(['/whitelabel-demo']);
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|