@propbinder/mobile-design 0.2.30 → 0.2.31
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.
|
@@ -49,7 +49,7 @@ const DEFAULT_CONFIG = {
|
|
|
49
49
|
signInBgGradientEnd: '#8A9BFF', // Gradient bottom color
|
|
50
50
|
signInContentColor: '#1a1a1a', // Default dark text color
|
|
51
51
|
organizationName: 'Propbinder',
|
|
52
|
-
organizationId: 'default'
|
|
52
|
+
organizationId: 'default',
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
55
|
* WhitelabelService
|
|
@@ -92,11 +92,16 @@ class WhitelabelService {
|
|
|
92
92
|
}
|
|
93
93
|
// Otherwise calculate height based on logoSize
|
|
94
94
|
switch (size) {
|
|
95
|
-
case 'sm':
|
|
96
|
-
|
|
97
|
-
case '
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
case 'sm':
|
|
96
|
+
return 24;
|
|
97
|
+
case 'md':
|
|
98
|
+
return 28;
|
|
99
|
+
case 'lg':
|
|
100
|
+
return 32;
|
|
101
|
+
case 'xl':
|
|
102
|
+
return 36;
|
|
103
|
+
default:
|
|
104
|
+
return 28;
|
|
100
105
|
}
|
|
101
106
|
}, ...(ngDevMode ? [{ debugName: "logoHeight" }] : []));
|
|
102
107
|
appIconSurface = computed(() => this._config().appIconSurface, ...(ngDevMode ? [{ debugName: "appIconSurface" }] : []));
|
|
@@ -154,9 +159,7 @@ class WhitelabelService {
|
|
|
154
159
|
if (isOnSignInPage) {
|
|
155
160
|
// On sign-in page - use sign-in background color
|
|
156
161
|
const config = this._config();
|
|
157
|
-
const backgroundColor = config.signInBgType === 'gradient'
|
|
158
|
-
? config.signInBgGradientStart
|
|
159
|
-
: config.signInBgSolid;
|
|
162
|
+
const backgroundColor = config.signInBgType === 'gradient' ? config.signInBgGradientStart : config.signInBgSolid;
|
|
160
163
|
const style = this.getStatusBarStyleForColor(backgroundColor);
|
|
161
164
|
StatusBar.setBackgroundColor({ color: backgroundColor }).catch(() => { });
|
|
162
165
|
StatusBar.setStyle({ style }).catch(() => { });
|
|
@@ -176,9 +179,9 @@ class WhitelabelService {
|
|
|
176
179
|
* Call this early in app initialization (app.config.ts or app.component.ts)
|
|
177
180
|
*/
|
|
178
181
|
initialize(config) {
|
|
179
|
-
this._config.update(current => ({
|
|
182
|
+
this._config.update((current) => ({
|
|
180
183
|
...current,
|
|
181
|
-
...config
|
|
184
|
+
...config,
|
|
182
185
|
}));
|
|
183
186
|
}
|
|
184
187
|
/**
|
|
@@ -193,7 +196,7 @@ class WhitelabelService {
|
|
|
193
196
|
// const response = await fetch(`/api/whitelabel/${organizationId || 'default'}`);
|
|
194
197
|
// const config = await response.json();
|
|
195
198
|
// this.initialize(config);
|
|
196
|
-
console.log('Loading whitelabel config from API for:', organizationId);
|
|
199
|
+
//console.log('Loading whitelabel config from API for:', organizationId);
|
|
197
200
|
// Example: Different configs for different organizations
|
|
198
201
|
if (organizationId === 'demo-client') {
|
|
199
202
|
this.initialize({
|
|
@@ -209,7 +212,7 @@ class WhitelabelService {
|
|
|
209
212
|
headerAccent: 'rgba(255, 255, 255, 0.15)',
|
|
210
213
|
onHeaderAccent: '#FFFFFF',
|
|
211
214
|
organizationName: 'Demo Client',
|
|
212
|
-
organizationId: 'demo-client'
|
|
215
|
+
organizationId: 'demo-client',
|
|
213
216
|
});
|
|
214
217
|
}
|
|
215
218
|
else if (organizationId === 'cobblestone') {
|
|
@@ -233,7 +236,7 @@ class WhitelabelService {
|
|
|
233
236
|
signInBgGradientEnd: '#BDC3C7',
|
|
234
237
|
signInContentColor: '#1a1a1a',
|
|
235
238
|
organizationName: 'Cobblestone',
|
|
236
|
-
organizationId: 'cobblestone'
|
|
239
|
+
organizationId: 'cobblestone',
|
|
237
240
|
});
|
|
238
241
|
}
|
|
239
242
|
// Add more organization-specific configs as needed
|
|
@@ -253,9 +256,9 @@ class WhitelabelService {
|
|
|
253
256
|
* Update only the brand colors
|
|
254
257
|
*/
|
|
255
258
|
updateColors(colors) {
|
|
256
|
-
this._config.update(current => ({
|
|
259
|
+
this._config.update((current) => ({
|
|
257
260
|
...current,
|
|
258
|
-
...colors
|
|
261
|
+
...colors,
|
|
259
262
|
}));
|
|
260
263
|
}
|
|
261
264
|
/**
|
|
@@ -269,11 +272,13 @@ class WhitelabelService {
|
|
|
269
272
|
*/
|
|
270
273
|
hexToRgb(hex) {
|
|
271
274
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
272
|
-
return result
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
return result
|
|
276
|
+
? {
|
|
277
|
+
r: parseInt(result[1], 16),
|
|
278
|
+
g: parseInt(result[2], 16),
|
|
279
|
+
b: parseInt(result[3], 16),
|
|
280
|
+
}
|
|
281
|
+
: null;
|
|
277
282
|
}
|
|
278
283
|
/**
|
|
279
284
|
* Calculate relative luminance of a color (WCAG standard)
|
|
@@ -419,7 +424,7 @@ class WhitelabelService {
|
|
|
419
424
|
}
|
|
420
425
|
// Update tab button selected color directly
|
|
421
426
|
// CSS variable inheritance doesn't always work dynamically with Ionic components
|
|
422
|
-
document.querySelectorAll('ion-tab-button').forEach(tabButton => {
|
|
427
|
+
document.querySelectorAll('ion-tab-button').forEach((tabButton) => {
|
|
423
428
|
tabButton.style.setProperty('--color-selected', accent);
|
|
424
429
|
});
|
|
425
430
|
// ============================================
|
|
@@ -536,21 +541,21 @@ class WhitelabelService {
|
|
|
536
541
|
}
|
|
537
542
|
// Update native StatusBar color (Capacitor - Android only, iOS ignores this)
|
|
538
543
|
this.updateNativeStatusBar(headerSurface);
|
|
539
|
-
console.log('Applied whitelabel colors:', {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
});
|
|
544
|
+
// console.log('Applied whitelabel colors:', {
|
|
545
|
+
// appIconSurface,
|
|
546
|
+
// appIconContent,
|
|
547
|
+
// accent,
|
|
548
|
+
// accentHover,
|
|
549
|
+
// accentActive,
|
|
550
|
+
// onAccent,
|
|
551
|
+
// headerSurface,
|
|
552
|
+
// headerContent,
|
|
553
|
+
// headerAccent,
|
|
554
|
+
// headerAccentHover,
|
|
555
|
+
// headerAccentActive,
|
|
556
|
+
// onHeaderAccent,
|
|
557
|
+
// signInContentColor
|
|
558
|
+
// });
|
|
554
559
|
}
|
|
555
560
|
}
|
|
556
561
|
/**
|
|
@@ -574,7 +579,7 @@ class WhitelabelService {
|
|
|
574
579
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WhitelabelService, decorators: [{
|
|
575
580
|
type: Injectable,
|
|
576
581
|
args: [{
|
|
577
|
-
providedIn: 'root'
|
|
582
|
+
providedIn: 'root',
|
|
578
583
|
}]
|
|
579
584
|
}], ctorParameters: () => [] });
|
|
580
585
|
|
|
@@ -5538,15 +5543,15 @@ class DsMobileContentComponent {
|
|
|
5538
5543
|
*/
|
|
5539
5544
|
layout = input('stacked', ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
5540
5545
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DsMobileContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5541
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: DsMobileContentComponent, isStandalone: true, selector: "ds-mobile-content", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.layout-stacked": "layout() === \"stacked\"", "class.layout-grid-2": "layout() === \"grid-2\"", "class.layout-grid-3": "layout() === \"grid-3\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:
|
|
5546
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: DsMobileContentComponent, isStandalone: true, selector: "ds-mobile-content", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.layout-stacked": "layout() === \"stacked\"", "class.layout-grid-2": "layout() === \"grid-2\"", "class.layout-grid-3": "layout() === \"grid-3\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:16px;max-width:640px;margin:0 auto}:host.layout-grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}:host.layout-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}@media (max-width: 768px){:host.layout-grid-2,:host.layout-grid-3{grid-template-columns:1fr}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
5542
5547
|
}
|
|
5543
5548
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: DsMobileContentComponent, decorators: [{
|
|
5544
5549
|
type: Component,
|
|
5545
5550
|
args: [{ selector: 'ds-mobile-content', standalone: true, imports: [CommonModule], host: {
|
|
5546
5551
|
'[class.layout-stacked]': 'layout() === "stacked"',
|
|
5547
5552
|
'[class.layout-grid-2]': 'layout() === "grid-2"',
|
|
5548
|
-
'[class.layout-grid-3]': 'layout() === "grid-3"'
|
|
5549
|
-
}, template: `<ng-content />`, styles: [":host{display:flex;flex-direction:column;gap:
|
|
5553
|
+
'[class.layout-grid-3]': 'layout() === "grid-3"',
|
|
5554
|
+
}, template: `<ng-content />`, styles: [":host{display:flex;flex-direction:column;gap:16px;max-width:640px;margin:0 auto}:host.layout-grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}:host.layout-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}@media (max-width: 768px){:host.layout-grid-2,:host.layout-grid-3{grid-template-columns:1fr}}\n"] }]
|
|
5550
5555
|
}], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }] } });
|
|
5551
5556
|
/**
|
|
5552
5557
|
* SectionHeaderComponent
|
|
@@ -5565,7 +5570,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5565
5570
|
args: [{ selector: 'section-header', standalone: true, host: {
|
|
5566
5571
|
'[class.w-half]': 'width() === "half"',
|
|
5567
5572
|
'[class.w-third]': 'width() === "third"',
|
|
5568
|
-
'[class.w-full]': 'width() === "full"'
|
|
5573
|
+
'[class.w-full]': 'width() === "full"',
|
|
5569
5574
|
}, template: `<ng-content />`, styles: [":host{height:20px;border-radius:8px;background:var(--color-background-neutral-tertiary);display:block}:host.w-half{width:50%}:host.w-third{width:33%}:host.w-full{width:100%}\n"] }]
|
|
5570
5575
|
}], propDecorators: { width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }] } });
|
|
5571
5576
|
/**
|
|
@@ -16358,6 +16363,7 @@ class DsMobileNewInquiryModalService extends BaseModalService {
|
|
|
16358
16363
|
breakpoints: [0, 1],
|
|
16359
16364
|
initialBreakpoint: 1,
|
|
16360
16365
|
handle: false,
|
|
16366
|
+
presentingElement: undefined,
|
|
16361
16367
|
});
|
|
16362
16368
|
console.log('[NewInquiryModal] Modal created, presenting...');
|
|
16363
16369
|
await modal.present();
|