@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,124 @@
|
|
|
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
|
+
* PostPdfAttachmentComponent
|
|
8
|
+
*
|
|
9
|
+
* PDF file attachment display for posts.
|
|
10
|
+
* Shows PDF info card with icon, filename, and file size.
|
|
11
|
+
* Emits click event to open PDF in viewer.
|
|
12
|
+
*/
|
|
13
|
+
@Component({
|
|
14
|
+
selector: 'post-pdf-attachment',
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [CommonModule, DsAvatarComponent, DsIconComponent],
|
|
17
|
+
host: {
|
|
18
|
+
'(click)': 'handleClick($event)'
|
|
19
|
+
},
|
|
20
|
+
styles: [`
|
|
21
|
+
:host {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 8px;
|
|
25
|
+
padding: 10px 12px;
|
|
26
|
+
background: var(--color-background-neutral-secondary, #f5f5f5);
|
|
27
|
+
border-radius: 16px;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
transition: all 0.2s ease;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host:hover {
|
|
33
|
+
background: var(--color-background-neutral-secondary-hover, #ebebeb);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host:active {
|
|
37
|
+
transform: scale(0.98);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pdf-avatar {
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pdf-avatar::ng-deep .avatar--icon {
|
|
45
|
+
background-color: #ff5757 !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.pdf-info {
|
|
49
|
+
flex: 1;
|
|
50
|
+
min-width: 0;
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
gap: 2px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.pdf-name {
|
|
57
|
+
font-family: 'Brockmann', sans-serif;
|
|
58
|
+
font-size: var(--font-size-sm);
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
line-height: 20px;
|
|
61
|
+
letter-spacing: -0.3px;
|
|
62
|
+
color: var(--color-text-primary, #1a1a1a);
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.pdf-meta {
|
|
69
|
+
font-family: 'Brockmann', sans-serif;
|
|
70
|
+
font-size: var(--font-size-xs);
|
|
71
|
+
font-weight: 400;
|
|
72
|
+
line-height: 1.2;
|
|
73
|
+
letter-spacing: -0.26px;
|
|
74
|
+
color: var(--color-text-tertiary, #737373);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.open-icon {
|
|
78
|
+
color: var(--color-text-tertiary, #a3a3a3);
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
}
|
|
81
|
+
`],
|
|
82
|
+
template: `
|
|
83
|
+
<div class="pdf-avatar">
|
|
84
|
+
<ds-avatar
|
|
85
|
+
type="icon"
|
|
86
|
+
iconName="remixFileTextLine"
|
|
87
|
+
size="md"
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div class="pdf-info">
|
|
92
|
+
<div class="pdf-name">{{ fileName() }}</div>
|
|
93
|
+
<div class="pdf-meta">PDF · {{ fileSize() }}</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<ds-icon
|
|
97
|
+
name="remixArrowRightSLine"
|
|
98
|
+
size="24px"
|
|
99
|
+
class="open-icon"
|
|
100
|
+
/>
|
|
101
|
+
`
|
|
102
|
+
})
|
|
103
|
+
export class PostPdfAttachmentComponent {
|
|
104
|
+
/**
|
|
105
|
+
* PDF file name
|
|
106
|
+
*/
|
|
107
|
+
fileName = input<string>('Document.pdf');
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* File size display (e.g., "1.2 MB")
|
|
111
|
+
*/
|
|
112
|
+
fileSize = input<string>('');
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Emits when the PDF attachment is clicked
|
|
116
|
+
*/
|
|
117
|
+
pdfClick = output<void>();
|
|
118
|
+
|
|
119
|
+
handleClick(event: Event): void {
|
|
120
|
+
event.stopPropagation();
|
|
121
|
+
this.pdfClick.emit();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { Component, input, output } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { DsAvatarComponent } from '@propbinder/design-system';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* DsMobilePostComposerComponent
|
|
7
|
+
*
|
|
8
|
+
* A "fake" input composer for creating new posts in the community feed.
|
|
9
|
+
* Features a user avatar, placeholder input, and post button.
|
|
10
|
+
* Clicking opens the full post creation modal/page.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```html
|
|
14
|
+
* <ds-mobile-post-composer
|
|
15
|
+
* [avatarInitials]="'LM'"
|
|
16
|
+
* [avatarType]="'photo'"
|
|
17
|
+
* [avatarSrc]="'...'"
|
|
18
|
+
* (composerClick)="openPostCreator()">
|
|
19
|
+
* </ds-mobile-post-composer>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
@Component({
|
|
23
|
+
selector: 'ds-mobile-post-composer',
|
|
24
|
+
standalone: true,
|
|
25
|
+
imports: [CommonModule, DsAvatarComponent],
|
|
26
|
+
host: {
|
|
27
|
+
'(click)': 'handleClick()'
|
|
28
|
+
},
|
|
29
|
+
styles: [`
|
|
30
|
+
:host {
|
|
31
|
+
display: block;
|
|
32
|
+
max-width: 640px;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
transition: all 0.2s ease;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.composer-container {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: 12px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.composer-input-wrapper {
|
|
44
|
+
flex: 1;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.composer-input {
|
|
49
|
+
width: 100%;
|
|
50
|
+
background: rgba(255, 255, 255, 0.1);
|
|
51
|
+
border: none;
|
|
52
|
+
border-radius: 24px;
|
|
53
|
+
padding: 10px 16px;
|
|
54
|
+
font-family: 'Brockmann', sans-serif;
|
|
55
|
+
font-size: var(--font-size-sm);
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
line-height: 20px;
|
|
58
|
+
letter-spacing: -0.3px;
|
|
59
|
+
color: rgba(255, 255, 255, 0.5);
|
|
60
|
+
outline: none;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
transition: all 0.2s ease;
|
|
63
|
+
pointer-events: none;
|
|
64
|
+
user-select: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.composer-input::placeholder {
|
|
68
|
+
color: rgba(255, 255, 255, 0.5);
|
|
69
|
+
opacity: 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Hover effects for desktop */
|
|
73
|
+
@media (hover: hover) {
|
|
74
|
+
:host:hover .composer-input {
|
|
75
|
+
opacity: 0.8;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
`],
|
|
79
|
+
template: `
|
|
80
|
+
<div class="composer-container">
|
|
81
|
+
<ds-avatar
|
|
82
|
+
[initials]="avatarInitials()"
|
|
83
|
+
[type]="avatarType()"
|
|
84
|
+
[src]="avatarSrc()"
|
|
85
|
+
[iconName]="avatarIconName()"
|
|
86
|
+
size="md" />
|
|
87
|
+
|
|
88
|
+
<div class="composer-input-wrapper">
|
|
89
|
+
<input
|
|
90
|
+
type="text"
|
|
91
|
+
class="composer-input"
|
|
92
|
+
[placeholder]="placeholder()"
|
|
93
|
+
readonly
|
|
94
|
+
tabindex="-1"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
`
|
|
99
|
+
})
|
|
100
|
+
export class DsMobilePostComposerComponent {
|
|
101
|
+
/**
|
|
102
|
+
* Avatar initials (for initials type)
|
|
103
|
+
*/
|
|
104
|
+
avatarInitials = input<string>('');
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Avatar type
|
|
108
|
+
*/
|
|
109
|
+
avatarType = input<'initials' | 'photo' | 'icon'>('initials');
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Avatar photo source (for photo type)
|
|
113
|
+
*/
|
|
114
|
+
avatarSrc = input<string>('');
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Icon name (for icon type avatars)
|
|
118
|
+
*/
|
|
119
|
+
avatarIconName = input<string>('remixUser3Fill');
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Placeholder text for the input
|
|
123
|
+
*/
|
|
124
|
+
placeholder = input<string>("Hvad er nyt?");
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Text for the post button
|
|
128
|
+
*/
|
|
129
|
+
buttonText = input<string>('Slå op');
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Emits when the composer is clicked
|
|
133
|
+
*/
|
|
134
|
+
composerClick = output<void>();
|
|
135
|
+
|
|
136
|
+
handleClick(): void {
|
|
137
|
+
this.composerClick.emit();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { ModalController } from '@ionic/angular/standalone';
|
|
3
|
+
import { DsMobilePostDetailModalComponent, PostDetailData } from './ds-mobile-post-detail-modal';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* DsMobilePostDetailModalService
|
|
7
|
+
*
|
|
8
|
+
* Service for displaying post details in a full-screen modal.
|
|
9
|
+
* Built on Ionic's modal system with native gestures and animations.
|
|
10
|
+
* Follows the same pattern as DsMobileLightboxService for consistent behavior.
|
|
11
|
+
*
|
|
12
|
+
* Features:
|
|
13
|
+
* - Full post content display
|
|
14
|
+
* - Comments section
|
|
15
|
+
* - Like/comment actions
|
|
16
|
+
* - Image lightbox integration
|
|
17
|
+
* - Native modal animations
|
|
18
|
+
* - Safe area support
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* constructor(private postModal: DsMobilePostDetailModalService) {}
|
|
23
|
+
*
|
|
24
|
+
* async openPost() {
|
|
25
|
+
* await this.postModal.open({
|
|
26
|
+
* postId: '123',
|
|
27
|
+
* authorName: 'John Doe',
|
|
28
|
+
* authorRole: 'Tenant',
|
|
29
|
+
* timestamp: '2h ago',
|
|
30
|
+
* avatarInitials: 'JD',
|
|
31
|
+
* content: 'Just moved into my new apartment!',
|
|
32
|
+
* isLiked: false,
|
|
33
|
+
* likeCount: 42,
|
|
34
|
+
* commentCount: 12,
|
|
35
|
+
* comments: [
|
|
36
|
+
* {
|
|
37
|
+
* authorName: 'Jane Smith',
|
|
38
|
+
* authorRole: 'Tenant',
|
|
39
|
+
* timestamp: '1h ago',
|
|
40
|
+
* avatarInitials: 'JS',
|
|
41
|
+
* content: 'Welcome to the community!'
|
|
42
|
+
* }
|
|
43
|
+
* ]
|
|
44
|
+
* });
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
@Injectable({
|
|
49
|
+
providedIn: 'root'
|
|
50
|
+
})
|
|
51
|
+
export class DsMobilePostDetailModalService {
|
|
52
|
+
constructor(private modalController: ModalController) {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Open the post detail modal
|
|
56
|
+
*
|
|
57
|
+
* @param postData Post data to display
|
|
58
|
+
* @returns Promise that resolves when the modal is presented
|
|
59
|
+
*/
|
|
60
|
+
async open(postData: PostDetailData): Promise<void> {
|
|
61
|
+
console.log('[PostDetailModal] Opening with data:', postData);
|
|
62
|
+
|
|
63
|
+
const modal = await this.modalController.create({
|
|
64
|
+
component: DsMobilePostDetailModalComponent,
|
|
65
|
+
componentProps: {
|
|
66
|
+
postData: postData
|
|
67
|
+
},
|
|
68
|
+
cssClass: 'ds-post-detail-modal',
|
|
69
|
+
mode: 'ios',
|
|
70
|
+
presentingElement: document.querySelector('ion-router-outlet') || undefined,
|
|
71
|
+
backdropDismiss: true,
|
|
72
|
+
showBackdrop: true,
|
|
73
|
+
animated: true,
|
|
74
|
+
keyboardClose: true,
|
|
75
|
+
// Control the presenting element animation
|
|
76
|
+
enterAnimation: undefined, // Use default
|
|
77
|
+
leaveAnimation: undefined // Use default
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
console.log('[PostDetailModal] Modal created, presenting...');
|
|
81
|
+
await modal.present();
|
|
82
|
+
console.log('[PostDetailModal] Modal presented');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Close the currently open post detail modal
|
|
87
|
+
*
|
|
88
|
+
* @param data Optional data to pass back when dismissing
|
|
89
|
+
* @returns Promise that resolves when the modal is dismissed
|
|
90
|
+
*/
|
|
91
|
+
async close(data?: any): Promise<boolean> {
|
|
92
|
+
return this.modalController.dismiss(data);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Get the top-most modal if one exists
|
|
97
|
+
*
|
|
98
|
+
* @returns Promise that resolves to the modal element or undefined
|
|
99
|
+
*/
|
|
100
|
+
async getTop(): Promise<HTMLIonModalElement | undefined> {
|
|
101
|
+
return this.modalController.getTop();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|