diff --git a/package.json b/package.json index 33d94b3..4724df6 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,10 @@ "scripts": { "ng": "ng", "start": "ng serve --proxy-config proxy.config.local.json ", - "build": "ng build --configuration=production && gzipper compress --verbose --gzip --brotli ./dist/public-pool-ui/", + "build": "ng build --configuration=production && gzipper compress --gzip --brotli ./dist/public-pool-ui/", "watch": "ng build --watch --configuration development", "test": "ng test", - "bundle-report": "ng build --configuration=production --stats-json && webpack-bundle-analyzer dist/public-pool-ui/stats.json" + "bundle-report": "ng build --configuration=production --source-map=true --named-chunks=true --stats-json && webpack-bundle-analyzer dist/public-pool-ui/stats.json" }, "private": true, "dependencies": { diff --git a/src/app/layout/app.layout.module.ts b/src/app/layout/app.layout.module.ts index 52bc4e5..3a58046 100644 --- a/src/app/layout/app.layout.module.ts +++ b/src/app/layout/app.layout.module.ts @@ -1,23 +1,24 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { InputTextModule } from 'primeng/inputtext'; -import { SidebarModule } from 'primeng/sidebar'; +import { RouterModule } from '@angular/router'; import { BadgeModule } from 'primeng/badge'; -import { RadioButtonModule } from 'primeng/radiobutton'; import { InputSwitchModule } from 'primeng/inputswitch'; +import { InputTextModule } from 'primeng/inputtext'; +import { RadioButtonModule } from 'primeng/radiobutton'; import { RippleModule } from 'primeng/ripple'; +import { SidebarModule } from 'primeng/sidebar'; + +import { AppFooterComponent } from './app.footer.component'; +import { AppLayoutComponent } from './app.layout.component'; import { AppMenuComponent } from './app.menu.component'; import { AppMenuitemComponent } from './app.menuitem.component'; -import { RouterModule } from '@angular/router'; +import { AppSidebarComponent } from './app.sidebar.component'; import { AppTopBarComponent } from './app.topbar.component'; -import { AppFooterComponent } from './app.footer.component'; -import { AppConfigModule } from './config/config.module'; -import { AppSidebarComponent } from "./app.sidebar.component"; -import { AppLayoutComponent } from "./app.layout.component"; +//import { AppConfigModule } from './config/config.module'; @NgModule({ declarations: [ AppMenuitemComponent, @@ -39,7 +40,7 @@ import { AppLayoutComponent } from "./app.layout.component"; InputSwitchModule, RippleModule, RouterModule, - AppConfigModule + // AppConfigModule ], exports: [AppLayoutComponent] }) diff --git a/src/app/layout/config/app.config.component.html b/src/app/layout/config/app.config.component.html deleted file mode 100644 index a1549f6..0000000 --- a/src/app/layout/config/app.config.component.html +++ /dev/null @@ -1,242 +0,0 @@ - - - -
Scale
-
- -
- -
- -
- - -
Menu Type
-
- - -
-
- - -
-
- - -
Input Style
-
-
- - -
-
- - -
-
- -
Ripple Effect
- -
- - -
Bootstrap
-
-
- -
-
- -
-
- -
-
- -
-
- -
Material Design
-
-
- -
-
- -
-
- -
-
- -
-
- -
Material Design Compact
-
-
- -
-
- -
-
- -
-
- -
-
- -
Tailwind
-
-
- -
-
- -
Fluent UI
-
-
- -
-
- -
PrimeOne Design - 2022
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
PrimeOne Design - 2021
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
diff --git a/src/app/layout/config/app.config.component.ts b/src/app/layout/config/app.config.component.ts deleted file mode 100644 index fb3bb7b..0000000 --- a/src/app/layout/config/app.config.component.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { LayoutService } from "../service/app.layout.service"; -import { MenuService } from "../app.menu.service"; - -@Component({ - selector: 'app-config', - templateUrl: './app.config.component.html' -}) -export class AppConfigComponent { - - @Input() minimal: boolean = false; - - scales: number[] = [12, 13, 14, 15, 16]; - - constructor(public layoutService: LayoutService, public menuService: MenuService) { } - - get visible(): boolean { - return this.layoutService.state.configSidebarVisible; - } - - set visible(_val: boolean) { - this.layoutService.state.configSidebarVisible = _val; - } - - get scale(): number { - return this.layoutService.config.scale; - } - - set scale(_val: number) { - this.layoutService.config.scale = _val; - } - - get menuMode(): string { - return this.layoutService.config.menuMode; - } - - set menuMode(_val: string) { - this.layoutService.config.menuMode = _val; - } - - get inputStyle(): string { - return this.layoutService.config.inputStyle; - } - - set inputStyle(_val: string) { - this.layoutService.config.inputStyle = _val; - } - - get ripple(): boolean { - return this.layoutService.config.ripple; - } - - set ripple(_val: boolean) { - this.layoutService.config.ripple = _val; - } - - onConfigButtonClick() { - this.layoutService.showConfigSidebar(); - } - - changeTheme(theme: string, colorScheme: string) { - const themeLink = document.getElementById('theme-css'); - const newHref = themeLink.getAttribute('href')!.replace(this.layoutService.config.theme, theme); - this.layoutService.config.colorScheme - this.replaceThemeLink(newHref, () => { - this.layoutService.config.theme = theme; - this.layoutService.config.colorScheme = colorScheme; - this.layoutService.onConfigUpdate(); - }); - } - - replaceThemeLink(href: string, onComplete: Function) { - const id = 'theme-css'; - const themeLink = document.getElementById('theme-css'); - const cloneLinkElement = themeLink.cloneNode(true); - - cloneLinkElement.setAttribute('href', href); - cloneLinkElement.setAttribute('id', id + '-clone'); - - themeLink.parentNode!.insertBefore(cloneLinkElement, themeLink.nextSibling); - - cloneLinkElement.addEventListener('load', () => { - themeLink.remove(); - cloneLinkElement.setAttribute('id', id); - onComplete(); - }); - } - - decrementScale() { - this.scale--; - this.applyScale(); - } - - incrementScale() { - this.scale++; - this.applyScale(); - } - - applyScale() { - document.documentElement.style.fontSize = this.scale + 'px'; - } -} diff --git a/src/app/layout/config/config.module.ts b/src/app/layout/config/config.module.ts deleted file mode 100644 index 2c00f85..0000000 --- a/src/app/layout/config/config.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { SidebarModule } from 'primeng/sidebar'; -import { RadioButtonModule } from 'primeng/radiobutton'; -import { ButtonModule } from 'primeng/button'; -import { InputSwitchModule } from 'primeng/inputswitch'; -import { AppConfigComponent } from './app.config.component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - SidebarModule, - RadioButtonModule, - ButtonModule, - InputSwitchModule - ], - declarations: [ - AppConfigComponent - ], - exports: [ - AppConfigComponent - ] -}) -export class AppConfigModule { } diff --git a/src/prime-ng.module.ts b/src/prime-ng.module.ts index cf12562..95b061a 100644 --- a/src/prime-ng.module.ts +++ b/src/prime-ng.module.ts @@ -1,32 +1,9 @@ import { NgModule } from '@angular/core'; import { ConfirmationService, MessageService } from 'primeng/api'; import { ButtonModule } from 'primeng/button'; -import { CalendarModule } from 'primeng/calendar'; -import { CardModule } from 'primeng/card'; import { ChartModule } from 'primeng/chart'; -import { CheckboxModule } from 'primeng/checkbox'; -import { ConfirmDialogModule } from 'primeng/confirmdialog'; -import { DataViewModule } from 'primeng/dataview'; -import { DialogModule } from 'primeng/dialog'; -import { DividerModule } from 'primeng/divider'; -import { DropdownModule } from 'primeng/dropdown'; -import { DynamicDialogModule } from 'primeng/dynamicdialog'; -import { FieldsetModule } from 'primeng/fieldset'; -import { InputNumberModule } from 'primeng/inputnumber'; import { InputSwitchModule } from 'primeng/inputswitch'; -import { InputTextModule } from 'primeng/inputtext'; -import { InputTextareaModule } from 'primeng/inputtextarea'; -import { MenuModule } from 'primeng/menu'; -import { OverlayPanelModule } from 'primeng/overlaypanel'; -import { PanelModule } from 'primeng/panel'; -import { ProgressSpinnerModule } from 'primeng/progressspinner'; -import { SelectButtonModule } from 'primeng/selectbutton'; -import { StepsModule } from 'primeng/steps'; -import { StyleClassModule } from 'primeng/styleclass'; import { TableModule } from 'primeng/table'; -import { TabViewModule } from 'primeng/tabview'; -import { TagModule } from 'primeng/tag'; -import { ToastModule } from 'primeng/toast'; @@ -36,33 +13,36 @@ export const primeNgServices = [ ] const primeNgModules = [ - ButtonModule, - DropdownModule, - ToastModule, - CheckboxModule, - CardModule, - DialogModule, - StepsModule, - InputTextModule, - DividerModule, - ProgressSpinnerModule, - DynamicDialogModule, - FieldsetModule, - CalendarModule, - InputTextareaModule, TableModule, - InputNumberModule, - ConfirmDialogModule, - TabViewModule, - MenuModule, - OverlayPanelModule, - DataViewModule, ChartModule, - TagModule, - StyleClassModule, - PanelModule, - SelectButtonModule, - InputSwitchModule + InputSwitchModule, + ButtonModule, + + // DropdownModule, + // ToastModule, + // CheckboxModule, + // CardModule, + // DialogModule, + // StepsModule, + // InputTextModule, + // DividerModule, + // ProgressSpinnerModule, + // DynamicDialogModule, + // FieldsetModule, + // InputTextareaModule, + + // InputNumberModule, + // ConfirmDialogModule, + // TabViewModule, + // MenuModule, + // OverlayPanelModule, + // DataViewModule, + + // TagModule, + // StyleClassModule, + // PanelModule, + // SelectButtonModule, + ];