@ngx-smz/core 19.5.2 → 19.6.0
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.
|
@@ -35598,39 +35598,43 @@ class ThemeManagerComponent {
|
|
|
35598
35598
|
currentContentTheme;
|
|
35599
35599
|
contentLink;
|
|
35600
35600
|
constructor(store, themeManagerService) {
|
|
35601
|
+
// TODO: Esse código deve ser removido após a implementação do tema do primeng
|
|
35602
|
+
// O prime na versão 19 modificou a forma de como os temas são aplicados
|
|
35601
35603
|
this.store = store;
|
|
35602
35604
|
this.themeManagerService = themeManagerService;
|
|
35603
|
-
|
|
35604
|
-
//
|
|
35605
|
-
this.contentLink
|
|
35606
|
-
this.contentLink.setAttribute('
|
|
35607
|
-
this.
|
|
35608
|
-
|
|
35609
|
-
|
|
35610
|
-
|
|
35611
|
-
|
|
35612
|
-
|
|
35613
|
-
|
|
35614
|
-
|
|
35615
|
-
|
|
35616
|
-
|
|
35617
|
-
|
|
35618
|
-
|
|
35619
|
-
|
|
35620
|
-
|
|
35621
|
-
|
|
35622
|
-
});
|
|
35623
|
-
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event =>
|
|
35624
|
-
|
|
35625
|
-
|
|
35626
|
-
|
|
35627
|
-
|
|
35628
|
-
|
|
35629
|
-
|
|
35630
|
-
|
|
35631
|
-
|
|
35632
|
-
|
|
35633
|
-
|
|
35605
|
+
// this.contentLink = this.themeManagerService._document.createElement('link');
|
|
35606
|
+
// this.contentLink.setAttribute('rel', 'stylesheet');
|
|
35607
|
+
// this.contentLink.setAttribute('type', 'text/css');
|
|
35608
|
+
// this.contentLink.setAttribute('href', '');
|
|
35609
|
+
// this.store
|
|
35610
|
+
// .select(LayoutUiSelectors.contentTheme)
|
|
35611
|
+
// .subscribe((newTheme) =>
|
|
35612
|
+
// {
|
|
35613
|
+
// if (newTheme !== this.currentContentTheme)
|
|
35614
|
+
// {
|
|
35615
|
+
// console.log('newTheme', newTheme);
|
|
35616
|
+
// this.contentLink.setAttribute('href', newTheme);
|
|
35617
|
+
// this.currentContentTheme = newTheme;
|
|
35618
|
+
// // Adicioar estilos de content da lib
|
|
35619
|
+
// this.themeManagerService._document.head.appendChild(this.contentLink);
|
|
35620
|
+
// // Adicionar estilos prioritários do projeto client
|
|
35621
|
+
// this.themeManagerService.propagate();
|
|
35622
|
+
// // console.log(this.themeManagerService._document.styleSheets);
|
|
35623
|
+
// }
|
|
35624
|
+
// });
|
|
35625
|
+
// window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event =>
|
|
35626
|
+
// {
|
|
35627
|
+
// const systemColor = event.matches ? "dark" : "light";
|
|
35628
|
+
// switch (systemColor)
|
|
35629
|
+
// {
|
|
35630
|
+
// case 'dark':
|
|
35631
|
+
// this.store.dispatch(new LayoutUiActions.SetContentTheme(GlobalInjector.config.layouts.themes.system.dark));
|
|
35632
|
+
// break;
|
|
35633
|
+
// case 'light':
|
|
35634
|
+
// this.store.dispatch(new LayoutUiActions.SetContentTheme(GlobalInjector.config.layouts.themes.system.light));
|
|
35635
|
+
// break;
|
|
35636
|
+
// }
|
|
35637
|
+
// });
|
|
35634
35638
|
}
|
|
35635
35639
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ThemeManagerComponent, deps: [{ token: i1$5.Store }, { token: ThemeManagerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
35636
35640
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: ThemeManagerComponent, isStandalone: false, selector: "smz-ui-theme-manager", ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|