@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.
- package/fesm2022/propbinder-mobile-design.mjs +12596 -0
- package/fesm2022/propbinder-mobile-design.mjs.map +1 -0
- package/index.d.ts +3214 -0
- package/package.json +39 -12
- package/ng-package.json +0 -7
- package/src/animations/page-transitions.ts +0 -86
- 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 +0 -83
- package/src/components/action-list-item/index.ts +0 -2
- package/src/components/app-layout/ds-mobile-app-layout.css +0 -343
- package/src/components/app-layout/ds-mobile-app-layout.ts +0 -271
- package/src/components/app-layout/index.ts +0 -2
- package/src/components/avatar-with-badge/ds-avatar-with-badge.ts +0 -130
- package/src/components/avatar-with-badge/index.ts +0 -2
- package/src/components/bottom-sheet/ds-mobile-actions-bottom-sheet.ts +0 -273
- package/src/components/bottom-sheet/ds-mobile-bottom-sheet.css +0 -110
- package/src/components/bottom-sheet/ds-mobile-bottom-sheet.service.ts +0 -167
- package/src/components/bottom-sheet/ds-mobile-post-create-bottom-sheet.ts +0 -656
- package/src/components/bottom-sheet/index.ts +0 -3
- package/src/components/comment/ds-mobile-comment.ts +0 -516
- package/src/components/comment/index.ts +0 -2
- package/src/components/contact-list-item/ds-mobile-contact-list-item.ts +0 -182
- package/src/components/contact-list-item/index.ts +0 -2
- package/src/components/content/ds-mobile-content.ts +0 -158
- package/src/components/content/index.ts +0 -2
- package/src/components/ds-mobile-tabs.css +0 -372
- package/src/components/ds-mobile-tabs.ts +0 -217
- package/src/components/file-attachment/ds-mobile-file-attachment.ts +0 -164
- package/src/components/file-attachment/index.ts +0 -2
- package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.service.ts +0 -98
- package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.ts +0 -514
- package/src/components/handbook-detail-modal/index.ts +0 -3
- package/src/components/handbook-folder/ds-mobile-handbook-folder-mini.ts +0 -130
- package/src/components/handbook-folder/ds-mobile-handbook-folder.ts +0 -444
- package/src/components/handbook-folder/index.ts +0 -4
- package/src/components/header-content/ds-mobile-header-content.ts +0 -211
- package/src/components/header-content/index.ts +0 -2
- package/src/components/index.ts +0 -45
- package/src/components/inline-photo/ds-mobile-inline-photo.ts +0 -269
- package/src/components/inline-photo/index.ts +0 -1
- package/src/components/interactive-list-item-inquiry/ds-mobile-interactive-list-item-inquiry.css +0 -60
- package/src/components/interactive-list-item-inquiry/ds-mobile-interactive-list-item-inquiry.ts +0 -280
- package/src/components/interactive-list-item-inquiry/index.ts +0 -2
- package/src/components/interactive-list-item-message/ds-mobile-interactive-list-item-message.ts +0 -197
- package/src/components/interactive-list-item-message/index.ts +0 -2
- package/src/components/interactive-list-item-post/ds-mobile-interactive-list-item-post.css +0 -70
- package/src/components/interactive-list-item-post/ds-mobile-interactive-list-item-post.ts +0 -594
- package/src/components/interactive-list-item-post/ds-mobile-post-pdf-attachment.ts +0 -124
- package/src/components/interactive-list-item-post/index.ts +0 -13
- package/src/components/lightbox/ds-mobile-lightbox-footer.ts +0 -331
- package/src/components/lightbox/ds-mobile-lightbox-header.ts +0 -173
- package/src/components/lightbox/ds-mobile-lightbox-image.ts +0 -464
- package/src/components/lightbox/ds-mobile-lightbox-pdf.css +0 -375
- package/src/components/lightbox/ds-mobile-lightbox-pdf.ts +0 -374
- package/src/components/lightbox/ds-mobile-lightbox.css +0 -587
- package/src/components/lightbox/ds-mobile-lightbox.service.ts +0 -293
- package/src/components/lightbox/ds-mobile-lightbox.ts +0 -529
- package/src/components/lightbox/index.ts +0 -22
- package/src/components/list-item/ds-mobile-list-item.ts +0 -499
- package/src/components/list-item/index.ts +0 -2
- package/src/components/list-item-static/ds-mobile-list-item-static.ts +0 -133
- package/src/components/list-item-static/index.ts +0 -2
- package/src/components/logo/ds-logo.ts +0 -85
- package/src/components/logo/index.ts +0 -2
- package/src/components/modal/ds-mobile-modal.css +0 -163
- package/src/components/modal/ds-mobile-modal.service.ts +0 -329
- package/src/components/modal/index.ts +0 -8
- package/src/components/page-details/ds-mobile-page-details.css +0 -285
- package/src/components/page-details/ds-mobile-page-details.ts +0 -128
- package/src/components/page-details/index.ts +0 -2
- package/src/components/page-main/ds-mobile-page-main.css +0 -346
- package/src/components/page-main/ds-mobile-page-main.ts +0 -331
- package/src/components/page-main/index.ts +0 -2
- package/src/components/post-card/ds-mobile-post-card.ts +0 -685
- package/src/components/post-card/ds-mobile-post-pdf-attachment.ts +0 -124
- package/src/components/post-card/index.ts +0 -11
- package/src/components/post-composer/ds-mobile-post-composer.ts +0 -140
- package/src/components/post-composer/index.ts +0 -2
- package/src/components/post-detail-modal/ds-mobile-post-detail-modal.service.ts +0 -104
- package/src/components/post-detail-modal/ds-mobile-post-detail-modal.ts +0 -1273
- package/src/components/post-detail-modal/index.ts +0 -9
- package/src/components/shared/directives/index.ts +0 -2
- package/src/components/shared/directives/long-press.directive.ts +0 -208
- package/src/components/shared/index.ts +0 -3
- package/src/components/shared/mobile-common.css +0 -94
- package/src/components/shared/mobile-page-base.css +0 -315
- package/src/components/shared/mobile-page-base.ts +0 -70
- package/src/components/swiper/ds-mobile-swiper.ts +0 -123
- package/src/components/swiper/index.ts +0 -2
- package/src/components/tab-bar/ds-mobile-tab-bar.ts +0 -132
- package/src/components/tab-bar/index.ts +0 -2
- package/src/components/tabs/ds-mobile-tabs.css +0 -405
- package/src/components/tabs/ds-mobile-tabs.ts +0 -204
- package/src/components/tabs/index.ts +0 -2
- package/src/pages/community.page.ts +0 -768
- package/src/pages/handbook.page.ts +0 -298
- package/src/pages/home.page.ts +0 -192
- package/src/pages/index.ts +0 -9
- package/src/pages/inquiries.example.ts +0 -212
- package/src/pages/inquiry-detail.example.css +0 -434
- package/src/pages/inquiry-detail.example.ts +0 -416
- package/src/pages/mobile-tabs-example.component.ts +0 -146
- package/src/pages/post-create.page.ts +0 -311
- package/src/pages/post-detail.page.ts +0 -295
- package/src/pages/whitelabel-demo.page.ts +0 -548
- package/src/public-api.ts +0 -5
- package/src/services/user.service.ts +0 -35
- package/src/services/whitelabel.service.ts +0 -171
- package/src/styles/ionic.css +0 -673
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -13
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { Injectable, signal, effect } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
export interface WhitelabelConfig {
|
|
4
|
-
// Logo assets
|
|
5
|
-
logoUrl: string; // Full logo for header (typically horizontal)
|
|
6
|
-
logoMarkUrl: string; // Compact logo mark for avatars/badges
|
|
7
|
-
logoAlt: string; // Alt text for accessibility
|
|
8
|
-
|
|
9
|
-
// Logo dimensions (optional, for optimization)
|
|
10
|
-
logoWidth?: number;
|
|
11
|
-
logoHeight?: number;
|
|
12
|
-
logoMarkWidth?: number;
|
|
13
|
-
logoMarkHeight?: number;
|
|
14
|
-
|
|
15
|
-
// Brand colors - these will update CSS custom properties
|
|
16
|
-
primaryColor: string; // Maps to --color-background-brand
|
|
17
|
-
secondaryColor: string; // Maps to --color-brand-secondary
|
|
18
|
-
|
|
19
|
-
// Organization info
|
|
20
|
-
organizationName: string;
|
|
21
|
-
organizationId: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const DEFAULT_CONFIG: WhitelabelConfig = {
|
|
25
|
-
logoUrl: '/assets/logos/propbinder-logo.svg',
|
|
26
|
-
logoMarkUrl: '/assets/logos/propbinder-logomark.svg',
|
|
27
|
-
logoAlt: 'Propbinder',
|
|
28
|
-
primaryColor: '#6B5FF5', // Propbinder brand purple (--color-background-brand)
|
|
29
|
-
secondaryColor: '#221a4c', // Propbinder dark purple for headers (--color-brand-secondary)
|
|
30
|
-
organizationName: 'Propbinder',
|
|
31
|
-
organizationId: 'default'
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* WhitelabelService
|
|
36
|
-
*
|
|
37
|
-
* Manages whitelabel configuration including logos and brand colors.
|
|
38
|
-
* Automatically updates CSS custom properties when colors change.
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* Initialize with custom config:
|
|
42
|
-
* ```typescript
|
|
43
|
-
* whitelabelService.initialize({
|
|
44
|
-
* logoUrl: '/assets/logos/acme-logo.svg',
|
|
45
|
-
* logoMarkUrl: '/assets/logos/acme-mark.svg',
|
|
46
|
-
* primaryColor: '#2563eb',
|
|
47
|
-
* secondaryColor: '#3b82f6',
|
|
48
|
-
* organizationName: 'Acme Corp'
|
|
49
|
-
* });
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* Load from API:
|
|
53
|
-
* ```typescript
|
|
54
|
-
* await whitelabelService.loadFromApi('acme-corp');
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
@Injectable({
|
|
58
|
-
providedIn: 'root'
|
|
59
|
-
})
|
|
60
|
-
export class WhitelabelService {
|
|
61
|
-
private _config = signal<WhitelabelConfig>(DEFAULT_CONFIG);
|
|
62
|
-
|
|
63
|
-
// Readonly getters for accessing config values
|
|
64
|
-
readonly logoUrl = () => this._config().logoUrl;
|
|
65
|
-
readonly logoMarkUrl = () => this._config().logoMarkUrl;
|
|
66
|
-
readonly logoAlt = () => this._config().logoAlt;
|
|
67
|
-
readonly primaryColor = () => this._config().primaryColor;
|
|
68
|
-
readonly secondaryColor = () => this._config().secondaryColor;
|
|
69
|
-
readonly organizationName = () => this._config().organizationName;
|
|
70
|
-
readonly organizationId = () => this._config().organizationId;
|
|
71
|
-
|
|
72
|
-
// Full config accessor
|
|
73
|
-
readonly config = this._config.asReadonly();
|
|
74
|
-
|
|
75
|
-
constructor() {
|
|
76
|
-
// Apply default colors on initialization
|
|
77
|
-
this.applyColors(DEFAULT_CONFIG.primaryColor, DEFAULT_CONFIG.secondaryColor);
|
|
78
|
-
|
|
79
|
-
// Watch for config changes and update CSS custom properties
|
|
80
|
-
effect(() => {
|
|
81
|
-
const config = this._config();
|
|
82
|
-
this.applyColors(config.primaryColor, config.secondaryColor);
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Initialize whitelabel configuration
|
|
88
|
-
* Call this early in app initialization (app.config.ts or app.component.ts)
|
|
89
|
-
*/
|
|
90
|
-
initialize(config: Partial<WhitelabelConfig>) {
|
|
91
|
-
this._config.update(current => ({
|
|
92
|
-
...current,
|
|
93
|
-
...config
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Load whitelabel config from API
|
|
99
|
-
* Typically called on app startup based on subdomain, user tenant, etc.
|
|
100
|
-
*
|
|
101
|
-
* @param organizationId - The organization identifier (subdomain, tenant ID, etc.)
|
|
102
|
-
*/
|
|
103
|
-
async loadFromApi(organizationId?: string): Promise<void> {
|
|
104
|
-
try {
|
|
105
|
-
// Example API call structure
|
|
106
|
-
// const response = await fetch(`/api/whitelabel/${organizationId || 'default'}`);
|
|
107
|
-
// const config = await response.json();
|
|
108
|
-
// this.initialize(config);
|
|
109
|
-
|
|
110
|
-
console.log('Loading whitelabel config from API for:', organizationId);
|
|
111
|
-
|
|
112
|
-
// Example: Different configs for different organizations
|
|
113
|
-
if (organizationId === 'demo-client') {
|
|
114
|
-
this.initialize({
|
|
115
|
-
logoUrl: '/assets/logos/demo-logo.svg',
|
|
116
|
-
logoMarkUrl: '/assets/logos/demo-mark.svg',
|
|
117
|
-
logoAlt: 'Demo Client',
|
|
118
|
-
primaryColor: '#2563eb', // Blue
|
|
119
|
-
secondaryColor: '#3b82f6', // Lighter blue
|
|
120
|
-
organizationName: 'Demo Client',
|
|
121
|
-
organizationId: 'demo-client'
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
// Add more organization-specific configs as needed
|
|
125
|
-
|
|
126
|
-
} catch (error) {
|
|
127
|
-
console.error('Failed to load whitelabel config:', error);
|
|
128
|
-
// Fallback to defaults already set
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Update config dynamically (e.g., when user switches organizations)
|
|
134
|
-
*/
|
|
135
|
-
updateConfig(updates: Partial<WhitelabelConfig>) {
|
|
136
|
-
this.initialize(updates);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Update only the brand colors
|
|
141
|
-
*/
|
|
142
|
-
updateColors(primaryColor: string, secondaryColor: string) {
|
|
143
|
-
this._config.update(current => ({
|
|
144
|
-
...current,
|
|
145
|
-
primaryColor,
|
|
146
|
-
secondaryColor
|
|
147
|
-
}));
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Reset to default configuration
|
|
152
|
-
*/
|
|
153
|
-
resetToDefault() {
|
|
154
|
-
this._config.set(DEFAULT_CONFIG);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Apply colors to CSS custom properties
|
|
159
|
-
* This updates the actual CSS variables used throughout the app
|
|
160
|
-
*/
|
|
161
|
-
private applyColors(primaryColor: string, secondaryColor: string) {
|
|
162
|
-
if (typeof document !== 'undefined') {
|
|
163
|
-
const root = document.documentElement;
|
|
164
|
-
root.style.setProperty('--color-background-brand', primaryColor);
|
|
165
|
-
root.style.setProperty('--color-brand-secondary', secondaryColor);
|
|
166
|
-
|
|
167
|
-
console.log('Applied whitelabel colors:', { primaryColor, secondaryColor });
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|