@masterteam/brand-display 0.0.8 → 0.0.10
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.
|
@@ -69,10 +69,18 @@ const defaultBrandDisplayData = {
|
|
|
69
69
|
repeated: false,
|
|
70
70
|
},
|
|
71
71
|
login: {
|
|
72
|
-
backgroundColor: '#
|
|
72
|
+
backgroundColor: '#00313F',
|
|
73
|
+
textColor: '#ffffff',
|
|
73
74
|
repeated: false,
|
|
74
75
|
formWizardPosition: 'start',
|
|
75
76
|
},
|
|
77
|
+
pageLayout: {
|
|
78
|
+
headerBackgroundColor: '#ffffff',
|
|
79
|
+
headerTextColor: '#0a0a0a',
|
|
80
|
+
sidebarBackgroundColor: '#EBEBF0',
|
|
81
|
+
sidebarTextColor: '#0a0a0a',
|
|
82
|
+
contentBackgroundColor: '#ffffff',
|
|
83
|
+
},
|
|
76
84
|
loginLogo: 'pplus.svg',
|
|
77
85
|
brandLogoWhite: 'pplus-white.svg',
|
|
78
86
|
};
|
|
@@ -325,7 +333,7 @@ class FaviconService {
|
|
|
325
333
|
}
|
|
326
334
|
updateFaviconFromUrl(imagePath) {
|
|
327
335
|
this.httpClient
|
|
328
|
-
.get('
|
|
336
|
+
.get('Settings/login-image/' + imagePath, {
|
|
329
337
|
observe: 'response',
|
|
330
338
|
responseType: 'blob',
|
|
331
339
|
})
|
|
@@ -355,12 +363,14 @@ class ManageBrndingService {
|
|
|
355
363
|
sidebarData = computed(() => this.brandDisplayData()?.sidebar, ...(ngDevMode ? [{ debugName: "sidebarData" }] : /* istanbul ignore next */ []));
|
|
356
364
|
contentAreaData = computed(() => this.brandDisplayData()?.contentArea, ...(ngDevMode ? [{ debugName: "contentAreaData" }] : /* istanbul ignore next */ []));
|
|
357
365
|
loginData = computed(() => this.brandDisplayData()?.login, ...(ngDevMode ? [{ debugName: "loginData" }] : /* istanbul ignore next */ []));
|
|
366
|
+
pageLayoutData = computed(() => this.brandDisplayData()?.pageLayout, ...(ngDevMode ? [{ debugName: "pageLayoutData" }] : /* istanbul ignore next */ []));
|
|
358
367
|
// Draft data computed signals for preview components
|
|
359
368
|
draftMainData = computed(() => this.draftBrandDisplayData()?.main, ...(ngDevMode ? [{ debugName: "draftMainData" }] : /* istanbul ignore next */ []));
|
|
360
369
|
draftHeaderData = computed(() => this.draftBrandDisplayData()?.header, ...(ngDevMode ? [{ debugName: "draftHeaderData" }] : /* istanbul ignore next */ []));
|
|
361
370
|
draftSidebarData = computed(() => this.draftBrandDisplayData()?.sidebar, ...(ngDevMode ? [{ debugName: "draftSidebarData" }] : /* istanbul ignore next */ []));
|
|
362
371
|
draftContentAreaData = computed(() => this.draftBrandDisplayData()?.contentArea, ...(ngDevMode ? [{ debugName: "draftContentAreaData" }] : /* istanbul ignore next */ []));
|
|
363
372
|
draftLoginData = computed(() => this.draftBrandDisplayData()?.login, ...(ngDevMode ? [{ debugName: "draftLoginData" }] : /* istanbul ignore next */ []));
|
|
373
|
+
draftPageLayoutData = computed(() => this.draftBrandDisplayData()?.pageLayout, ...(ngDevMode ? [{ debugName: "draftPageLayoutData" }] : /* istanbul ignore next */ []));
|
|
364
374
|
// Images for main brandDisplayData
|
|
365
375
|
productBrandLogo = computed(() => {
|
|
366
376
|
return this.mainData()?.logoSettings?.productBrandImage?.fileName;
|
|
@@ -448,6 +458,24 @@ class ManageBrndingService {
|
|
|
448
458
|
}
|
|
449
459
|
});
|
|
450
460
|
});
|
|
461
|
+
effect(() => {
|
|
462
|
+
const layout = this.pageLayoutData();
|
|
463
|
+
const defaults = this.DEFAULT_DISPLAY_DATA()?.pageLayout;
|
|
464
|
+
untracked(() => {
|
|
465
|
+
const root = document.documentElement;
|
|
466
|
+
root.style.setProperty('--mt-cp-sidebar-bg', layout?.sidebarBackgroundColor ||
|
|
467
|
+
defaults?.sidebarBackgroundColor ||
|
|
468
|
+
'#EBEBF0');
|
|
469
|
+
root.style.setProperty('--mt-cp-sidebar-text', layout?.sidebarTextColor || defaults?.sidebarTextColor || '#0a0a0a');
|
|
470
|
+
root.style.setProperty('--mt-cp-header-bg', layout?.headerBackgroundColor ||
|
|
471
|
+
defaults?.headerBackgroundColor ||
|
|
472
|
+
'#ffffff');
|
|
473
|
+
root.style.setProperty('--mt-cp-header-text', layout?.headerTextColor || defaults?.headerTextColor || '#0a0a0a');
|
|
474
|
+
root.style.setProperty('--mt-cp-content-bg', layout?.contentBackgroundColor ||
|
|
475
|
+
defaults?.contentBackgroundColor ||
|
|
476
|
+
'#FFFFFF');
|
|
477
|
+
});
|
|
478
|
+
});
|
|
451
479
|
}
|
|
452
480
|
buildBackgroundStyles(data, defaultBgColor) {
|
|
453
481
|
const styles = {};
|
|
@@ -563,7 +591,7 @@ class PreviewBrand {
|
|
|
563
591
|
},
|
|
564
592
|
], ...(ngDevMode ? [{ debugName: "pages" }] : /* istanbul ignore next */ []));
|
|
565
593
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PreviewBrand, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
566
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PreviewBrand, isStandalone: true, selector: "mt-preview-brand", ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <div\r\n class=\"flex overflow-hidden rounded-lg border border-surface-300 bg-white\"\r\n >\r\n <div class=\"flex overflow-hidden bg-white rounded-s-
|
|
594
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PreviewBrand, isStandalone: true, selector: "mt-preview-brand", ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <div\r\n class=\"flex overflow-hidden rounded-lg border border-surface-300 bg-white\"\r\n >\r\n <div class=\"flex overflow-hidden bg-white rounded-s-md\">\r\n <div\r\n class=\"flex h-full w-14 shrink-0 flex-col items-center gap-3 border-e-1 border-surface-300 bg-cover bg-center px-1.5 py-4 sm:w-16 sm:px-2 sm:py-6\"\r\n [style]=\"sidebarStyles()\"\r\n [style.backgroundImage]=\"\r\n sidebarBackgroundImage()\r\n ? (sidebarBackgroundImage() | secureImage)\r\n : null\r\n \"\r\n >\r\n <div class=\"mb-2\">\r\n <mt-icon icon=\"general.menu-01\"></mt-icon>\r\n </div>\r\n @for (page of pages(); track page.title; let first = $first) {\r\n <a\r\n [style.background-color]=\"first ? lightPrimaryColor() : null\"\r\n class=\"flex size-10 items-center justify-center rounded-xl transition-colors hover:bg-surface-100 sm:size-[47px]\"\r\n >\r\n <mt-icon\r\n [icon]=\"page.icon\"\r\n [style.color]=\"\r\n first ? primaryColor() : manageBrnding.draftSidebarIconColor()\r\n \"\r\n />\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"min-w-0 flex-1\">\r\n <div\r\n class=\"flex min-h-14 items-center justify-between gap-3 rounded-e-md bg-cover bg-center px-3 py-0\"\r\n [style]=\"headerStyles()\"\r\n [style.backgroundImage]=\"\r\n headerBackgroundImage()\r\n ? (headerBackgroundImage() | secureImage)\r\n : null\r\n \"\r\n >\r\n <div class=\"flex min-w-0 items-center gap-2\">\r\n <img\r\n [src]=\"\r\n productBrandLogo()\r\n ? (productBrandLogo() | secureImage: true)\r\n : DEFAULT_DISPLAY_DATA()?.brandLogoWhite\r\n \"\r\n alt=\"Logo\"\r\n class=\"h-8 shrink-0\"\r\n />\r\n <div\r\n class=\"h-10 w-px shrink-0 sm:h-3/4\"\r\n [style.background-color]=\"headerFontColor()\"\r\n ></div>\r\n <div class=\"flex min-w-0 flex-col\">\r\n <h2\r\n class=\"truncate text-[8px] font-semibold sm:text-sm\"\r\n [style.color]=\"headerFontColor()\"\r\n >\r\n {{ productName() }}\r\n </h2>\r\n <span\r\n class=\"truncate text-[8px] font-semibold\"\r\n [style.color]=\"headerFontColor()\"\r\n >\r\n {{ productTagline() }}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <mt-button\r\n icon=\"alert.bell-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n [style.color]=\"headerFontColor()\"\r\n ></mt-button>\r\n </div>\r\n </div>\r\n <div\r\n [style]=\"contentAreaStyles()\"\r\n [style.color]=\"contentAreaBodyColor()\"\r\n [style.backgroundImage]=\"\r\n contentAreaBackgroundImage()\r\n ? (contentAreaBackgroundImage() | secureImage)\r\n : null\r\n \"\r\n class=\"h-[16rem] overflow-x-hidden overflow-y-auto overscroll-y-auto bg-cover bg-center ps-3 pb-3 sm:h-[18rem]\"\r\n >\r\n <mt-card class=\"w-full h-full rounded-e-none!\">\r\n <p class=\"text-sm\">{{ t(\"preview-content\") }}</p>\r\n </mt-card>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }] });
|
|
567
595
|
}
|
|
568
596
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PreviewBrand, decorators: [{
|
|
569
597
|
type: Component,
|
|
@@ -574,7 +602,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
574
602
|
TranslocoDirective,
|
|
575
603
|
SecureImagePipe,
|
|
576
604
|
Card,
|
|
577
|
-
], template: "<ng-container *transloco=\"let t\">\r\n <div\r\n class=\"flex overflow-hidden rounded-lg border border-surface-300 bg-white\"\r\n >\r\n <div class=\"flex overflow-hidden bg-white rounded-s-
|
|
605
|
+
], template: "<ng-container *transloco=\"let t\">\r\n <div\r\n class=\"flex overflow-hidden rounded-lg border border-surface-300 bg-white\"\r\n >\r\n <div class=\"flex overflow-hidden bg-white rounded-s-md\">\r\n <div\r\n class=\"flex h-full w-14 shrink-0 flex-col items-center gap-3 border-e-1 border-surface-300 bg-cover bg-center px-1.5 py-4 sm:w-16 sm:px-2 sm:py-6\"\r\n [style]=\"sidebarStyles()\"\r\n [style.backgroundImage]=\"\r\n sidebarBackgroundImage()\r\n ? (sidebarBackgroundImage() | secureImage)\r\n : null\r\n \"\r\n >\r\n <div class=\"mb-2\">\r\n <mt-icon icon=\"general.menu-01\"></mt-icon>\r\n </div>\r\n @for (page of pages(); track page.title; let first = $first) {\r\n <a\r\n [style.background-color]=\"first ? lightPrimaryColor() : null\"\r\n class=\"flex size-10 items-center justify-center rounded-xl transition-colors hover:bg-surface-100 sm:size-[47px]\"\r\n >\r\n <mt-icon\r\n [icon]=\"page.icon\"\r\n [style.color]=\"\r\n first ? primaryColor() : manageBrnding.draftSidebarIconColor()\r\n \"\r\n />\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"min-w-0 flex-1\">\r\n <div\r\n class=\"flex min-h-14 items-center justify-between gap-3 rounded-e-md bg-cover bg-center px-3 py-0\"\r\n [style]=\"headerStyles()\"\r\n [style.backgroundImage]=\"\r\n headerBackgroundImage()\r\n ? (headerBackgroundImage() | secureImage)\r\n : null\r\n \"\r\n >\r\n <div class=\"flex min-w-0 items-center gap-2\">\r\n <img\r\n [src]=\"\r\n productBrandLogo()\r\n ? (productBrandLogo() | secureImage: true)\r\n : DEFAULT_DISPLAY_DATA()?.brandLogoWhite\r\n \"\r\n alt=\"Logo\"\r\n class=\"h-8 shrink-0\"\r\n />\r\n <div\r\n class=\"h-10 w-px shrink-0 sm:h-3/4\"\r\n [style.background-color]=\"headerFontColor()\"\r\n ></div>\r\n <div class=\"flex min-w-0 flex-col\">\r\n <h2\r\n class=\"truncate text-[8px] font-semibold sm:text-sm\"\r\n [style.color]=\"headerFontColor()\"\r\n >\r\n {{ productName() }}\r\n </h2>\r\n <span\r\n class=\"truncate text-[8px] font-semibold\"\r\n [style.color]=\"headerFontColor()\"\r\n >\r\n {{ productTagline() }}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <mt-button\r\n icon=\"alert.bell-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n [style.color]=\"headerFontColor()\"\r\n ></mt-button>\r\n </div>\r\n </div>\r\n <div\r\n [style]=\"contentAreaStyles()\"\r\n [style.color]=\"contentAreaBodyColor()\"\r\n [style.backgroundImage]=\"\r\n contentAreaBackgroundImage()\r\n ? (contentAreaBackgroundImage() | secureImage)\r\n : null\r\n \"\r\n class=\"h-[16rem] overflow-x-hidden overflow-y-auto overscroll-y-auto bg-cover bg-center ps-3 pb-3 sm:h-[18rem]\"\r\n >\r\n <mt-card class=\"w-full h-full rounded-e-none!\">\r\n <p class=\"text-sm\">{{ t(\"preview-content\") }}</p>\r\n </mt-card>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n" }]
|
|
606
|
+
}] });
|
|
607
|
+
|
|
608
|
+
class PreviewLayoutPage {
|
|
609
|
+
manageBrnding = inject(ManageBrndingService);
|
|
610
|
+
DEFAULT = this.manageBrnding.DEFAULT_DISPLAY_DATA;
|
|
611
|
+
draft = this.manageBrnding.draftPageLayoutData;
|
|
612
|
+
headerBg = computed(() => this.draft()?.headerBackgroundColor ||
|
|
613
|
+
this.DEFAULT()?.pageLayout?.headerBackgroundColor ||
|
|
614
|
+
'#ffffff', ...(ngDevMode ? [{ debugName: "headerBg" }] : /* istanbul ignore next */ []));
|
|
615
|
+
headerText = computed(() => this.draft()?.headerTextColor ||
|
|
616
|
+
this.DEFAULT()?.pageLayout?.headerTextColor ||
|
|
617
|
+
'#0a0a0a', ...(ngDevMode ? [{ debugName: "headerText" }] : /* istanbul ignore next */ []));
|
|
618
|
+
sidebarBg = computed(() => this.draft()?.sidebarBackgroundColor ||
|
|
619
|
+
this.DEFAULT()?.pageLayout?.sidebarBackgroundColor ||
|
|
620
|
+
'#EBEBF0', ...(ngDevMode ? [{ debugName: "sidebarBg" }] : /* istanbul ignore next */ []));
|
|
621
|
+
sidebarText = computed(() => this.draft()?.sidebarTextColor ||
|
|
622
|
+
this.DEFAULT()?.pageLayout?.sidebarTextColor ||
|
|
623
|
+
'#0a0a0a', ...(ngDevMode ? [{ debugName: "sidebarText" }] : /* istanbul ignore next */ []));
|
|
624
|
+
contentBg = computed(() => this.draft()?.contentBackgroundColor ||
|
|
625
|
+
this.DEFAULT()?.pageLayout?.contentBackgroundColor ||
|
|
626
|
+
'#FFFFFF', ...(ngDevMode ? [{ debugName: "contentBg" }] : /* istanbul ignore next */ []));
|
|
627
|
+
mockMenuItems = [
|
|
628
|
+
{ icon: 'general.building-02', label: 'preview-organizations', count: 12 },
|
|
629
|
+
{ icon: 'custom.user-pp', label: 'preview-users', count: 48 },
|
|
630
|
+
{ icon: 'alert.bell-02', label: 'preview-documents', count: 156 },
|
|
631
|
+
{ icon: 'general.settings-01', label: 'preview-settings', count: 7 },
|
|
632
|
+
];
|
|
633
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PreviewLayoutPage, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
634
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PreviewLayoutPage, isStandalone: true, selector: "mt-preview-layout-page", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'brand-display'\">\r\n <h3 class=\"text-sm font-medium mb-3\">{{ t(\"preview\") }}</h3>\r\n\r\n <!-- Client Page Mockup -->\r\n <div\r\n class=\"overflow-hidden rounded-xl border border-surface-200 shadow-sm\"\r\n style=\"height: 420px\"\r\n >\r\n <div class=\"flex h-full\">\r\n <!-- Left Sidebar -->\r\n <div\r\n class=\"flex w-49 shrink-0 flex-col overflow-hidden\"\r\n [style.background-color]=\"sidebarBg()\"\r\n >\r\n <!-- Sidebar Header -->\r\n <div class=\"flex items-center gap-2 border-b border-black/10 px-4 py-3\">\r\n <mt-icon [icon]=\"'general.settings-01'\" />\r\n <span class=\"text-xs font-semibold\" [style.color]=\"sidebarText()\">{{\r\n t(\"preview-settings\")\r\n }}</span>\r\n </div>\r\n\r\n <!-- Sidebar Items -->\r\n <div class=\"flex-1 overflow-y-auto p-2\">\r\n @for (item of mockMenuItems; track item.label) {\r\n <div\r\n class=\"mb-1 flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 transition-colors hover:bg-black/5\"\r\n >\r\n <div class=\"p-1.5 bg-surface-100 flex items-center rounded-xs\">\r\n <mt-icon [icon]=\"item.icon\" />\r\n </div>\r\n <span\r\n [style.color]=\"sidebarText()\"\r\n class=\"min-w-0 flex-1 truncate text-xs font-medium\"\r\n >{{ t(item.label) }}</span\r\n >\r\n <span\r\n [style.color]=\"headerText()\"\r\n class=\"shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-semibold opacity-60\"\r\n [style.background-color]=\"sidebarText() + '22'\"\r\n >{{ item.count }}</span\r\n >\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Right Panel -->\r\n <div class=\"flex min-w-0 flex-1 flex-col overflow-hidden\">\r\n <!-- Right Header -->\r\n <div\r\n class=\"flex shrink-0 items-center justify-between border-b border-black/10 px-4 py-3\"\r\n [style.background-color]=\"headerBg()\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <div class=\"p-1.5 bg-surface-100 flex items-center rounded-xs\">\r\n <mt-icon [icon]=\"'general.building-02'\" />\r\n </div>\r\n\r\n <span class=\"text-xs font-semibold\" [style.color]=\"headerText()\">{{\r\n t(\"preview-organizations\")\r\n }}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Right Content -->\r\n <div\r\n class=\"flex-1 overflow-y-auto p-4\"\r\n [style.background-color]=\"contentBg()\"\r\n >\r\n <div class=\"flex flex-col gap-2\">\r\n @for (i of [1, 2, 3, 4, 5]; track i) {\r\n <div\r\n class=\"rounded-lg bg-surface-100 px-3 py-2.5 text-xs text-surface-600 border border-surface-200\"\r\n >\r\n {{ t(\"preview-content-row\") }} {{ i }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
|
|
635
|
+
}
|
|
636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PreviewLayoutPage, decorators: [{
|
|
637
|
+
type: Component,
|
|
638
|
+
args: [{ selector: 'mt-preview-layout-page', standalone: true, imports: [CommonModule, Icon, TranslocoDirective], template: "<ng-container *transloco=\"let t; prefix: 'brand-display'\">\r\n <h3 class=\"text-sm font-medium mb-3\">{{ t(\"preview\") }}</h3>\r\n\r\n <!-- Client Page Mockup -->\r\n <div\r\n class=\"overflow-hidden rounded-xl border border-surface-200 shadow-sm\"\r\n style=\"height: 420px\"\r\n >\r\n <div class=\"flex h-full\">\r\n <!-- Left Sidebar -->\r\n <div\r\n class=\"flex w-49 shrink-0 flex-col overflow-hidden\"\r\n [style.background-color]=\"sidebarBg()\"\r\n >\r\n <!-- Sidebar Header -->\r\n <div class=\"flex items-center gap-2 border-b border-black/10 px-4 py-3\">\r\n <mt-icon [icon]=\"'general.settings-01'\" />\r\n <span class=\"text-xs font-semibold\" [style.color]=\"sidebarText()\">{{\r\n t(\"preview-settings\")\r\n }}</span>\r\n </div>\r\n\r\n <!-- Sidebar Items -->\r\n <div class=\"flex-1 overflow-y-auto p-2\">\r\n @for (item of mockMenuItems; track item.label) {\r\n <div\r\n class=\"mb-1 flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 transition-colors hover:bg-black/5\"\r\n >\r\n <div class=\"p-1.5 bg-surface-100 flex items-center rounded-xs\">\r\n <mt-icon [icon]=\"item.icon\" />\r\n </div>\r\n <span\r\n [style.color]=\"sidebarText()\"\r\n class=\"min-w-0 flex-1 truncate text-xs font-medium\"\r\n >{{ t(item.label) }}</span\r\n >\r\n <span\r\n [style.color]=\"headerText()\"\r\n class=\"shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-semibold opacity-60\"\r\n [style.background-color]=\"sidebarText() + '22'\"\r\n >{{ item.count }}</span\r\n >\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Right Panel -->\r\n <div class=\"flex min-w-0 flex-1 flex-col overflow-hidden\">\r\n <!-- Right Header -->\r\n <div\r\n class=\"flex shrink-0 items-center justify-between border-b border-black/10 px-4 py-3\"\r\n [style.background-color]=\"headerBg()\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <div class=\"p-1.5 bg-surface-100 flex items-center rounded-xs\">\r\n <mt-icon [icon]=\"'general.building-02'\" />\r\n </div>\r\n\r\n <span class=\"text-xs font-semibold\" [style.color]=\"headerText()\">{{\r\n t(\"preview-organizations\")\r\n }}</span>\r\n </div>\r\n </div>\r\n\r\n <!-- Right Content -->\r\n <div\r\n class=\"flex-1 overflow-y-auto p-4\"\r\n [style.background-color]=\"contentBg()\"\r\n >\r\n <div class=\"flex flex-col gap-2\">\r\n @for (i of [1, 2, 3, 4, 5]; track i) {\r\n <div\r\n class=\"rounded-lg bg-surface-100 px-3 py-2.5 text-xs text-surface-600 border border-surface-200\"\r\n >\r\n {{ t(\"preview-content-row\") }} {{ i }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n" }]
|
|
578
639
|
}] });
|
|
579
640
|
|
|
580
641
|
class WhiteLabel {
|
|
@@ -586,6 +647,7 @@ class WhiteLabel {
|
|
|
586
647
|
const selectedTab = this.route.snapshot.firstChild?.data['componentType'];
|
|
587
648
|
this.selectedTab.set(selectedTab || 'main');
|
|
588
649
|
}
|
|
650
|
+
isPageLayoutTab = computed(() => this.selectedTab() === 'page-layout', ...(ngDevMode ? [{ debugName: "isPageLayoutTab" }] : /* istanbul ignore next */ []));
|
|
589
651
|
tabsList = [
|
|
590
652
|
{
|
|
591
653
|
label: this.translocoService.translate('brand-display.main'),
|
|
@@ -603,6 +665,10 @@ class WhiteLabel {
|
|
|
603
665
|
label: this.translocoService.translate('brand-display.content-area'),
|
|
604
666
|
value: 'content-area',
|
|
605
667
|
},
|
|
668
|
+
{
|
|
669
|
+
label: this.translocoService.translate('brand-display.page-layout'),
|
|
670
|
+
value: 'page-layout',
|
|
671
|
+
},
|
|
606
672
|
];
|
|
607
673
|
onTabChange(event) {
|
|
608
674
|
if (event) {
|
|
@@ -610,11 +676,18 @@ class WhiteLabel {
|
|
|
610
676
|
}
|
|
611
677
|
}
|
|
612
678
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WhiteLabel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
613
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WhiteLabel, isStandalone: true, selector: "mt-white-label", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'brand-display'\">\r\n <div class=\"mt-7 overflow-x-auto pb-1\">\r\n <mt-tabs\r\n class=\"min-w-max\"\r\n [(active)]=\"selectedTab\"\r\n [options]=\"tabsList\"\r\n size=\"large\"\r\n (onChange)=\"onTabChange($event)\"\r\n />\r\n </div>\r\n <div\r\n class=\"mt-4 grid min-h-0 gap-6 xl:grid-cols-[minmax(0,3fr)_minmax(20rem,2fr)] xl:gap-10\"\r\n >\r\n <div class=\"min-w-0\">\r\n <router-outlet />\r\n </div>\r\n <div class=\"min-w-0 xl:sticky xl:top-4 xl:self-start\">\r\n @if (isPageLayoutTab()) {\r\n <mt-preview-layout-page />\r\n } @else {\r\n <h3 class=\"text-sm font-medium mb-3\">{{ t(\"preview\") }}</h3>\r\n <mt-preview-brand></mt-preview-brand>\r\n }\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: PreviewBrand, selector: "mt-preview-brand" }, { kind: "component", type: PreviewLayoutPage, selector: "mt-preview-layout-page" }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
|
|
614
680
|
}
|
|
615
681
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WhiteLabel, decorators: [{
|
|
616
682
|
type: Component,
|
|
617
|
-
args: [{ selector: 'mt-white-label', standalone: true, imports: [
|
|
683
|
+
args: [{ selector: 'mt-white-label', standalone: true, imports: [
|
|
684
|
+
CommonModule,
|
|
685
|
+
Tabs,
|
|
686
|
+
RouterOutlet,
|
|
687
|
+
PreviewBrand,
|
|
688
|
+
PreviewLayoutPage,
|
|
689
|
+
TranslocoDirective,
|
|
690
|
+
], template: "<ng-container *transloco=\"let t; prefix: 'brand-display'\">\r\n <div class=\"mt-7 overflow-x-auto pb-1\">\r\n <mt-tabs\r\n class=\"min-w-max\"\r\n [(active)]=\"selectedTab\"\r\n [options]=\"tabsList\"\r\n size=\"large\"\r\n (onChange)=\"onTabChange($event)\"\r\n />\r\n </div>\r\n <div\r\n class=\"mt-4 grid min-h-0 gap-6 xl:grid-cols-[minmax(0,3fr)_minmax(20rem,2fr)] xl:gap-10\"\r\n >\r\n <div class=\"min-w-0\">\r\n <router-outlet />\r\n </div>\r\n <div class=\"min-w-0 xl:sticky xl:top-4 xl:self-start\">\r\n @if (isPageLayoutTab()) {\r\n <mt-preview-layout-page />\r\n } @else {\r\n <h3 class=\"text-sm font-medium mb-3\">{{ t(\"preview\") }}</h3>\r\n <mt-preview-brand></mt-preview-brand>\r\n }\r\n </div>\r\n </div>\r\n</ng-container>\r\n" }]
|
|
618
691
|
}] });
|
|
619
692
|
|
|
620
693
|
class MainDisplay {
|
|
@@ -953,6 +1026,10 @@ class PreviewLogin {
|
|
|
953
1026
|
return (value?.backgroundColor ||
|
|
954
1027
|
this.DEFAULT_DISPLAY_DATA()?.login?.backgroundColor);
|
|
955
1028
|
}, ...(ngDevMode ? [{ debugName: "previewBackgroundColor" }] : /* istanbul ignore next */ []));
|
|
1029
|
+
previewTextColor = computed(() => {
|
|
1030
|
+
const value = this.manageBrnding.draftLoginData();
|
|
1031
|
+
return value?.textColor || this.DEFAULT_DISPLAY_DATA()?.login?.textColor;
|
|
1032
|
+
}, ...(ngDevMode ? [{ debugName: "previewTextColor" }] : /* istanbul ignore next */ []));
|
|
956
1033
|
repeated = computed(() => {
|
|
957
1034
|
const v = this.manageBrnding.draftLoginData();
|
|
958
1035
|
return v?.repeated || this.DEFAULT_DISPLAY_DATA()?.login?.repeated;
|
|
@@ -968,11 +1045,11 @@ class PreviewLogin {
|
|
|
968
1045
|
}, ...(ngDevMode ? [{ debugName: "previewLogoSrc" }] : /* istanbul ignore next */ []));
|
|
969
1046
|
backgroundImage = this.manageBrnding.draftLoginBackgroundImage;
|
|
970
1047
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PreviewLogin, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
971
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PreviewLogin, isStandalone: true, selector: "mt-preview-login", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: '
|
|
1048
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PreviewLogin, isStandalone: true, selector: "mt-preview-login", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'brand-display'\">\r\n <div class=\"xl:sticky xl:top-4\">\r\n <h3 class=\"text-sm font-medium mb-3\">{{ t(\"preview\") }}</h3>\r\n <div\r\n class=\"relative overflow-hidden rounded-lg aspect-[4/5] sm:aspect-[16/10]\"\r\n [style]=\"{\r\n 'background-color': previewBackgroundColor(),\r\n 'background-size': repeated() ? 'auto' : 'cover',\r\n 'background-repeat': repeated() ? 'repeat' : 'no-repeat',\r\n 'background-position': 'center',\r\n }\"\r\n [style.backgroundImage]=\"\r\n backgroundImage() ? (backgroundImage() | secureImage) : null\r\n \"\r\n >\r\n <div\r\n class=\"absolute inset-0 flex items-center p-4 max-[640px]:flex-col max-[640px]:justify-center max-[640px]:gap-4 sm:p-8\"\r\n >\r\n @if (previewFormPosition() !== \"center\") {\r\n <div\r\n class=\"logo flex min-w-0 mx-auto flex-col items-start gap-2 max-[640px]:order-1 max-[640px]:w-full max-[640px]:flex-none\"\r\n [class]=\"{\r\n 'order-2': previewFormPosition() === 'start',\r\n 'order-1': previewFormPosition() === 'end',\r\n }\"\r\n >\r\n <img\r\n [src]=\"\r\n previewLogoSrc()\r\n ? (previewLogoSrc() | secureImage: true)\r\n : DEFAULT_DISPLAY_DATA()?.loginLogo\r\n \"\r\n alt=\"Logo\"\r\n class=\"h-8 sm:h-12 sm:w-12\"\r\n />\r\n <div\r\n class=\"text-center text-base text-white text-xs\"\r\n [style.color]=\"previewTextColor()\"\r\n >\r\n {{ t(\"project-management-system\") }}\r\n </div>\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"flex-shrink-0 max-[640px]:order-2 max-[640px]:w-full\"\r\n [class]=\"{\r\n 'order-1': previewFormPosition() === 'start',\r\n 'order-2': previewFormPosition() === 'end',\r\n 'mx-auto': previewFormPosition() === 'center',\r\n }\"\r\n >\r\n @if (previewFormPosition() === \"center\") {\r\n <div class=\"logo flex flex-col items-center gap-2 mb-4\">\r\n <img\r\n [src]=\"\r\n previewLogoSrc()\r\n ? (previewLogoSrc() | secureImage: true)\r\n : DEFAULT_DISPLAY_DATA()?.loginLogo\r\n \"\r\n alt=\"Logo\"\r\n class=\"h-8 sm:h-12 sm:w-12\"\r\n />\r\n <div\r\n class=\"text-center text-base text-white text-xs\"\r\n [style.color]=\"previewTextColor()\"\r\n >\r\n {{ t(\"portfolio-management-system\") }}\r\n </div>\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"glass-card relative z-10 w-full max-w-[15rem] rounded-lg px-4 py-3 sm:w-60 sm:px-6\"\r\n [style.color]=\"previewTextColor()\"\r\n >\r\n <div class=\"text-center mb-3 mt-4\">\r\n <h4 class=\"text-[14px] font-bold mb-1\">{{ t(\"signin\") }}</h4>\r\n <p class=\"text-[8px]\">{{ t(\"info-msg\") }}</p>\r\n </div>\r\n\r\n <div class=\"space-y-3\">\r\n <div>\r\n <label class=\"text-[8px] block text-xs mb-1\">{{\r\n t(\"username\")\r\n }}</label>\r\n <div\r\n class=\"text-[8px] rounded px-3 py-2 bg-white/90 text-gray-600!\"\r\n >\r\n {{ t(\"username\") }}\r\n </div>\r\n </div>\r\n <div>\r\n <label class=\"text-[8px] block mb-1\">{{ t(\"password\") }}</label>\r\n <div\r\n class=\"text-[8px] rounded px-3 py-2 bg-white/90 text-gray-600!\"\r\n >\r\n {{ t(\"password\") }}\r\n </div>\r\n </div>\r\n <button\r\n class=\"w-full mb-1 bg-primary text-white rounded py-2 text-[9px] font-medium\"\r\n >\r\n {{ t(\"sign-in\") }}\r\n </button>\r\n <div class=\"text-center\">\r\n <a class=\"text-[11px] text-primary\"> English </a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"text-center mt-3 text-[8px]\">\r\n {{ t(\"tagline\") }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: ["@charset \"UTF-8\";.glass-card{background:#ffffff26;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);box-shadow:0 8px 32px #0003}.glass-card{color:#fff}.glass-card *:not(input):not(button):not([class*=p-]){color:inherit!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }] });
|
|
972
1049
|
}
|
|
973
1050
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PreviewLogin, decorators: [{
|
|
974
1051
|
type: Component,
|
|
975
|
-
args: [{ selector: 'mt-preview-login', standalone: true, imports: [CommonModule, TranslocoDirective, SecureImagePipe], template: "<ng-container *transloco=\"let t; prefix: '
|
|
1052
|
+
args: [{ selector: 'mt-preview-login', standalone: true, imports: [CommonModule, TranslocoDirective, SecureImagePipe], template: "<ng-container *transloco=\"let t; prefix: 'brand-display'\">\r\n <div class=\"xl:sticky xl:top-4\">\r\n <h3 class=\"text-sm font-medium mb-3\">{{ t(\"preview\") }}</h3>\r\n <div\r\n class=\"relative overflow-hidden rounded-lg aspect-[4/5] sm:aspect-[16/10]\"\r\n [style]=\"{\r\n 'background-color': previewBackgroundColor(),\r\n 'background-size': repeated() ? 'auto' : 'cover',\r\n 'background-repeat': repeated() ? 'repeat' : 'no-repeat',\r\n 'background-position': 'center',\r\n }\"\r\n [style.backgroundImage]=\"\r\n backgroundImage() ? (backgroundImage() | secureImage) : null\r\n \"\r\n >\r\n <div\r\n class=\"absolute inset-0 flex items-center p-4 max-[640px]:flex-col max-[640px]:justify-center max-[640px]:gap-4 sm:p-8\"\r\n >\r\n @if (previewFormPosition() !== \"center\") {\r\n <div\r\n class=\"logo flex min-w-0 mx-auto flex-col items-start gap-2 max-[640px]:order-1 max-[640px]:w-full max-[640px]:flex-none\"\r\n [class]=\"{\r\n 'order-2': previewFormPosition() === 'start',\r\n 'order-1': previewFormPosition() === 'end',\r\n }\"\r\n >\r\n <img\r\n [src]=\"\r\n previewLogoSrc()\r\n ? (previewLogoSrc() | secureImage: true)\r\n : DEFAULT_DISPLAY_DATA()?.loginLogo\r\n \"\r\n alt=\"Logo\"\r\n class=\"h-8 sm:h-12 sm:w-12\"\r\n />\r\n <div\r\n class=\"text-center text-base text-white text-xs\"\r\n [style.color]=\"previewTextColor()\"\r\n >\r\n {{ t(\"project-management-system\") }}\r\n </div>\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"flex-shrink-0 max-[640px]:order-2 max-[640px]:w-full\"\r\n [class]=\"{\r\n 'order-1': previewFormPosition() === 'start',\r\n 'order-2': previewFormPosition() === 'end',\r\n 'mx-auto': previewFormPosition() === 'center',\r\n }\"\r\n >\r\n @if (previewFormPosition() === \"center\") {\r\n <div class=\"logo flex flex-col items-center gap-2 mb-4\">\r\n <img\r\n [src]=\"\r\n previewLogoSrc()\r\n ? (previewLogoSrc() | secureImage: true)\r\n : DEFAULT_DISPLAY_DATA()?.loginLogo\r\n \"\r\n alt=\"Logo\"\r\n class=\"h-8 sm:h-12 sm:w-12\"\r\n />\r\n <div\r\n class=\"text-center text-base text-white text-xs\"\r\n [style.color]=\"previewTextColor()\"\r\n >\r\n {{ t(\"portfolio-management-system\") }}\r\n </div>\r\n </div>\r\n }\r\n\r\n <div\r\n class=\"glass-card relative z-10 w-full max-w-[15rem] rounded-lg px-4 py-3 sm:w-60 sm:px-6\"\r\n [style.color]=\"previewTextColor()\"\r\n >\r\n <div class=\"text-center mb-3 mt-4\">\r\n <h4 class=\"text-[14px] font-bold mb-1\">{{ t(\"signin\") }}</h4>\r\n <p class=\"text-[8px]\">{{ t(\"info-msg\") }}</p>\r\n </div>\r\n\r\n <div class=\"space-y-3\">\r\n <div>\r\n <label class=\"text-[8px] block text-xs mb-1\">{{\r\n t(\"username\")\r\n }}</label>\r\n <div\r\n class=\"text-[8px] rounded px-3 py-2 bg-white/90 text-gray-600!\"\r\n >\r\n {{ t(\"username\") }}\r\n </div>\r\n </div>\r\n <div>\r\n <label class=\"text-[8px] block mb-1\">{{ t(\"password\") }}</label>\r\n <div\r\n class=\"text-[8px] rounded px-3 py-2 bg-white/90 text-gray-600!\"\r\n >\r\n {{ t(\"password\") }}\r\n </div>\r\n </div>\r\n <button\r\n class=\"w-full mb-1 bg-primary text-white rounded py-2 text-[9px] font-medium\"\r\n >\r\n {{ t(\"sign-in\") }}\r\n </button>\r\n <div class=\"text-center\">\r\n <a class=\"text-[11px] text-primary\"> English </a>\r\n </div>\r\n </div>\r\n\r\n <div class=\"text-center mt-3 text-[8px]\">\r\n {{ t(\"tagline\") }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</ng-container>\r\n", styles: ["@charset \"UTF-8\";.glass-card{background:#ffffff26;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);box-shadow:0 8px 32px #0003}.glass-card{color:#fff}.glass-card *:not(input):not(button):not([class*=p-]){color:inherit!important}\n"] }]
|
|
976
1053
|
}] });
|
|
977
1054
|
|
|
978
1055
|
class LoginDisplay {
|
|
@@ -981,6 +1058,7 @@ class LoginDisplay {
|
|
|
981
1058
|
DEFAULT_DISPLAY_DATA = this.facade.defaultBrandDisplayData;
|
|
982
1059
|
loginFormControl = new FormControl({
|
|
983
1060
|
backgroundColor: this.DEFAULT_DISPLAY_DATA()?.login?.backgroundColor,
|
|
1061
|
+
textColor: this.DEFAULT_DISPLAY_DATA()?.login?.textColor,
|
|
984
1062
|
repeated: this.DEFAULT_DISPLAY_DATA()?.login?.repeated,
|
|
985
1063
|
formWizardPosition: this.DEFAULT_DISPLAY_DATA()?.login?.formWizardPosition,
|
|
986
1064
|
});
|
|
@@ -1011,6 +1089,13 @@ class LoginDisplay {
|
|
|
1011
1089
|
order: 3,
|
|
1012
1090
|
colSpan: 6,
|
|
1013
1091
|
},
|
|
1092
|
+
{
|
|
1093
|
+
key: 'textColor',
|
|
1094
|
+
type: 'color-picker',
|
|
1095
|
+
label: this.translocoService.translate('brand-display.text-color'),
|
|
1096
|
+
order: 4,
|
|
1097
|
+
colSpan: 6,
|
|
1098
|
+
},
|
|
1014
1099
|
new UploadFileFieldConfig({
|
|
1015
1100
|
key: 'backgroundImage',
|
|
1016
1101
|
label: this.translocoService.translate('brand-display.background-image'),
|
|
@@ -1101,9 +1186,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1101
1186
|
], template: "<ng-container *transloco=\"let t; prefix: 'brand-display'\">\r\n <div\r\n class=\"mt-6 grid min-h-0 gap-6 xl:grid-cols-[minmax(0,3fr)_minmax(20rem,2fr)] xl:gap-10\"\r\n >\r\n <!-- Left Side - Login Settings -->\r\n <div class=\"min-w-0\">\r\n <mt-card id=\"login-settings\" [title]=\"t('login-settings')\">\r\n <form class=\"col-span-1 p-2\">\r\n <mt-dynamic-form\r\n [formConfig]=\"loginFormConfig()\"\r\n [formControl]=\"loginFormControl\"\r\n />\r\n </form>\r\n </mt-card>\r\n </div>\r\n\r\n <!-- Right Side - Preview -->\r\n <div class=\"min-w-0 xl:sticky xl:top-4 xl:self-start\">\r\n <mt-preview-login></mt-preview-login>\r\n </div>\r\n </div>\r\n</ng-container>\r\n" }]
|
|
1102
1187
|
}], ctorParameters: () => [] });
|
|
1103
1188
|
|
|
1189
|
+
class PageLayoutDisplay {
|
|
1190
|
+
translocoService = inject(TranslocoService);
|
|
1191
|
+
facade = inject(BrandDisplayFacade);
|
|
1192
|
+
DEFAULT_DISPLAY_DATA = this.facade.defaultBrandDisplayData;
|
|
1193
|
+
brandDisplayData = this.facade.draftBrandDisplayData;
|
|
1194
|
+
pageLayoutFormControl = new FormControl({
|
|
1195
|
+
headerBackgroundColor: this.DEFAULT_DISPLAY_DATA()?.pageLayout?.headerBackgroundColor,
|
|
1196
|
+
headerTextColor: this.DEFAULT_DISPLAY_DATA()?.pageLayout?.headerTextColor,
|
|
1197
|
+
sidebarBackgroundColor: this.DEFAULT_DISPLAY_DATA()?.pageLayout?.sidebarBackgroundColor,
|
|
1198
|
+
sidebarTextColor: this.DEFAULT_DISPLAY_DATA()?.pageLayout?.sidebarTextColor,
|
|
1199
|
+
contentBackgroundColor: this.DEFAULT_DISPLAY_DATA()?.pageLayout?.contentBackgroundColor,
|
|
1200
|
+
});
|
|
1201
|
+
ngOnInit() {
|
|
1202
|
+
const localFormData = {
|
|
1203
|
+
...this.pageLayoutFormControl.value,
|
|
1204
|
+
...this.brandDisplayData()?.pageLayout,
|
|
1205
|
+
};
|
|
1206
|
+
this.pageLayoutFormControl.patchValue(localFormData, { emitEvent: false });
|
|
1207
|
+
this.pageLayoutFormControl.valueChanges.subscribe((value) => {
|
|
1208
|
+
this.facade.updateBrandDisplayDataLocally({
|
|
1209
|
+
pageLayout: {
|
|
1210
|
+
headerBackgroundColor: value.headerBackgroundColor,
|
|
1211
|
+
headerTextColor: value.headerTextColor,
|
|
1212
|
+
sidebarBackgroundColor: value.sidebarBackgroundColor,
|
|
1213
|
+
sidebarTextColor: value.sidebarTextColor,
|
|
1214
|
+
contentBackgroundColor: value.contentBackgroundColor,
|
|
1215
|
+
},
|
|
1216
|
+
});
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1219
|
+
pageLayoutConfig = signal({
|
|
1220
|
+
sections: [
|
|
1221
|
+
{
|
|
1222
|
+
key: 'pageLayoutSection',
|
|
1223
|
+
label: '',
|
|
1224
|
+
type: 'none',
|
|
1225
|
+
order: 1,
|
|
1226
|
+
fields: [
|
|
1227
|
+
new ColorPickerFieldConfig({
|
|
1228
|
+
key: 'headerBackgroundColor',
|
|
1229
|
+
label: this.translocoService.translate('brand-display.header-background-color'),
|
|
1230
|
+
order: 3,
|
|
1231
|
+
colSpan: 6,
|
|
1232
|
+
}),
|
|
1233
|
+
new ColorPickerFieldConfig({
|
|
1234
|
+
key: 'headerTextColor',
|
|
1235
|
+
label: this.translocoService.translate('brand-display.header-text-color'),
|
|
1236
|
+
order: 4,
|
|
1237
|
+
colSpan: 6,
|
|
1238
|
+
}),
|
|
1239
|
+
new ColorPickerFieldConfig({
|
|
1240
|
+
key: 'sidebarBackgroundColor',
|
|
1241
|
+
label: this.translocoService.translate('brand-display.side-bar-background-color'),
|
|
1242
|
+
order: 1,
|
|
1243
|
+
colSpan: 6,
|
|
1244
|
+
}),
|
|
1245
|
+
new ColorPickerFieldConfig({
|
|
1246
|
+
key: 'sidebarTextColor',
|
|
1247
|
+
label: this.translocoService.translate('brand-display.side-bar-text-color'),
|
|
1248
|
+
order: 2,
|
|
1249
|
+
colSpan: 6,
|
|
1250
|
+
}),
|
|
1251
|
+
new ColorPickerFieldConfig({
|
|
1252
|
+
key: 'contentBackgroundColor',
|
|
1253
|
+
label: this.translocoService.translate('brand-display.content-background-color'),
|
|
1254
|
+
order: 5,
|
|
1255
|
+
colSpan: 6,
|
|
1256
|
+
}),
|
|
1257
|
+
],
|
|
1258
|
+
},
|
|
1259
|
+
],
|
|
1260
|
+
}, ...(ngDevMode ? [{ debugName: "pageLayoutConfig" }] : /* istanbul ignore next */ []));
|
|
1261
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PageLayoutDisplay, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1262
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: PageLayoutDisplay, isStandalone: true, selector: "mt-page-layout-display", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'brand-display'\">\r\n <mt-card id=\"page-layout\" [title]=\"t('page-layout')\">\r\n <form class=\"col-span-1 p-2\">\r\n <mt-dynamic-form\r\n [formConfig]=\"pageLayoutConfig()\"\r\n [formControl]=\"pageLayoutFormControl\"\r\n />\r\n </form>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
1263
|
+
}
|
|
1264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PageLayoutDisplay, decorators: [{
|
|
1265
|
+
type: Component,
|
|
1266
|
+
args: [{ selector: 'mt-page-layout-display', standalone: true, imports: [
|
|
1267
|
+
CommonModule,
|
|
1268
|
+
Card,
|
|
1269
|
+
TranslocoDirective,
|
|
1270
|
+
DynamicForm,
|
|
1271
|
+
ReactiveFormsModule,
|
|
1272
|
+
], template: "<ng-container *transloco=\"let t; prefix: 'brand-display'\">\r\n <mt-card id=\"page-layout\" [title]=\"t('page-layout')\">\r\n <form class=\"col-span-1 p-2\">\r\n <mt-dynamic-form\r\n [formConfig]=\"pageLayoutConfig()\"\r\n [formControl]=\"pageLayoutFormControl\"\r\n />\r\n </form>\r\n </mt-card>\r\n</ng-container>\r\n" }]
|
|
1273
|
+
}] });
|
|
1274
|
+
|
|
1104
1275
|
/**
|
|
1105
1276
|
* Generated bundle index. Do not edit.
|
|
1106
1277
|
*/
|
|
1107
1278
|
|
|
1108
|
-
export { BrandDisplay, BrandDisplayActionKey, BrandDisplayFacade, BrandDisplayState, ContentArea, FaviconService, GetBrandDisplay, HeaderSidebarDisplay, LoginDisplay, MainDisplay, ManageBrndingService, PreviewBrand, PreviewLogin, UpdateBrandDisplayData, UpdateBrandDisplayDataLocally, WhiteLabel };
|
|
1279
|
+
export { BrandDisplay, BrandDisplayActionKey, BrandDisplayFacade, BrandDisplayState, ContentArea, FaviconService, GetBrandDisplay, HeaderSidebarDisplay, LoginDisplay, MainDisplay, ManageBrndingService, PageLayoutDisplay, PreviewBrand, PreviewLayoutPage, PreviewLogin, UpdateBrandDisplayData, UpdateBrandDisplayDataLocally, WhiteLabel };
|
|
1109
1280
|
//# sourceMappingURL=masterteam-brand-display.mjs.map
|