@propbinder/mobile-design 0.0.2 → 0.0.21

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.
Files changed (123) hide show
  1. package/fesm2022/propbinder-mobile-design.mjs +12596 -0
  2. package/fesm2022/propbinder-mobile-design.mjs.map +1 -0
  3. package/index.d.ts +3214 -0
  4. package/package.json +39 -12
  5. package/ng-package.json +0 -7
  6. package/src/animations/page-transitions.ts +0 -86
  7. package/src/assets/fonts/Brockmann-Bold.otf +0 -0
  8. package/src/assets/fonts/Brockmann-BoldItalic.otf +0 -0
  9. package/src/assets/fonts/Brockmann-Medium.otf +0 -0
  10. package/src/assets/fonts/Brockmann-MediumItalic.otf +0 -0
  11. package/src/assets/fonts/Brockmann-Regular.otf +0 -0
  12. package/src/assets/fonts/Brockmann-RegularItalic.otf +0 -0
  13. package/src/assets/fonts/Brockmann-SemiBold.otf +0 -0
  14. package/src/assets/fonts/Brockmann-SemiBoldItalic.otf +0 -0
  15. package/src/assets/fonts/Brockmann_desktop_license.pdf +0 -0
  16. package/src/assets/fonts/brockmann-medium-webfont.woff2 +0 -0
  17. package/src/assets/fonts/brockmann-regular-webfont.woff2 +0 -0
  18. package/src/assets/fonts/brockmann-semibold-webfont.woff2 +0 -0
  19. package/src/components/action-list-item/ds-mobile-action-list-item.ts +0 -83
  20. package/src/components/action-list-item/index.ts +0 -2
  21. package/src/components/app-layout/ds-mobile-app-layout.css +0 -343
  22. package/src/components/app-layout/ds-mobile-app-layout.ts +0 -271
  23. package/src/components/app-layout/index.ts +0 -2
  24. package/src/components/avatar-with-badge/ds-avatar-with-badge.ts +0 -130
  25. package/src/components/avatar-with-badge/index.ts +0 -2
  26. package/src/components/bottom-sheet/ds-mobile-actions-bottom-sheet.ts +0 -273
  27. package/src/components/bottom-sheet/ds-mobile-bottom-sheet.css +0 -110
  28. package/src/components/bottom-sheet/ds-mobile-bottom-sheet.service.ts +0 -167
  29. package/src/components/bottom-sheet/ds-mobile-post-create-bottom-sheet.ts +0 -656
  30. package/src/components/bottom-sheet/index.ts +0 -3
  31. package/src/components/comment/ds-mobile-comment.ts +0 -516
  32. package/src/components/comment/index.ts +0 -2
  33. package/src/components/contact-list-item/ds-mobile-contact-list-item.ts +0 -182
  34. package/src/components/contact-list-item/index.ts +0 -2
  35. package/src/components/content/ds-mobile-content.ts +0 -158
  36. package/src/components/content/index.ts +0 -2
  37. package/src/components/ds-mobile-tabs.css +0 -372
  38. package/src/components/ds-mobile-tabs.ts +0 -217
  39. package/src/components/file-attachment/ds-mobile-file-attachment.ts +0 -164
  40. package/src/components/file-attachment/index.ts +0 -2
  41. package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.service.ts +0 -98
  42. package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.ts +0 -514
  43. package/src/components/handbook-detail-modal/index.ts +0 -3
  44. package/src/components/handbook-folder/ds-mobile-handbook-folder-mini.ts +0 -130
  45. package/src/components/handbook-folder/ds-mobile-handbook-folder.ts +0 -444
  46. package/src/components/handbook-folder/index.ts +0 -4
  47. package/src/components/header-content/ds-mobile-header-content.ts +0 -211
  48. package/src/components/header-content/index.ts +0 -2
  49. package/src/components/index.ts +0 -45
  50. package/src/components/inline-photo/ds-mobile-inline-photo.ts +0 -269
  51. package/src/components/inline-photo/index.ts +0 -1
  52. package/src/components/interactive-list-item-inquiry/ds-mobile-interactive-list-item-inquiry.css +0 -60
  53. package/src/components/interactive-list-item-inquiry/ds-mobile-interactive-list-item-inquiry.ts +0 -280
  54. package/src/components/interactive-list-item-inquiry/index.ts +0 -2
  55. package/src/components/interactive-list-item-message/ds-mobile-interactive-list-item-message.ts +0 -197
  56. package/src/components/interactive-list-item-message/index.ts +0 -2
  57. package/src/components/interactive-list-item-post/ds-mobile-interactive-list-item-post.css +0 -70
  58. package/src/components/interactive-list-item-post/ds-mobile-interactive-list-item-post.ts +0 -594
  59. package/src/components/interactive-list-item-post/ds-mobile-post-pdf-attachment.ts +0 -124
  60. package/src/components/interactive-list-item-post/index.ts +0 -13
  61. package/src/components/lightbox/ds-mobile-lightbox-footer.ts +0 -331
  62. package/src/components/lightbox/ds-mobile-lightbox-header.ts +0 -173
  63. package/src/components/lightbox/ds-mobile-lightbox-image.ts +0 -464
  64. package/src/components/lightbox/ds-mobile-lightbox-pdf.css +0 -375
  65. package/src/components/lightbox/ds-mobile-lightbox-pdf.ts +0 -374
  66. package/src/components/lightbox/ds-mobile-lightbox.css +0 -587
  67. package/src/components/lightbox/ds-mobile-lightbox.service.ts +0 -293
  68. package/src/components/lightbox/ds-mobile-lightbox.ts +0 -529
  69. package/src/components/lightbox/index.ts +0 -22
  70. package/src/components/list-item/ds-mobile-list-item.ts +0 -499
  71. package/src/components/list-item/index.ts +0 -2
  72. package/src/components/list-item-static/ds-mobile-list-item-static.ts +0 -133
  73. package/src/components/list-item-static/index.ts +0 -2
  74. package/src/components/logo/ds-logo.ts +0 -85
  75. package/src/components/logo/index.ts +0 -2
  76. package/src/components/modal/ds-mobile-modal.css +0 -163
  77. package/src/components/modal/ds-mobile-modal.service.ts +0 -329
  78. package/src/components/modal/index.ts +0 -8
  79. package/src/components/page-details/ds-mobile-page-details.css +0 -285
  80. package/src/components/page-details/ds-mobile-page-details.ts +0 -128
  81. package/src/components/page-details/index.ts +0 -2
  82. package/src/components/page-main/ds-mobile-page-main.css +0 -346
  83. package/src/components/page-main/ds-mobile-page-main.ts +0 -331
  84. package/src/components/page-main/index.ts +0 -2
  85. package/src/components/post-card/ds-mobile-post-card.ts +0 -685
  86. package/src/components/post-card/ds-mobile-post-pdf-attachment.ts +0 -124
  87. package/src/components/post-card/index.ts +0 -11
  88. package/src/components/post-composer/ds-mobile-post-composer.ts +0 -140
  89. package/src/components/post-composer/index.ts +0 -2
  90. package/src/components/post-detail-modal/ds-mobile-post-detail-modal.service.ts +0 -104
  91. package/src/components/post-detail-modal/ds-mobile-post-detail-modal.ts +0 -1273
  92. package/src/components/post-detail-modal/index.ts +0 -9
  93. package/src/components/shared/directives/index.ts +0 -2
  94. package/src/components/shared/directives/long-press.directive.ts +0 -208
  95. package/src/components/shared/index.ts +0 -3
  96. package/src/components/shared/mobile-common.css +0 -94
  97. package/src/components/shared/mobile-page-base.css +0 -315
  98. package/src/components/shared/mobile-page-base.ts +0 -70
  99. package/src/components/swiper/ds-mobile-swiper.ts +0 -123
  100. package/src/components/swiper/index.ts +0 -2
  101. package/src/components/tab-bar/ds-mobile-tab-bar.ts +0 -132
  102. package/src/components/tab-bar/index.ts +0 -2
  103. package/src/components/tabs/ds-mobile-tabs.css +0 -405
  104. package/src/components/tabs/ds-mobile-tabs.ts +0 -204
  105. package/src/components/tabs/index.ts +0 -2
  106. package/src/pages/community.page.ts +0 -768
  107. package/src/pages/handbook.page.ts +0 -298
  108. package/src/pages/home.page.ts +0 -192
  109. package/src/pages/index.ts +0 -9
  110. package/src/pages/inquiries.example.ts +0 -212
  111. package/src/pages/inquiry-detail.example.css +0 -434
  112. package/src/pages/inquiry-detail.example.ts +0 -416
  113. package/src/pages/mobile-tabs-example.component.ts +0 -146
  114. package/src/pages/post-create.page.ts +0 -311
  115. package/src/pages/post-detail.page.ts +0 -295
  116. package/src/pages/whitelabel-demo.page.ts +0 -548
  117. package/src/public-api.ts +0 -5
  118. package/src/services/user.service.ts +0 -35
  119. package/src/services/whitelabel.service.ts +0 -171
  120. package/src/styles/ionic.css +0 -673
  121. package/tsconfig.lib.json +0 -17
  122. package/tsconfig.lib.prod.json +0 -9
  123. package/tsconfig.spec.json +0 -13
