@ngx-smz/core 19.5.3 → 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.
@@ -35148,7 +35148,6 @@ class SmzLayoutsConfig {
35148
35148
  useAvatar;
35149
35149
  avatarProperty;
35150
35150
  profileMessage;
35151
- useLegacyThemeManager;
35152
35151
  themes;
35153
35152
  toast;
35154
35153
  loader;
@@ -35599,43 +35598,43 @@ class ThemeManagerComponent {
35599
35598
  currentContentTheme;
35600
35599
  contentLink;
35601
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
35602
35603
  this.store = store;
35603
35604
  this.themeManagerService = themeManagerService;
35604
- if (!GlobalInjector.config.layouts.useLegacyThemeManager) {
35605
- console.log('useLegacyThemeManager is false');
35606
- return;
35607
- }
35608
- console.log('useLegacyThemeManager is true');
35609
- // TODO: Esse código deve ser removido após a implementação do tema do primeng
35610
- this.contentLink = this.themeManagerService._document.createElement('link');
35611
- this.contentLink.setAttribute('rel', 'stylesheet');
35612
- this.contentLink.setAttribute('type', 'text/css');
35613
- this.contentLink.setAttribute('href', '');
35614
- this.store
35615
- .select(LayoutUiSelectors.contentTheme)
35616
- .subscribe((newTheme) => {
35617
- if (newTheme !== this.currentContentTheme) {
35618
- console.log('newTheme', newTheme);
35619
- this.contentLink.setAttribute('href', newTheme);
35620
- this.currentContentTheme = newTheme;
35621
- // Adicioar estilos de content da lib
35622
- this.themeManagerService._document.head.appendChild(this.contentLink);
35623
- // Adicionar estilos prioritários do projeto client
35624
- this.themeManagerService.propagate();
35625
- // console.log(this.themeManagerService._document.styleSheets);
35626
- }
35627
- });
35628
- window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
35629
- const systemColor = event.matches ? "dark" : "light";
35630
- switch (systemColor) {
35631
- case 'dark':
35632
- this.store.dispatch(new LayoutUiActions.SetContentTheme(GlobalInjector.config.layouts.themes.system.dark));
35633
- break;
35634
- case 'light':
35635
- this.store.dispatch(new LayoutUiActions.SetContentTheme(GlobalInjector.config.layouts.themes.system.light));
35636
- break;
35637
- }
35638
- });
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
+ // });
35639
35638
  }
35640
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 });
35641
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 });