@propbinder/mobile-design 0.2.47 → 0.2.50
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 +24 -0
- package/package.json +3 -39
- package/src/animations/page-transitions.ts +165 -0
- package/src/assets/fonts/brockmann-mediumitalic-webfont.woff2 +0 -0
- package/src/assets/fonts/brockmann-regularitalic-webfont.woff2 +0 -0
- package/src/assets/fonts/brockmann-semibolditalic-webfont.woff2 +0 -0
- package/src/components/action-list-item/ds-mobile-action-list-item.ts +102 -0
- package/src/components/action-list-item/index.ts +2 -0
- package/src/components/app-icon/ds-app-icon.ts +133 -0
- package/src/components/app-icon/index.ts +2 -0
- package/src/components/attachment-preview/ds-mobile-attachment-preview.css +139 -0
- package/src/components/attachment-preview/ds-mobile-attachment-preview.ts +164 -0
- package/src/components/attachment-preview/index.ts +1 -0
- package/src/components/avatar-with-badge/ds-avatar-with-badge.ts +142 -0
- package/src/components/avatar-with-badge/index.ts +2 -0
- package/src/components/booking-modal/ds-mobile-booking-confirmation-wrapper.ts +71 -0
- package/src/components/booking-modal/ds-mobile-booking-modal.service.ts +121 -0
- package/src/components/booking-modal/ds-mobile-booking-modal.ts +598 -0
- package/src/components/booking-modal/ds-mobile-booking-summary.ts +161 -0
- package/src/components/booking-modal/index.ts +4 -0
- package/src/components/bottom-sheet/ds-mobile-actions-bottom-sheet.ts +266 -0
- package/src/components/bottom-sheet/ds-mobile-bottom-sheet-header.ts +146 -0
- package/src/components/bottom-sheet/ds-mobile-bottom-sheet-wrapper.ts +156 -0
- package/src/components/bottom-sheet/ds-mobile-bottom-sheet.css +101 -0
- package/src/components/bottom-sheet/ds-mobile-bottom-sheet.service.ts +169 -0
- package/src/components/bottom-sheet/ds-mobile-confirmation-sheet.ts +211 -0
- package/src/components/bottom-sheet/ds-mobile-post-create-bottom-sheet.ts +578 -0
- package/src/components/bottom-sheet/ds-mobile-profile-actions-sheet.ts +614 -0
- package/src/components/bottom-sheet/index.ts +8 -0
- package/src/components/bottom-sheet/modal-shadow-fix.ts +42 -0
- package/src/components/card-inline/ds-mobile-card-inline.ts +301 -0
- package/src/components/card-inline/index.ts +2 -0
- package/src/components/card-inline-banner/ds-mobile-card-inline-banner.ts +118 -0
- package/src/components/card-inline-banner/index.ts +1 -0
- package/src/components/card-inline-contact/ds-mobile-card-inline-contact.ts +120 -0
- package/src/components/card-inline-contact/index.ts +1 -0
- package/src/components/card-inline-file/ds-mobile-card-inline-file.ts +141 -0
- package/src/components/card-inline-file/index.ts +1 -0
- package/src/components/chat-modal/ds-mobile-chat-modal.css +159 -0
- package/src/components/chat-modal/ds-mobile-chat-modal.service.ts +105 -0
- package/src/components/chat-modal/ds-mobile-chat-modal.ts +918 -0
- package/src/components/chat-modal/index.ts +8 -0
- package/src/components/comment/ds-mobile-comment.ts +568 -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 +139 -0
- package/src/components/content/index.ts +2 -0
- package/src/components/dropdown/ds-mobile-dropdown.css +199 -0
- package/src/components/dropdown/ds-mobile-dropdown.ts +340 -0
- package/src/components/dropdown/index.ts +2 -0
- package/src/components/ds-mobile-tabs.css +407 -0
- package/src/components/ds-mobile-tabs.ts +216 -0
- package/src/components/empty-state/ds-mobile-empty-state.ts +120 -0
- package/src/components/empty-state/index.ts +2 -0
- package/src/components/fab/ds-mobile-fab.ts +315 -0
- package/src/components/fab/index.ts +1 -0
- package/src/components/facility-creation-modal/ds-mobile-facility-creation-confirmation-wrapper.ts +121 -0
- package/src/components/facility-creation-modal/ds-mobile-facility-creation-modal.css +189 -0
- package/src/components/facility-creation-modal/ds-mobile-facility-creation-modal.service.ts +135 -0
- package/src/components/facility-creation-modal/ds-mobile-facility-creation-modal.ts +656 -0
- package/src/components/facility-creation-modal/index.ts +9 -0
- package/src/components/facility-creation-modal/sheets/ds-mobile-access-sheet.ts +105 -0
- package/src/components/facility-creation-modal/sheets/ds-mobile-price-sheet.ts +188 -0
- package/src/components/facility-creation-modal/sheets/ds-mobile-when-can-book-sheet.ts +460 -0
- package/src/components/facility-creation-modal/sheets/ds-mobile-who-can-book-sheet.ts +134 -0
- package/src/components/facility-detail-modal/ds-mobile-facility-detail-modal.service.ts +69 -0
- package/src/components/facility-detail-modal/ds-mobile-facility-detail-modal.ts +379 -0
- package/src/components/facility-detail-modal/index.ts +2 -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.css +214 -0
- package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.service.ts +84 -0
- package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.ts +424 -0
- package/src/components/handbook-detail-modal/index.ts +3 -0
- package/src/components/handbook-folder/ds-mobile-handbook-folder-mini.ts +175 -0
- package/src/components/handbook-folder/ds-mobile-handbook-folder.ts +533 -0
- package/src/components/handbook-folder/index.ts +4 -0
- package/src/components/header-content/ds-mobile-header-content.ts +222 -0
- package/src/components/header-content/index.ts +2 -0
- package/src/components/illustration/ds-mobile-illustration.ts +124 -0
- package/src/components/illustration/index.ts +2 -0
- package/src/components/index.ts +124 -0
- package/src/components/inline-photo/ds-mobile-inline-photo.ts +361 -0
- package/src/components/inline-photo/index.ts +1 -0
- package/src/components/inline-tabs/ds-mobile-inline-tabs.ts +132 -0
- package/src/components/inline-tabs/index.ts +2 -0
- package/src/components/interactive-list-item-booking/ds-mobile-interactive-list-item-booking.ts +350 -0
- package/src/components/interactive-list-item-booking/index.ts +1 -0
- package/src/components/interactive-list-item-inquiry/ds-mobile-interactive-list-item-inquiry.ts +321 -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 +237 -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.ts +549 -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 +315 -0
- package/src/components/lightbox/ds-mobile-lightbox-header.ts +202 -0
- package/src/components/lightbox/ds-mobile-lightbox-image.ts +484 -0
- package/src/components/lightbox/ds-mobile-lightbox-pdf.css +377 -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 +296 -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 +603 -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/loader-overlay/ds-mobile-loader-overlay.css +49 -0
- package/src/components/loader-overlay/ds-mobile-loader-overlay.ts +77 -0
- package/src/components/loader-overlay/index.ts +1 -0
- package/src/components/logo/ds-logo.ts +95 -0
- package/src/components/logo/index.ts +2 -0
- package/src/components/message-bubble/ds-mobile-message-bubble.ts +633 -0
- package/src/components/message-bubble/index.ts +7 -0
- package/src/components/message-composer/ds-mobile-message-composer.ts +1146 -0
- package/src/components/message-composer/index.ts +7 -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/modal-base/ds-mobile-modal-base.css +378 -0
- package/src/components/modal-base/ds-mobile-modal-base.ts +261 -0
- package/src/components/modal-base/index.ts +2 -0
- package/src/components/new-inquiry-modal/ds-mobile-new-inquiry-modal.css +112 -0
- package/src/components/new-inquiry-modal/ds-mobile-new-inquiry-modal.service.ts +93 -0
- package/src/components/new-inquiry-modal/ds-mobile-new-inquiry-modal.ts +442 -0
- package/src/components/new-inquiry-modal/index.ts +4 -0
- package/src/components/offline-banner/ds-mobile-offline-banner.ts +135 -0
- package/src/components/offline-banner/index.ts +1 -0
- package/src/components/page-details/ds-mobile-page-details.css +83 -0
- package/src/components/page-details/ds-mobile-page-details.ts +282 -0
- package/src/components/page-details/index.ts +2 -0
- package/src/components/page-main/ds-mobile-page-main.css +68 -0
- package/src/components/page-main/ds-mobile-page-main.ts +421 -0
- package/src/components/page-main/index.ts +2 -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.css +390 -0
- package/src/components/post-detail-modal/ds-mobile-post-detail-modal.service.ts +108 -0
- package/src/components/post-detail-modal/ds-mobile-post-detail-modal.ts +722 -0
- package/src/components/post-detail-modal/index.ts +9 -0
- package/src/components/property-banner/ds-mobile-property-banner.ts +95 -0
- package/src/components/property-banner/index.ts +2 -0
- package/src/components/section/ds-mobile-section.ts +263 -0
- package/src/components/section/index.ts +2 -0
- package/src/components/shared/directives/index.ts +2 -0
- package/src/components/shared/directives/long-press.directive.ts +212 -0
- package/src/components/shared/index.ts +3 -0
- package/src/components/shared/mobile-modal-base.ts +457 -0
- package/src/components/shared/mobile-page-base.ts +204 -0
- package/src/components/swiper/ds-mobile-swiper-with-nav.ts +160 -0
- package/src/components/swiper/ds-mobile-swiper.ts +327 -0
- package/src/components/swiper/index.ts +3 -0
- package/src/components/system-message-banner/ds-mobile-system-message-banner.ts +129 -0
- package/src/components/system-message-banner/index.ts +2 -0
- package/src/components/tab-bar/ds-mobile-tab-bar.css +533 -0
- package/src/components/tab-bar/ds-mobile-tab-bar.ts +735 -0
- package/src/components/tab-bar/index.ts +2 -0
- package/src/components/tabs/ds-mobile-tabs.css +25 -0
- package/src/components/tabs/ds-mobile-tabs.ts +89 -0
- package/src/components/tabs/index.ts +2 -0
- package/src/components/text-input/ds-text-input.ts +287 -0
- package/src/components/text-input/index.ts +2 -0
- package/src/examples/booking.page.ts +434 -0
- package/src/examples/community.page.ts +776 -0
- package/src/examples/handbook.page.ts +324 -0
- package/src/examples/home.page.ts +347 -0
- package/src/examples/index.ts +12 -0
- package/src/examples/inquiries.example.ts +273 -0
- package/src/examples/inquiry-detail.example.css +189 -0
- package/src/examples/inquiry-detail.example.ts +415 -0
- package/src/examples/mobile-tabs-example.component.ts +208 -0
- package/src/examples/post-create.page.ts +311 -0
- package/src/examples/post-detail.page.ts +296 -0
- package/src/examples/sign-in.page.ts +291 -0
- package/src/examples/whitelabel-demo-modal.component.ts +1094 -0
- package/src/examples/whitelabel-demo-modal.service.ts +77 -0
- package/src/models/index.ts +7 -0
- package/src/models/post.model.ts +41 -0
- package/src/pages/community.page.ts +769 -0
- package/src/pages/handbook.page.ts +388 -0
- package/src/pages/home.page.ts +303 -0
- package/src/pages/index.ts +11 -0
- package/src/pages/inquiries.example.ts +273 -0
- package/src/pages/inquiry-detail.example.css +189 -0
- package/src/pages/inquiry-detail.example.ts +415 -0
- package/src/pages/mobile-tabs-example.component.ts +179 -0
- package/src/pages/post-create.page.ts +311 -0
- package/src/pages/post-detail.page.ts +296 -0
- package/src/pages/sign-in.page.ts +291 -0
- package/src/pages/whitelabel-demo-modal.component.ts +1094 -0
- package/src/pages/whitelabel-demo-modal.service.ts +77 -0
- package/src/public-api.ts +6 -0
- package/src/services/base-modal.service.ts +101 -0
- package/src/services/index.ts +11 -0
- package/src/services/posts.service.ts +542 -0
- package/src/services/tracking-permission.service.ts +88 -0
- package/src/services/user.service.ts +60 -0
- package/src/services/whitelabel.service.ts +675 -0
- package/{styles → src/styles}/ionic.css +25 -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 -26136
- package/fesm2022/propbinder-mobile-design.mjs.map +0 -1
- package/index.d.ts +0 -8154
- /package/{assets → src/assets}/fonts/Brockmann-Bold.otf +0 -0
- /package/{assets → src/assets}/fonts/Brockmann-BoldItalic.otf +0 -0
- /package/{assets → src/assets}/fonts/Brockmann-Medium.otf +0 -0
- /package/{assets → src/assets}/fonts/Brockmann-MediumItalic.otf +0 -0
- /package/{assets → src/assets}/fonts/Brockmann-Regular.otf +0 -0
- /package/{assets → src/assets}/fonts/Brockmann-RegularItalic.otf +0 -0
- /package/{assets → src/assets}/fonts/Brockmann-SemiBold.otf +0 -0
- /package/{assets → src/assets}/fonts/Brockmann-SemiBoldItalic.otf +0 -0
- /package/{assets → src/assets}/fonts/Brockmann_desktop_license.pdf +0 -0
- /package/{assets → src/assets}/fonts/brockmann-medium-webfont.woff2 +0 -0
- /package/{assets → src/assets}/fonts/brockmann-regular-webfont.woff2 +0 -0
- /package/{assets → src/assets}/fonts/brockmann-semibold-webfont.woff2 +0 -0
- /package/{styles → src/components/shared}/mobile-common.css +0 -0
- /package/{styles → src/components/shared}/mobile-page-base.css +0 -0
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { Component, Input, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { ModalController } from '@ionic/angular/standalone';
|
|
4
|
+
import { DsButtonComponent } from '@propbinder/design-system';
|
|
5
|
+
import { DsMobileModalBaseComponent } from '../modal-base/ds-mobile-modal-base';
|
|
6
|
+
import { DsMobileSectionComponent } from '../section';
|
|
7
|
+
import { DsMobileSwiperComponent } from '../swiper/ds-mobile-swiper';
|
|
8
|
+
import { DsMobileBookingModalService } from '../booking-modal';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Facility data interface for the modal
|
|
12
|
+
*
|
|
13
|
+
* Represents a facility with its content, images, requirements, and restrictions.
|
|
14
|
+
* Use this interface to map your API response data to the component.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const facilityData: FacilityDetailData = {
|
|
19
|
+
* id: 'facility-1',
|
|
20
|
+
* facilityTitle: 'Festlokale på taget',
|
|
21
|
+
* heroImage: '/Assets/Dummy-photos/balcony-view.jpg',
|
|
22
|
+
* fullDescription: '<p>The rooftop terrace...</p>',
|
|
23
|
+
* requirements: ['Kræver nøglekort'],
|
|
24
|
+
* bookingType: 'Instant booking',
|
|
25
|
+
* expectations: '<p>The terrace is furnished...</p>',
|
|
26
|
+
* restrictions: ['No smoking...']
|
|
27
|
+
* };
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export interface FacilityDetailData {
|
|
31
|
+
/** Unique facility identifier */
|
|
32
|
+
id: string;
|
|
33
|
+
/** Facility title/name */
|
|
34
|
+
facilityTitle: string;
|
|
35
|
+
/** Hero image URL for the top of the modal */
|
|
36
|
+
heroImage?: string;
|
|
37
|
+
/** Full description of the facility (HTML rich text) */
|
|
38
|
+
fullDescription: string;
|
|
39
|
+
/** List of requirements (e.g., "Kræver nøglekort") */
|
|
40
|
+
requirements?: string[];
|
|
41
|
+
/** Booking type (e.g., "Instant booking") */
|
|
42
|
+
bookingType?: string;
|
|
43
|
+
/** Expectations section content (HTML rich text) */
|
|
44
|
+
expectations?: string;
|
|
45
|
+
/** List of restrictions */
|
|
46
|
+
restrictions?: string[];
|
|
47
|
+
/** Availability status for display */
|
|
48
|
+
availabilityStatus?: string;
|
|
49
|
+
/** Status label text */
|
|
50
|
+
statusLabel?: string;
|
|
51
|
+
/** Booking date (for active bookings) */
|
|
52
|
+
bookingDate?: string;
|
|
53
|
+
/** Booking time range (for active bookings) */
|
|
54
|
+
bookingTime?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* DsMobileFacilityDetailModalComponent
|
|
59
|
+
*
|
|
60
|
+
* Modal wrapper for displaying facility details with rich content.
|
|
61
|
+
* Follows the same pattern as the post detail modal for consistent behavior.
|
|
62
|
+
*
|
|
63
|
+
* Features:
|
|
64
|
+
* - Hero image with swiper support
|
|
65
|
+
* - Requirements and booking type display
|
|
66
|
+
* - Rich text description
|
|
67
|
+
* - Expectations section
|
|
68
|
+
* - Restrictions list
|
|
69
|
+
* - Fixed bottom booking button
|
|
70
|
+
* - Native modal controls (close, swipe down)
|
|
71
|
+
* - Safe area support
|
|
72
|
+
*
|
|
73
|
+
* This component is typically not used directly - use DsMobileFacilityDetailModalService instead.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```typescript
|
|
77
|
+
* // Don't instantiate directly - use the service:
|
|
78
|
+
* constructor(private facilityModal: DsMobileFacilityDetailModalService) {}
|
|
79
|
+
*
|
|
80
|
+
* openFacility() {
|
|
81
|
+
* this.facilityModal.open({
|
|
82
|
+
* id: 'facility-1',
|
|
83
|
+
* facilityTitle: 'Festlokale på taget',
|
|
84
|
+
* fullDescription: '<p>Description...</p>'
|
|
85
|
+
* });
|
|
86
|
+
* }
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
@Component({
|
|
90
|
+
selector: 'ds-mobile-facility-detail-modal',
|
|
91
|
+
standalone: true,
|
|
92
|
+
imports: [
|
|
93
|
+
CommonModule,
|
|
94
|
+
DsButtonComponent,
|
|
95
|
+
DsMobileModalBaseComponent,
|
|
96
|
+
DsMobileSectionComponent,
|
|
97
|
+
DsMobileSwiperComponent,
|
|
98
|
+
],
|
|
99
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
100
|
+
styles: [`
|
|
101
|
+
:host {
|
|
102
|
+
display: block;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Hero image styling */
|
|
106
|
+
.facility-image {
|
|
107
|
+
width: 100%;
|
|
108
|
+
max-width: 100%;
|
|
109
|
+
height: 280px;
|
|
110
|
+
object-fit: cover;
|
|
111
|
+
display: block;
|
|
112
|
+
border-radius: 12px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Info items (requirements, booking type) */
|
|
116
|
+
.info-item {
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
gap: 8px;
|
|
120
|
+
padding: 8px 0;
|
|
121
|
+
font-family: 'Brockmann', sans-serif;
|
|
122
|
+
font-size: var(--font-size-sm, 14px);
|
|
123
|
+
color: var(--text-color-default-primary, #202227);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Rich text content */
|
|
127
|
+
.facility-description,
|
|
128
|
+
.facility-expectations {
|
|
129
|
+
font-family: 'Brockmann', sans-serif;
|
|
130
|
+
font-size: var(--font-size-sm, 14px);
|
|
131
|
+
line-height: 1.6;
|
|
132
|
+
color: var(--text-color-default-primary, #202227);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.facility-description p,
|
|
136
|
+
.facility-expectations p {
|
|
137
|
+
margin: 0 0 12px 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.facility-description p:last-child,
|
|
141
|
+
.facility-expectations p:last-child {
|
|
142
|
+
margin-bottom: 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Headings within description - use ::ng-deep to penetrate innerHTML */
|
|
146
|
+
::ng-deep .facility-description h3,
|
|
147
|
+
::ng-deep .facility-description headline,
|
|
148
|
+
::ng-deep .facility-description .section-headline {
|
|
149
|
+
font-family: 'Brockmann', sans-serif;
|
|
150
|
+
font-size: var(--font-size-base, 16px);
|
|
151
|
+
font-weight: 600;
|
|
152
|
+
line-height: 1.4;
|
|
153
|
+
color: var(--text-color-default-primary, #202227);
|
|
154
|
+
margin: 0 !important;
|
|
155
|
+
padding: 0 !important;
|
|
156
|
+
padding-top: 24px !important;
|
|
157
|
+
padding-bottom: 8px !important;
|
|
158
|
+
display: block;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Headings within description */
|
|
162
|
+
.section-headline {
|
|
163
|
+
font-family: 'Brockmann', sans-serif;
|
|
164
|
+
font-size: var(--font-size-base, 16px);
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
line-height: 1.4;
|
|
167
|
+
color: var(--text-color-default-primary, #202227);
|
|
168
|
+
margin: 0 !important;
|
|
169
|
+
padding-top: 24px !important;
|
|
170
|
+
padding-bottom: 8px !important;
|
|
171
|
+
display: block;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
::ng-deep .facility-description h3:first-child,
|
|
176
|
+
::ng-deep .facility-description headline:first-child,
|
|
177
|
+
::ng-deep .facility-description .section-headline:first-child,
|
|
178
|
+
::ng-deep .facility-description > *:first-child h3:first-child,
|
|
179
|
+
::ng-deep .facility-description > *:first-child headline:first-child {
|
|
180
|
+
padding-top: 0 !important;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Expectations section headings */
|
|
184
|
+
::ng-deep .facility-expectations headline,
|
|
185
|
+
::ng-deep .facility-expectations h3 {
|
|
186
|
+
font-family: 'Brockmann', sans-serif;
|
|
187
|
+
font-size: var(--font-size-base, 16px);
|
|
188
|
+
font-weight: 600;
|
|
189
|
+
line-height: 1.4;
|
|
190
|
+
color: var(--text-color-default-primary, #202227);
|
|
191
|
+
margin: 0 !important;
|
|
192
|
+
padding: 0 !important;
|
|
193
|
+
padding-top: 24px !important;
|
|
194
|
+
padding-bottom: 8px !important;
|
|
195
|
+
display: block;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
::ng-deep .facility-expectations headline:first-child,
|
|
199
|
+
::ng-deep .facility-expectations h3:first-child {
|
|
200
|
+
padding-top: 0 !important;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* Standalone section headline (used for "Ting, du skal vide") */
|
|
204
|
+
h2.section-headline {
|
|
205
|
+
font-family: 'Brockmann', sans-serif;
|
|
206
|
+
font-size: var(--font-size-base, 16px);
|
|
207
|
+
font-weight: 600;
|
|
208
|
+
line-height: 1.4;
|
|
209
|
+
color: var(--text-color-default-primary, #202227);
|
|
210
|
+
margin: 0;
|
|
211
|
+
padding-top: 16px !important;
|
|
212
|
+
padding-bottom: 8px;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* Lists within description */
|
|
216
|
+
.facility-description ul {
|
|
217
|
+
list-style: disc;
|
|
218
|
+
padding-left: 20px;
|
|
219
|
+
margin: 0 0 12px 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.facility-description ul li {
|
|
223
|
+
font-family: 'Brockmann', sans-serif;
|
|
224
|
+
font-size: var(--font-size-sm, 14px);
|
|
225
|
+
line-height: 1.6;
|
|
226
|
+
color: var(--text-color-default-primary, #202227);
|
|
227
|
+
margin-bottom: 8px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.facility-description ul li:last-child {
|
|
231
|
+
margin-bottom: 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* Restrictions within the same section */
|
|
235
|
+
.facility-restrictions {
|
|
236
|
+
margin-top: 20px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.restrictions-heading {
|
|
240
|
+
font-family: 'Brockmann', sans-serif;
|
|
241
|
+
font-size: var(--font-size-base, 16px);
|
|
242
|
+
font-weight: 600;
|
|
243
|
+
line-height: 1.4;
|
|
244
|
+
color: var(--text-color-default-primary, #202227);
|
|
245
|
+
margin: 0 0 12px 0;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* Restrictions list */
|
|
249
|
+
.restrictions-list {
|
|
250
|
+
list-style: disc;
|
|
251
|
+
padding-left: 20px;
|
|
252
|
+
margin: 0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.restrictions-list li {
|
|
256
|
+
font-family: 'Brockmann', sans-serif;
|
|
257
|
+
font-size: var(--font-size-sm, 14px);
|
|
258
|
+
line-height: 1.6;
|
|
259
|
+
color: var(--text-color-default-primary, #202227);
|
|
260
|
+
margin-bottom: 8px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.restrictions-list li:last-child {
|
|
264
|
+
margin-bottom: 0;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* Info items container */
|
|
268
|
+
.info-items-container {
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: column;
|
|
271
|
+
gap: 0;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* Fixed bottom button */
|
|
275
|
+
.booking-action {
|
|
276
|
+
padding: 16px 20px;
|
|
277
|
+
background: var(--color-surface-primary, #ffffff);
|
|
278
|
+
border-top: 1px solid var(--color-border, #e5e5e5);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.booking-action ds-button {
|
|
282
|
+
display: block;
|
|
283
|
+
width: 100%;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.booking-action ::ng-deep ds-button button {
|
|
287
|
+
width: 100%;
|
|
288
|
+
border-radius: 100px;
|
|
289
|
+
height: 44px;
|
|
290
|
+
min-height: 44px;
|
|
291
|
+
max-height: 44px;
|
|
292
|
+
padding-left: 16px;
|
|
293
|
+
padding-right: 16px;
|
|
294
|
+
}
|
|
295
|
+
`],
|
|
296
|
+
template: `
|
|
297
|
+
<ds-mobile-modal-base
|
|
298
|
+
[headerTitle]="facilityData.facilityTitle"
|
|
299
|
+
[hasFixedBottom]="true"
|
|
300
|
+
[keyboardContentBehavior]="'overlay'">
|
|
301
|
+
|
|
302
|
+
<!-- Hero Image Section -->
|
|
303
|
+
<!-- Hero Image and Things to Know Section -->
|
|
304
|
+
@if (facilityData.heroImage) {
|
|
305
|
+
<ds-mobile-section contentGap="20px">
|
|
306
|
+
<ds-mobile-swiper
|
|
307
|
+
[slideWidth]="'100%'"
|
|
308
|
+
[gap]="16">
|
|
309
|
+
<div class="swiper-slide">
|
|
310
|
+
<img [src]="facilityData.heroImage" [alt]="facilityData.facilityTitle" class="facility-image" />
|
|
311
|
+
</div>
|
|
312
|
+
</ds-mobile-swiper>
|
|
313
|
+
|
|
314
|
+
</ds-mobile-section>
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
<!-- Full Description Section -->
|
|
318
|
+
<ds-mobile-section>
|
|
319
|
+
<div class="facility-description" [innerHTML]="facilityData.fullDescription"></div>
|
|
320
|
+
|
|
321
|
+
@if (facilityData.expectations) {
|
|
322
|
+
<div class="facility-expectations" [innerHTML]="facilityData.expectations"></div>
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
@if (facilityData.restrictions?.length) {
|
|
326
|
+
<div class="facility-restrictions">
|
|
327
|
+
<h3 class="restrictions-heading">Restriktioner</h3>
|
|
328
|
+
<ul class="restrictions-list">
|
|
329
|
+
@for (restriction of facilityData.restrictions; track restriction) {
|
|
330
|
+
<li>{{ restriction }}</li>
|
|
331
|
+
}
|
|
332
|
+
</ul>
|
|
333
|
+
</div>
|
|
334
|
+
}
|
|
335
|
+
</ds-mobile-section>
|
|
336
|
+
|
|
337
|
+
<!-- Fixed Bottom Button -->
|
|
338
|
+
<div fixed-bottom class="booking-action">
|
|
339
|
+
<ds-button
|
|
340
|
+
size="md"
|
|
341
|
+
variant="primary"
|
|
342
|
+
[fullWidth]="true"
|
|
343
|
+
(clicked)="handleBookNow()">
|
|
344
|
+
Book nu
|
|
345
|
+
</ds-button>
|
|
346
|
+
</div>
|
|
347
|
+
</ds-mobile-modal-base>
|
|
348
|
+
`
|
|
349
|
+
})
|
|
350
|
+
export class DsMobileFacilityDetailModalComponent {
|
|
351
|
+
/**
|
|
352
|
+
* Facility data to display in the modal
|
|
353
|
+
*/
|
|
354
|
+
@Input() facilityData!: FacilityDetailData;
|
|
355
|
+
|
|
356
|
+
constructor(
|
|
357
|
+
private modalController: ModalController,
|
|
358
|
+
private bookingModalService: DsMobileBookingModalService
|
|
359
|
+
) {}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Handle booking button click
|
|
363
|
+
* Opens the booking modal for date/time selection
|
|
364
|
+
*/
|
|
365
|
+
async handleBookNow(): Promise<void> {
|
|
366
|
+
await this.bookingModalService.open({
|
|
367
|
+
facilityId: this.facilityData.id,
|
|
368
|
+
facilityTitle: this.facilityData.facilityTitle,
|
|
369
|
+
facilityThumbnail: this.facilityData.heroImage
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Close the modal
|
|
375
|
+
*/
|
|
376
|
+
close(): void {
|
|
377
|
+
this.modalController.dismiss();
|
|
378
|
+
}
|
|
379
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
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="lg"
|
|
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
|
+
|