@@ -1,217 +0,0 @@
1
- import { Component, Input, Output, EventEmitter, signal, OnInit, OnDestroy, AfterViewInit, ElementRef, inject, PLATFORM_ID } from '@angular/core';
2
- import { CommonModule, isPlatformBrowser } from '@angular/common';
3
- import {
4
- IonTabs,
5
- IonTabBar,
6
- IonTabButton,
7
- IonLabel
8
- } from '@ionic/angular/standalone';
9
- import { DsIconComponent, DsAvatarComponent } from '@propbinder/design-system';
10
-
11
- export interface TabConfig {
12
- id: string;
13
- label: string;
14
- route: string;
15
- icon: string;
16
- iconActive: string;
17
- }
18
-
19
- /**
20
- * DsMobileTabsComponent
21
- *
22
- * Responsive tab navigation that adapts from mobile to desktop:
23
- * - Mobile (< 768px): Bottom tab bar with icons + labels
24
- * - Desktop (≥ 768px): Top navigation bar with logo, tabs, and avatar
25
- *
26
- * Wraps ion-tabs to maintain native routing functionality while
27
- * providing a responsive navigation experience with branding.
28
- *
29
- * @example
30
- * ```html
31
- * <ds-mobile-tabs
32
- * [tabs]="tabsConfig"
33
- * [avatarInitials]="'JD'"
34
- * (avatarClick)="handleAvatarClick()"
35
- * />
36
- * ```
37
- */
38
- @Component({
39
- selector: 'ds-mobile-tabs',
40
- standalone: true,
41
- imports: [
42
- CommonModule,
43
- IonTabs,
44
- IonTabBar,
45
- IonTabButton,
46
- IonLabel,
47
- DsIconComponent,
48
- DsAvatarComponent
49
- ],
50
- styleUrls: ['./ds-mobile-tabs.css'],
51
- template: `
52
- <ion-tabs>
53
- <ion-tab-bar
54
- [attr.slot]="isDesktop() ? 'top' : 'bottom'"
55
- class="ds-tab-bar"
56
- [class.ds-tab-bar--desktop]="isDesktop()">
57
-
58
- <!-- Logo (desktop only, positioned via CSS) -->
59
- <div class="ds-tab-bar__logo">
60
- <svg class="logomark" width="32" height="28" viewBox="0 0 36 32" fill="none" xmlns="http://www.w3.org/2000/svg">
61
- <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"/>
62
- <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"/>
63
- </svg>
64
- </div>
65
-
66
- <!-- Tab buttons container -->
67
- <div class="ds-tab-bar__tabs" *ngIf="tabs">
68
- <ion-tab-button
69
- *ngFor="let tab of tabs; trackBy: trackByTabId"
70
- [tab]="tab.id"
71
- [attr.data-icon]="tab.icon"
72
- [attr.data-icon-active]="tab.iconActive"
73
- [attr.aria-label]="tab.label"
74
- class="ds-tab-button ion-activatable"
75
- [class.tab-selected]="isTabActive(tab.id)">
76
- <div class="tab-icon-ripple"></div>
77
- <div class="tab-icon-wrapper">
78
- <ds-icon
79
- [name]="tab.icon"
80
- [size]="isDesktop() ? '20px' : '24px'"
81
- class="tab-icon-inactive"
82
- />
83
- <ds-icon
84
- [name]="tab.iconActive"
85
- [size]="isDesktop() ? '20px' : '24px'"
86
- class="tab-icon-active"
87
- />
88
- </div>
89
- <ion-label [attr.aria-hidden]="true">{{ tab.label }}</ion-label>
90
- </ion-tab-button>
91
- </div>
92
-
93
- <!-- Avatar (desktop only, positioned via CSS) -->
94
- <div class="ds-tab-bar__actions">
95
- <ds-avatar
96
- [initials]="avatarInitials"
97
- [type]="avatarType"
98
- [src]="avatarSrc"
99
- [iconName]="avatarIconName"
100
- (click)="handleAvatarClick()"
101
- style="cursor: pointer;"
102
- />
103
- </div>
104
- </ion-tab-bar>
105
- </ion-tabs>
106
- `
107
- })
108
- export class DsMobileTabsComponent implements OnInit, OnDestroy, AfterViewInit {
109
- private platformId = inject(PLATFORM_ID);
110
- private resizeListener?: () => void;
111
- private mutationObserver?: MutationObserver;
112
-
113
- // Inputs
114
- @Input() tabs: TabConfig[] = [];
115
-
116
- // Avatar inputs
117
- @Input() avatarType: 'initials' | 'photo' | 'icon' = 'initials';
118
- @Input() avatarInitials: string = 'U';
119
- @Input() avatarSrc: string = '';
120
- @Input() avatarIconName: string = 'remixUser3Line';
121
-
122
- // Outputs
123
- @Output() avatarClick = new EventEmitter<void>();
124
-
125
- // Internal state
126
- activeTab = signal<string>('');
127
- isDesktop = signal<boolean>(false);
128
-
129
- constructor(private elementRef: ElementRef) {}
130
-
131
- ngOnInit(): void {
132
- console.log('DsMobileTabsComponent initialized');
133
-
134
- // Only run breakpoint detection in browser
135
- if (isPlatformBrowser(this.platformId)) {
136
- // Initial check
137
- this.checkBreakpoint();
138
-
139
- // Listen for window resize
140
- this.resizeListener = () => this.checkBreakpoint();
141
- window.addEventListener('resize', this.resizeListener);
142
- }
143
- }
144
-
145
- ngAfterViewInit(): void {
146
- // Initial removal
147
- this.removeTitleAttributes();
148
-
149
- // Set up mutation observer to continuously remove title attributes
150
- this.setupTitleRemovalObserver();
151
- }
152
-
153
- ngOnDestroy(): void {
154
- if (isPlatformBrowser(this.platformId) && this.resizeListener) {
155
- window.removeEventListener('resize', this.resizeListener);
156
- }
157
- if (this.mutationObserver) {
158
- this.mutationObserver.disconnect();
159
- }
160
- }
161
-
162
- private setupTitleRemovalObserver(): void {
163
- const config = {
164
- attributes: true,
165
- attributeFilter: ['title'],
166
- subtree: true,
167
- childList: true
168
- };
169
-
170
- this.mutationObserver = new MutationObserver((mutations) => {
171
- mutations.forEach((mutation) => {
172
- if (mutation.type === 'attributes' && mutation.attributeName === 'title') {
173
- const target = mutation.target as HTMLElement;
174
- if (target.tagName === 'ION-TAB-BUTTON' && target.hasAttribute('title')) {
175
- target.removeAttribute('title');
176
- }
177
- }
178
- });
179
- // Also do a sweep after any changes
180
- this.removeTitleAttributes();
181
- });
182
-
183
- this.mutationObserver.observe(this.elementRef.nativeElement, config);
184
- }
185
-
186
- private removeTitleAttributes(): void {
187
- const tabButtons = this.elementRef.nativeElement.querySelectorAll('ion-tab-button');
188
- tabButtons.forEach((button: HTMLElement) => {
189
- if (button.hasAttribute('title')) {
190
- button.removeAttribute('title');
191
- }
192
- // Also remove from the native button inside shadow DOM
193
- const nativeButton = button.shadowRoot?.querySelector('button');
194
- if (nativeButton?.hasAttribute('title')) {
195
- nativeButton.removeAttribute('title');
196
- }
197
- });
198
- }
199
-
200
- private checkBreakpoint(): void {
201
- // 768px matches the @media (min-width: 768px) in CSS
202
- this.isDesktop.set(window.innerWidth >= 768);
203
- }
204
-
205
- trackByTabId(index: number, tab: TabConfig): string {
206
- return tab.id;
207
- }
208
-
209
- isTabActive(tabId: string): boolean {
210
- return this.activeTab() === tabId;
211
- }
212
-
213
- handleAvatarClick(): void {
214
- this.avatarClick.emit();
215
- }
216
- }
217
-
@@ -1,164 +0,0 @@
1
- import { Component, input, output } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { DsAvatarComponent } from '@propbinder/design-system';
4
- import { DsIconComponent } from '@propbinder/design-system';
5
-
6
- /**
7
- * DsMobileFileAttachmentComponent
8
- *
9
- * File attachment display for various document types.
10
- * Shows file info card with icon, filename, and file size.
11
- * Supports PDF and generic document formats.
12
- * Emits click event to open file in viewer.
13
- *
14
- * @example
15
- * ```html
16
- * <ds-mobile-file-attachment
17
- * [fileName]="'Document.pdf'"
18
- * [fileSize]="'1.2 MB'"
19
- * [variant]="'pdf'"
20
- * (fileClick)="openFile()">
21
- * </ds-mobile-file-attachment>
22
- * ```
23
- */
24
- @Component({
25
- selector: 'ds-mobile-file-attachment',
26
- standalone: true,
27
- imports: [CommonModule, DsAvatarComponent, DsIconComponent],
28
- host: {
29
- '(click)': 'handleClick($event)'
30
- },
31
- styles: [`
32
- :host {
33
- display: flex;
34
- align-items: center;
35
- gap: 12px;
36
- padding: 10px 12px;
37
- background: var(--color-background-neutral-secondary, #f5f5f5);
38
- border-radius: 16px;
39
- cursor: pointer;
40
- transition: all 0.2s ease;
41
- }
42
-
43
- :host:hover {
44
- background: var(--color-background-neutral-secondary-hover, #ebebeb);
45
- }
46
-
47
- :host:active {
48
- transform: scale(0.98);
49
- }
50
-
51
- .file-avatar {
52
- flex-shrink: 0;
53
- }
54
-
55
- .file-avatar.pdf::ng-deep .avatar--icon {
56
- background-color: #ff5757 !important;
57
- }
58
-
59
- .file-avatar.doc::ng-deep .avatar--icon {
60
- background-color: var(--color-blue-base, #3B82F6) !important;
61
- }
62
-
63
- .file-info {
64
- flex: 1;
65
- min-width: 0;
66
- display: flex;
67
- flex-direction: column;
68
- gap: 2px;
69
- }
70
-
71
- .file-name {
72
- font-family: 'Brockmann', sans-serif;
73
- font-size: var(--font-size-sm);
74
- font-weight: 600;
75
- line-height: 20px;
76
- letter-spacing: -0.3px;
77
- color: var(--color-text-primary, #1a1a1a);
78
- white-space: nowrap;
79
- overflow: hidden;
80
- text-overflow: ellipsis;
81
- }
82
-
83
- .file-meta {
84
- font-family: 'Brockmann', sans-serif;
85
- font-size: var(--font-size-xs);
86
- font-weight: 400;
87
- line-height: 1.2;
88
- letter-spacing: -0.26px;
89
- color: var(--color-text-tertiary, #737373);
90
- }
91
-
92
- .open-icon {
93
- color: var(--color-text-tertiary, #a3a3a3);
94
- flex-shrink: 0;
95
- }
96
- `],
97
- template: `
98
- <div class="file-avatar" [class.pdf]="variant() === 'pdf'" [class.doc]="variant() === 'doc'">
99
- <ds-avatar
100
- type="icon"
101
- [iconName]="getIconName()"
102
- size="md"
103
- />
104
- </div>
105
-
106
- <div class="file-info">
107
- <div class="file-name">{{ fileName() }}</div>
108
- @if (fileSize()) {
109
- <div class="file-meta">{{ getFileTypeLabel() }} · {{ fileSize() }}</div>
110
- } @else {
111
- <div class="file-meta">{{ getFileTypeLabel() }}</div>
112
- }
113
- </div>
114
-
115
- <ds-icon
116
- name="remixArrowRightSLine"
117
- size="20px"
118
- class="open-icon"
119
- />
120
- `
121
- })
122
- export class DsMobileFileAttachmentComponent {
123
- /**
124
- * File name
125
- */
126
- fileName = input<string>('Document');
127
-
128
- /**
129
- * File size display (e.g., "1.2 MB")
130
- */
131
- fileSize = input<string>('');
132
-
133
- /**
134
- * File type variant
135
- * - 'pdf' - PDF document (red icon)
136
- * - 'doc' - Generic document (blue icon)
137
- */
138
- variant = input<'pdf' | 'doc'>('doc');
139
-
140
- /**
141
- * Emits when the file attachment is clicked
142
- */
143
- fileClick = output<void>();
144
-
145
- /**
146
- * Get the appropriate icon name based on variant
147
- */
148
- getIconName(): string {
149
- return this.variant() === 'pdf' ? 'remixFileTextLine' : 'remixAttachmentLine';
150
- }
151
-
152
- /**
153
- * Get the file type label based on variant
154
- */
155
- getFileTypeLabel(): string {
156
- return this.variant() === 'pdf' ? 'PDF' : 'DOC';
157
- }
158
-
159
- handleClick(event: Event): void {
160
- event.stopPropagation();
161
- this.fileClick.emit();
162
- }
163
- }
164
-
@@ -1,2 +0,0 @@
1
- export { DsMobileFileAttachmentComponent } from './ds-mobile-file-attachment';
2
-
@@ -1,98 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { ModalController } from '@ionic/angular/standalone';
3
- import { DsMobileHandbookDetailModalComponent, HandbookDetailData } from './ds-mobile-handbook-detail-modal';
4
-
5
- /**
6
- * DsMobileHandbookDetailModalService
7
- *
8
- * Service for displaying handbook folder details in a full-screen modal.
9
- * Built on Ionic's modal system with native gestures and animations.
10
- *
11
- * Features:
12
- * - Full handbook content display
13
- * - Items list with descriptions
14
- * - Images and attachments
15
- * - Contact information
16
- * - Native modal animations
17
- * - Safe area support
18
- *
19
- * @example
20
- * ```typescript
21
- * constructor(private handbookModal: DsMobileHandbookDetailModalService) {}
22
- *
23
- * async openHandbook() {
24
- * await this.handbookModal.open({
25
- * title: 'Utilities',
26
- * variant: 'pink',
27
- * iconName: 'remixLightbulbLine',
28
- * itemCount: 8,
29
- * items: [
30
- * {
31
- * title: 'Hjertestarter',
32
- * description: 'Installed on the 4th floor...',
33
- * images: ['/path/to/image.jpg'],
34
- * contacts: [
35
- * { name: 'Mortensen & Søn ApS', initials: 'M' }
36
- * ]
37
- * }
38
- * ]
39
- * });
40
- * }
41
- * ```
42
- */
43
- @Injectable({
44
- providedIn: 'root'
45
- })
46
- export class DsMobileHandbookDetailModalService {
47
- constructor(private modalController: ModalController) {}
48
-
49
- /**
50
- * Open the handbook detail modal
51
- *
52
- * @param handbookData Handbook data to display
53
- * @returns Promise that resolves when the modal is presented
54
- */
55
- async open(handbookData: HandbookDetailData): Promise<void> {
56
- console.log('[HandbookDetailModal] Opening with data:', handbookData);
57
-
58
- const modal = await this.modalController.create({
59
- component: DsMobileHandbookDetailModalComponent,
60
- componentProps: {
61
- handbookData: handbookData
62
- },
63
- cssClass: 'ds-handbook-detail-modal',
64
- mode: 'ios',
65
- presentingElement: document.querySelector('ion-router-outlet') || undefined,
66
- backdropDismiss: true,
67
- showBackdrop: true,
68
- animated: true,
69
- keyboardClose: true,
70
- enterAnimation: undefined,
71
- leaveAnimation: undefined
72
- });
73
-
74
- console.log('[HandbookDetailModal] Modal created, presenting...');
75
- await modal.present();
76
- console.log('[HandbookDetailModal] Modal presented');
77
- }
78
-
79
- /**
80
- * Close the currently open handbook detail modal
81
- *
82
- * @param data Optional data to pass back when dismissing
83
- * @returns Promise that resolves when the modal is dismissed
84
- */
85
- async close(data?: any): Promise<boolean> {
86
- return this.modalController.dismiss(data);
87
- }
88
-
89
- /**
90
- * Get the top-most modal if one exists
91
- *
92
- * @returns Promise that resolves to the modal element or undefined
93
- */
94
- async getTop(): Promise<HTMLIonModalElement | undefined> {
95
- return this.modalController.getTop();
96
- }
97
- }
98
-