瀏覽代碼

Initial commit

Alex Ondoa 2 年之前
父節點
當前提交
706070c529
共有 100 個檔案被更改,包括 27097 行新增83 行删除
  1. 17458
    36
      Angular/package-lock.json
  2. 99
    22
      Angular/src/app/app-routing.module.ts
  3. 5
    0
      Angular/src/app/app.breadcrumb.component.html
  4. 1
    1
      Angular/src/app/app.component.ts
  5. 4
    4
      Angular/src/app/app.config.component.ts
  6. 1
    1
      Angular/src/app/app.footer.component.ts
  7. 21
    3
      Angular/src/app/app.inlinemenu.component.html
  8. 4
    5
      Angular/src/app/app.main.component.html
  9. 6
    2
      Angular/src/app/app.menu.component.ts
  10. 99
    2
      Angular/src/app/app.module.ts
  11. 24
    7
      Angular/src/app/app.topbar.component.html
  12. 20
    0
      Angular/src/app/demo/domain/customer.ts
  13. 6
    0
      Angular/src/app/demo/domain/image.ts
  14. 12
    0
      Angular/src/app/demo/domain/product.ts
  15. 15
    0
      Angular/src/app/demo/service/countryservice.ts
  16. 31
    0
      Angular/src/app/demo/service/customerservice.ts
  17. 15
    0
      Angular/src/app/demo/service/eventservice.ts
  18. 22
    0
      Angular/src/app/demo/service/iconservice.ts
  19. 34
    0
      Angular/src/app/demo/service/nodeservice.ts
  20. 17
    0
      Angular/src/app/demo/service/photoservice.ts
  21. 38
    0
      Angular/src/app/demo/service/productservice.ts
  22. 116
    0
      Angular/src/app/demo/view/buttondemo.component.html
  23. 28
    0
      Angular/src/app/demo/view/buttondemo.component.ts
  24. 42
    0
      Angular/src/app/demo/view/chartsdemo.component.html
  25. 304
    0
      Angular/src/app/demo/view/chartsdemo.component.ts
  26. 406
    0
      Angular/src/app/demo/view/dashboard.component.html
  27. 394
    0
      Angular/src/app/demo/view/dashboard.component.ts
  28. 358
    0
      Angular/src/app/demo/view/dashboardanalytics.component.html
  29. 629
    0
      Angular/src/app/demo/view/dashboardanalytics.component.ts
  30. 1302
    0
      Angular/src/app/demo/view/documentation.component.html
  31. 38
    0
      Angular/src/app/demo/view/documentation.component.ts
  32. 8
    0
      Angular/src/app/demo/view/emptydemo.component.html
  33. 15
    0
      Angular/src/app/demo/view/emptydemo.component.ts
  34. 19
    0
      Angular/src/app/demo/view/filedemo.component.html
  35. 31
    0
      Angular/src/app/demo/view/filedemo.component.ts
  36. 95
    0
      Angular/src/app/demo/view/floatlabeldemo.component.html
  37. 77
    0
      Angular/src/app/demo/view/floatlabeldemo.component.ts
  38. 5
    0
      Angular/src/app/demo/view/floatlabeldemo.scss
  39. 116
    0
      Angular/src/app/demo/view/formlayoutdemo.component.html
  40. 25
    0
      Angular/src/app/demo/view/formlayoutdemo.component.ts
  41. 243
    0
      Angular/src/app/demo/view/inputdemo.component.html
  42. 83
    0
      Angular/src/app/demo/view/inputdemo.component.ts
  43. 49
    0
      Angular/src/app/demo/view/invalidstatedemo.component.html
  44. 70
    0
      Angular/src/app/demo/view/invalidstatedemo.component.ts
  45. 84
    0
      Angular/src/app/demo/view/listdemo.component.html
  46. 73
    0
      Angular/src/app/demo/view/listdemo.component.ts
  47. 146
    0
      Angular/src/app/demo/view/listdemo.scss
  48. 54
    0
      Angular/src/app/demo/view/mediademo.component.html
  49. 71
    0
      Angular/src/app/demo/view/mediademo.component.ts
  50. 14
    0
      Angular/src/app/demo/view/mediademo.scss
  51. 89
    0
      Angular/src/app/demo/view/menusdemo.component.html
  52. 464
    0
      Angular/src/app/demo/view/menusdemo.component.ts
  53. 28
    0
      Angular/src/app/demo/view/menusdemo.scss
  54. 61
    0
      Angular/src/app/demo/view/messagesdemo.component.html
  55. 64
    0
      Angular/src/app/demo/view/messagesdemo.component.ts
  56. 165
    0
      Angular/src/app/demo/view/miscdemo.component.html
  57. 40
    0
      Angular/src/app/demo/view/miscdemo.component.ts
  58. 119
    0
      Angular/src/app/demo/view/overlaysdemo.component.html
  59. 83
    0
      Angular/src/app/demo/view/overlaysdemo.component.ts
  60. 8
    0
      Angular/src/app/demo/view/overlaysdemo.scss
  61. 261
    0
      Angular/src/app/demo/view/panelsdemo.component.html
  62. 60
    0
      Angular/src/app/demo/view/panelsdemo.component.ts
  63. 352
    0
      Angular/src/app/demo/view/tabledemo.component.html
  64. 114
    0
      Angular/src/app/demo/view/tabledemo.component.ts
  65. 201
    0
      Angular/src/app/demo/view/tabledemo.scss
  66. 37
    0
      Angular/src/app/demo/view/treedemo.component.html
  67. 49
    0
      Angular/src/app/demo/view/treedemo.component.ts
  68. 26
    0
      Angular/src/app/pages/app.accessdenied.component.html
  69. 9
    0
      Angular/src/app/pages/app.accessdenied.component.ts
  70. 36
    0
      Angular/src/app/pages/app.calendar.component.html
  71. 79
    0
      Angular/src/app/pages/app.calendar.component.ts
  72. 47
    0
      Angular/src/app/pages/app.contactus.component.html
  73. 9
    0
      Angular/src/app/pages/app.contactus.component.ts
  74. 138
    0
      Angular/src/app/pages/app.crud.component.html
  75. 148
    0
      Angular/src/app/pages/app.crud.component.ts
  76. 26
    0
      Angular/src/app/pages/app.error.component.html
  77. 9
    0
      Angular/src/app/pages/app.error.component.ts
  78. 107
    0
      Angular/src/app/pages/app.help.component.html
  79. 16
    0
      Angular/src/app/pages/app.help.component.ts
  80. 104
    0
      Angular/src/app/pages/app.invoice.component.html
  81. 74
    0
      Angular/src/app/pages/app.invoice.component.ts
  82. 187
    0
      Angular/src/app/pages/app.landing.component.html
  83. 78
    0
      Angular/src/app/pages/app.landing.component.ts
  84. 51
    0
      Angular/src/app/pages/app.login.component.html
  85. 9
    0
      Angular/src/app/pages/app.login.component.ts
  86. 26
    0
      Angular/src/app/pages/app.notfound.component.html
  87. 9
    0
      Angular/src/app/pages/app.notfound.component.ts
  88. 34
    0
      Angular/src/app/pages/app.timelinedemo.component.html
  89. 40
    0
      Angular/src/app/pages/app.timelinedemo.component.ts
  90. 40
    0
      Angular/src/app/pages/app.timelinedemo.scss
  91. 359
    0
      Angular/src/app/pages/app.wizard.component.html
  92. 109
    0
      Angular/src/app/pages/app.wizard.component.ts
  93. 1
    0
      Angular/src/app/pages/candidate/candidate-detail/candidate-detail.component.html
  94. 0
    0
      Angular/src/app/pages/candidate/candidate-detail/candidate-detail.component.scss
  95. 25
    0
      Angular/src/app/pages/candidate/candidate-detail/candidate-detail.component.spec.ts
  96. 15
    0
      Angular/src/app/pages/candidate/candidate-detail/candidate-detail.component.ts
  97. 38
    0
      Angular/src/app/pages/candidate/candidate-list/candidate-list.component.html
  98. 201
    0
      Angular/src/app/pages/candidate/candidate-list/candidate-list.component.scss
  99. 25
    0
      Angular/src/app/pages/candidate/candidate-list/candidate-list.component.spec.ts
  100. 0
    0
      Angular/src/app/pages/candidate/candidate-list/candidate-list.component.ts

+ 17458
- 36
Angular/package-lock.json
文件差異過大導致無法顯示
查看文件


+ 99
- 22
Angular/src/app/app-routing.module.ts 查看文件

@@ -1,28 +1,105 @@
1
-import { NgModule } from '@angular/core';
2
-import { RouterModule, Routes } from '@angular/router';
3
-import { AppMainComponent } from './app.main.component';
4
-
5
-export const appRouteList: Routes = [
6
-    {
7
-        path: 'app', component: AppMainComponent,
8
-        loadChildren: () => import('./pages/pages.routing.module').then(m => m.PagesRoutingModule)
9
-    },
10
-    {
11
-        path: '**',
12
-        redirectTo: 'app/dashboard/dashboard'
13
-    }
14
-];
1
+import {RouterModule} from '@angular/router';
2
+import {NgModule} from '@angular/core';
3
+import {DashboardComponent} from './demo/view/dashboard.component';
4
+import {DashboardAnalyticsComponent} from './demo/view/dashboardanalytics.component';
5
+import {FormLayoutDemoComponent} from './demo/view/formlayoutdemo.component';
6
+import {InvalidStateDemoComponent} from './demo/view/invalidstatedemo.component';
7
+import {PanelsDemoComponent} from './demo/view/panelsdemo.component';
8
+import {OverlaysDemoComponent} from './demo/view/overlaysdemo.component';
9
+import {MediaDemoComponent} from './demo/view/mediademo.component';
10
+import {MenusDemoComponent} from './demo/view/menusdemo.component';
11
+import {MessagesDemoComponent} from './demo/view/messagesdemo.component';
12
+import {MiscDemoComponent} from './demo/view/miscdemo.component';
13
+import {EmptyDemoComponent} from './demo/view/emptydemo.component';
14
+import {ChartsDemoComponent} from './demo/view/chartsdemo.component';
15
+import {FileDemoComponent} from './demo/view/filedemo.component';
16
+import {DocumentationComponent} from './demo/view/documentation.component';
17
+import {AppMainComponent} from './app.main.component';
18
+import {AppNotfoundComponent} from './pages/app.notfound.component';
19
+import {AppContactusComponent} from './pages/app.contactus.component';
20
+import {AppErrorComponent} from './pages/app.error.component';
21
+import {AppAccessdeniedComponent} from './pages/app.accessdenied.component';
22
+import {AppLoginComponent} from './pages/app.login.component';
23
+import {AppLandingComponent} from './pages/app.landing.component';
24
+import {InputDemoComponent} from './demo/view/inputdemo.component';
25
+import {FloatLabelDemoComponent} from './demo/view/floatlabeldemo.component';
26
+import {ButtonDemoComponent} from './demo/view/buttondemo.component';
27
+import {TableDemoComponent} from './demo/view/tabledemo.component';
28
+import {ListDemoComponent} from './demo/view/listdemo.component';
29
+import {AppTimelineDemoComponent} from './pages/app.timelinedemo.component';
30
+import {TreeDemoComponent} from './demo/view/treedemo.component';
31
+import {DisplayComponent} from './utilities/display.component';
32
+import {ElevationComponent} from './utilities/elevation.component';
33
+import {FlexboxComponent} from './utilities/flexbox.component';
34
+import {GridComponent} from './utilities/grid.component';
35
+import {IconsComponent} from './utilities/icons.component';
36
+import {WidgetsComponent} from './utilities/widgets.component';
37
+import {SpacingComponent} from './utilities/spacing.component';
38
+import {TypographyComponent} from './utilities/typography.component';
39
+import {TextComponent} from './utilities/text.component';
40
+import {AppCrudComponent} from './pages/app.crud.component';
41
+import {AppCalendarComponent} from './pages/app.calendar.component';
42
+import {AppInvoiceComponent} from './pages/app.invoice.component';
43
+import {AppHelpComponent} from './pages/app.help.component';
44
+import {AppWizardComponent} from './pages/app.wizard.component';
45
+import { CandidateListComponent } from './pages/candidate/candidate-list/candidate-list.component';
46
+import { CandidateSidebarComponent } from './pages/candidate/candidate-sidebar/candidate-sidebar.component';
15 47
 
16 48
 @NgModule({
17
-    exports: [
18
-        RouterModule
19
-    ],
20 49
     imports: [
21
-        RouterModule.forRoot(appRouteList, {
22
-            scrollPositionRestoration: 'enabled', // Add options right here
23
-            relativeLinkResolution: 'legacy'
24
-        })
25
-    ]
50
+        RouterModule.forRoot([
51
+            {
52
+                path: '', component: AppMainComponent,
53
+                children: [
54
+                    {path: 'candidate/candidate-sidebar', component: CandidateSidebarComponent},
55
+                    {path: 'candidate/candidate-list', component: CandidateListComponent},
56
+                    {path: 'dashboard/dashboard', component: DashboardComponent},
57
+                    {path: 'favorites/dashboardanalytics', component: DashboardAnalyticsComponent},
58
+                    {path: 'uikit/formlayout', component: FormLayoutDemoComponent},
59
+                    {path: 'uikit/floatlabel', component: FloatLabelDemoComponent},
60
+                    {path: 'uikit/invalidstate', component: InvalidStateDemoComponent},
61
+                    {path: 'uikit/input', component: InputDemoComponent},
62
+                    {path: 'uikit/button', component: ButtonDemoComponent},
63
+                    {path: 'uikit/table', component: TableDemoComponent},
64
+                    {path: 'uikit/list', component: ListDemoComponent},
65
+                    {path: 'uikit/tree', component: TreeDemoComponent},
66
+                    {path: 'uikit/panel', component: PanelsDemoComponent},
67
+                    {path: 'uikit/overlay', component: OverlaysDemoComponent},
68
+                    {path: 'uikit/menu', component: MenusDemoComponent},
69
+                    {path: 'uikit/media', component: MediaDemoComponent},
70
+                    {path: 'uikit/message', component: MessagesDemoComponent},
71
+                    {path: 'uikit/misc', component: MiscDemoComponent},
72
+                    {path: 'uikit/charts', component: ChartsDemoComponent},
73
+                    {path: 'uikit/file', component: FileDemoComponent},
74
+                    {path: 'utilities/display', component: DisplayComponent},
75
+                    {path: 'utilities/elevation', component: ElevationComponent},
76
+                    {path: 'utilities/flexbox', component: FlexboxComponent},
77
+                    {path: 'utilities/grid', component: GridComponent},
78
+                    {path: 'utilities/icons', component: IconsComponent},
79
+                    {path: 'utilities/widgets', component: WidgetsComponent},
80
+                    {path: 'utilities/spacing', component: SpacingComponent},
81
+                    {path: 'utilities/typography', component: TypographyComponent},
82
+                    {path: 'utilities/text', component: TextComponent},
83
+                    {path: 'pages/crud', component: AppCrudComponent},
84
+                    {path: 'pages/calendar', component: AppCalendarComponent},
85
+                    {path: 'pages/timeline', component: AppTimelineDemoComponent},
86
+                    {path: 'pages/invoice', component: AppInvoiceComponent},
87
+                    {path: 'pages/help', component: AppHelpComponent},
88
+                    {path: 'pages/empty', component: EmptyDemoComponent},
89
+                    {path: 'documentation', component: DocumentationComponent}
90
+                ]
91
+            },
92
+            {path: 'error', component: AppErrorComponent},
93
+            {path: 'access', component: AppAccessdeniedComponent},
94
+            {path: 'notfound', component: AppNotfoundComponent},
95
+            {path: 'contactus', component: AppContactusComponent},
96
+            {path: 'login', component: AppLoginComponent},
97
+            {path: 'landing', component: AppLandingComponent},
98
+            {path: 'pages/wizard', component: AppWizardComponent},
99
+            {path: '**', redirectTo: '/notfound'},
100
+        ], {scrollPositionRestoration: 'enabled'})
101
+    ],
102
+    exports: [RouterModule]
26 103
 })
27 104
 export class AppRoutingModule {
28 105
 }

+ 5
- 0
Angular/src/app/app.breadcrumb.component.html 查看文件

@@ -1,3 +1,8 @@
1 1
 <div class="layout-breadcrumb-container flex justify-content-between align-items-center shadow-1">
2 2
     <p-breadcrumb [model]="items" [home]="home" styleClass="layout-breadcrumb pl-4 py-2"></p-breadcrumb>
3
+    <div class="layout-breadcrumb-buttons flex align-items-center pr-3">
4
+        <button pButton pRipple type="button" icon="pi pi-cloud-upload" class="p-button-rounded p-button-text p-button-plain mr-1"></button>
5
+        <button pButton pRipple type="button" icon="pi pi-bookmark" class="p-button-rounded p-button-text p-button-plain mr-1"></button>
6
+        <button pButton pRipple type="button" icon="pi pi-power-off" class="p-button-rounded p-button-text p-button-plain mr-1"></button>
7
+    </div>
3 8
 </div>

+ 1
- 1
Angular/src/app/app.component.ts 查看文件

@@ -8,7 +8,7 @@ import { PrimeNGConfig } from 'primeng/api';
8 8
 })
9 9
 export class AppComponent implements OnInit{
10 10
 
11
-    topbarTheme = 'grey';
11
+    topbarTheme = 'blue';
12 12
 
13 13
     menuTheme = 'light';
14 14
 

+ 4
- 4
Angular/src/app/app.config.component.ts 查看文件

@@ -259,12 +259,12 @@ export class AppConfigComponent implements OnInit {
259 259
         if (mode === 'dark') {
260 260
             this.app.menuTheme = 'dark';
261 261
             this.app.topbarTheme = 'dark';
262
-            appLogoLink.src = 'assets/layout/images/logo-light.png';
262
+            appLogoLink.src = 'assets/layout/images/logo-light.svg';
263 263
         }
264 264
         else {
265 265
             this.app.menuTheme = 'light';
266 266
             this.app.topbarTheme = 'blue';
267
-            appLogoLink.src = 'assets/layout/images/logo-light.png';
267
+            appLogoLink.src = 'assets/layout/images/logo-light.svg';
268 268
         }
269 269
 
270 270
         const layoutLink: HTMLLinkElement = document.getElementById('layout-css') as HTMLLinkElement;
@@ -300,10 +300,10 @@ export class AppConfigComponent implements OnInit {
300 300
 
301 301
         if (theme.name === 'white' || theme.name === 'yellow' || theme.name === 'amber'
302 302
             || theme.name === 'orange' || theme.name === 'lime') {
303
-            appLogoLink.src = 'assets/layout/images/logo-dark.png';
303
+            appLogoLink.src = 'assets/layout/images/logo-dark.svg';
304 304
         }
305 305
         else {
306
-            appLogoLink.src = 'assets/layout/images/logo-light.png';
306
+            appLogoLink.src = 'assets/layout/images/logo-light.svg';
307 307
         }
308 308
     }
309 309
 

+ 1
- 1
Angular/src/app/app.footer.component.ts 查看文件

@@ -5,7 +5,7 @@ import {AppComponent} from './app.component';
5 5
     selector: 'app-footer',
6 6
     template: `
7 7
         <div class="layout-footer flex align-items-center p-4 shadow-2">
8
-            <img style="height: 2.25rem" id="footer-logo" [src]="'assets/layout/images/logo-' + (app.layoutMode === 'light' ? 'dark' : 'light') + '.png'" alt="ultima-footer-logo">
8
+            <img id="footer-logo" [src]="'assets/layout/images/footer-' + (app.layoutMode === 'light' ? 'ultima' : 'ultima-dark') + '.svg'" alt="ultima-footer-logo">
9 9
             <button pButton pRipple type="button" icon="pi pi-github fs-large" class="p-button-rounded p-button-text p-button-plain" [ngClass]="{'ml-auto mr-2': !app.isRTL, 'ml-2 mr-auto': app.isRTL}"></button>
10 10
             <button pButton pRipple type="button" icon="pi pi-facebook fs-large" class="p-button-rounded p-button-text p-button-plain" [ngClass]="{'mr-2': !app.isRTL, 'ml-2': app.isRTL}"></button>
11 11
             <button pButton pRipple type="button" icon="pi pi-twitter fs-large" class="p-button-rounded p-button-text p-button-plain" [ngClass]="{'mr-2': !app.isRTL, 'ml-2': app.isRTL}"></button>

+ 21
- 3
Angular/src/app/app.inlinemenu.component.html 查看文件

@@ -1,15 +1,33 @@
1 1
 <div [ngClass]="{'layout-inline-menu': true, 'layout-inline-menu-active':appMain.inlineMenuActive[key]}" [ngStyle]="style" [class]="styleClass">
2 2
     <a class="layout-inline-menu-action flex flex-row align-items-center" [ngClass]="appMain.isHorizontal() ? 'p-3 lg:col-1 py-3' : 'p-3'" (click)="onClick($event)"
3
-        pTooltip="Alex Ondoa" [tooltipDisabled]="isTooltipDisabled">
3
+        pTooltip="Amy Elsner" [tooltipDisabled]="isTooltipDisabled">
4 4
         <img src="assets/demo/images/avatar/amyelsner.png" alt="avatar" style="width: 32px; height: 32px;">
5 5
         <span class="flex flex-column" [ngClass]="{'ml-2': !app.isRTL, 'mr-2': app.isRTL}">
6
-            <span class="font-bold">Alex Ondoa</span>
7
-            <small>Developpeur</small>
6
+            <span class="font-bold">Amy Elsner</span>
7
+            <small>Webmaster</small>
8 8
         </span>
9 9
         <i class="layout-inline-menu-icon pi pi-angle-down" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}"></i>
10 10
     </a>
11 11
 
12 12
     <ul class="layout-inline-menu-action-panel" [@menu]="appMain.inlineMenuActive[key] ? isHorizontalActive() ? 'visible' : 'visibleAnimated' : isHorizontalActive() ? 'hidden' : 'hiddenAnimated'">
13
+        <li class="layout-inline-menu-action-item" pTooltip="Settings" [tooltipDisabled]="isTooltipDisabled">
14
+            <a class="flex flex-row align-items-center" [attr.tabindex]="tabIndex">
15
+                <i class="pi pi-cog pi-fw"></i>
16
+                <span>Settings</span>
17
+            </a>
18
+        </li>
19
+        <li class="layout-inline-menu-action-item" pTooltip="Terms of Usage" [tooltipDisabled]="isTooltipDisabled">
20
+            <a class="flex flex-row align-items-center" [attr.tabindex]="tabIndex">
21
+                <i class="pi pi-file-o pi-fw"></i>
22
+                <span>Terms of Usage</span>
23
+            </a>
24
+        </li>
25
+        <li class="layout-inline-menu-action-item" pTooltip="Support" [tooltipDisabled]="isTooltipDisabled">
26
+            <a class="flex flex-row align-items-center" [attr.tabindex]="tabIndex">
27
+                <i class="pi pi-compass pi-fw"></i>
28
+                <span>Support</span>
29
+            </a>
30
+        </li>
13 31
         <li class="layout-inline-menu-action-item" pTooltip="Logout" [tooltipDisabled]="isTooltipDisabled">
14 32
             <a class="flex flex-row align-items-center" [attr.tabindex]="tabIndex">
15 33
                 <i class="pi pi-power-off pi-fw"></i>

+ 4
- 5
Angular/src/app/app.main.component.html 查看文件

@@ -11,13 +11,12 @@
11 11
 
12 12
     <app-topbar></app-topbar>
13 13
 
14
-    <app-rightmenu></app-rightmenu>
14
+    <!-- <app-rightmenu></app-rightmenu> -->
15 15
 
16 16
     <div class="menu-wrapper" (click)="onMenuClick($event)">
17 17
         <div class="layout-menu-container">
18 18
             <app-inline-menu *ngIf="app.inlineMenuPosition=='top' || app.inlineMenuPosition=='both'" key="top"></app-inline-menu>
19 19
             <app-menu></app-menu>
20
-            <app-inline-menu *ngIf="app.inlineMenuPosition=='bottom' || app.inlineMenuPosition=='both'" key="bottom"></app-inline-menu>
21 20
         </div>
22 21
     </div>
23 22
 
@@ -28,11 +27,11 @@
28 27
             <router-outlet></router-outlet>
29 28
         </div>
30 29
 
31
-        <app-footer></app-footer>
30
+        <!-- <app-footer></app-footer> -->
32 31
     </div>
33 32
 
34
-    <app-config></app-config>
33
+    <!-- <app-config></app-config> -->
35 34
 
36
-    <div *ngIf="mobileMenuActive" class="layout-mask modal-in"></div>
35
+    <!-- <div *ngIf="mobileMenuActive" class="layout-mask modal-in"></div> -->
37 36
 
38 37
 </div>

+ 6
- 2
Angular/src/app/app.menu.component.ts 查看文件

@@ -17,10 +17,14 @@ export class AppMenuComponent implements OnInit {
17 17
 
18 18
     ngOnInit() {
19 19
         this.model = [
20
+          
20 21
             {
21
-                label: 'Natan', icon: 'pi pi-fw pi-home',
22
+                label: 'UI Kit', icon: 'pi pi-fw pi-star', routerLink: ['/uikit'],
22 23
                 items: [
23
-                    {label: 'Dashboard', icon: 'pi pi-fw pi-home', routerLink: ['/']},
24
+                    {label: 'Candidates', icon: 'pi pi-fw pi-table', routerLink: ['/candidate/candidate-list'], badgeClass: 'p-badge-help'},
25
+                    {label: 'Table', icon: 'pi pi-fw pi-table', routerLink: ['/uikit/table'], badge: '6', badgeClass: 'p-badge-help'},
26
+                    {label: 'Form Layout', icon: 'pi pi-fw pi-id-card', routerLink: ['/uikit/formlayout'], badge: '6', badgeClass: 'p-badge-warning'},
27
+                 
24 28
                 ]
25 29
             }
26 30
         ];

+ 99
- 2
Angular/src/app/app.module.ts 查看文件

@@ -98,13 +98,65 @@ import {AppRightMenuComponent} from './app.rightmenu.component';
98 98
 import {AppBreadcrumbComponent} from './app.breadcrumb.component';
99 99
 import {AppTopBarComponent} from './app.topbar.component';
100 100
 import {AppFooterComponent} from './app.footer.component';
101
+import {DashboardComponent} from './demo/view/dashboard.component';
102
+import {DashboardAnalyticsComponent} from './demo/view/dashboardanalytics.component';
103
+import {FormLayoutDemoComponent} from './demo/view/formlayoutdemo.component';
104
+import {FloatLabelDemoComponent} from './demo/view/floatlabeldemo.component';
105
+import {InvalidStateDemoComponent} from './demo/view/invalidstatedemo.component';
106
+import {InputDemoComponent} from './demo/view/inputdemo.component';
107
+import {ButtonDemoComponent} from './demo/view/buttondemo.component';
108
+import {TableDemoComponent} from './demo/view/tabledemo.component';
109
+import {ListDemoComponent} from './demo/view/listdemo.component';
110
+import {TreeDemoComponent} from './demo/view/treedemo.component';
111
+import {PanelsDemoComponent} from './demo/view/panelsdemo.component';
112
+import {OverlaysDemoComponent} from './demo/view/overlaysdemo.component';
113
+import {MediaDemoComponent} from './demo/view/mediademo.component';
114
+import {MenusDemoComponent} from './demo/view/menusdemo.component';
115
+import {MessagesDemoComponent} from './demo/view/messagesdemo.component';
116
+import {MiscDemoComponent} from './demo/view/miscdemo.component';
117
+import {EmptyDemoComponent} from './demo/view/emptydemo.component';
118
+import {ChartsDemoComponent} from './demo/view/chartsdemo.component';
119
+import {FileDemoComponent} from './demo/view/filedemo.component';
120
+import {DocumentationComponent} from './demo/view/documentation.component';
121
+import {DisplayComponent} from './utilities/display.component';
122
+import {ElevationComponent} from './utilities/elevation.component';
123
+import {FlexboxComponent} from './utilities/flexbox.component';
124
+import {GridComponent} from './utilities/grid.component';
125
+import {IconsComponent} from './utilities/icons.component';
126
+import {WidgetsComponent} from './utilities/widgets.component';
127
+import {SpacingComponent} from './utilities/spacing.component';
128
+import {TypographyComponent} from './utilities/typography.component';
129
+import {TextComponent} from './utilities/text.component';
130
+import {AppCrudComponent} from './pages/app.crud.component';
131
+import {AppCalendarComponent} from './pages/app.calendar.component';
132
+import {AppInvoiceComponent} from './pages/app.invoice.component';
133
+import {AppHelpComponent} from './pages/app.help.component';
134
+import {AppNotfoundComponent} from './pages/app.notfound.component';
135
+import {AppErrorComponent} from './pages/app.error.component';
136
+import {AppAccessdeniedComponent} from './pages/app.accessdenied.component';
137
+import {AppLoginComponent} from './pages/app.login.component';
138
+import {AppTimelineDemoComponent} from './pages/app.timelinedemo.component';
139
+import {AppWizardComponent} from './pages/app.wizard.component';
140
+import {AppLandingComponent} from './pages/app.landing.component';
141
+
142
+import {CountryService} from './demo/service/countryservice';
143
+import {CustomerService} from './demo/service/customerservice';
144
+import {EventService} from './demo/service/eventservice';
145
+import {IconService} from './demo/service/iconservice';
146
+import {NodeService} from './demo/service/nodeservice';
147
+import {PhotoService} from './demo/service/photoservice';
148
+import {ProductService} from './demo/service/productservice';
101 149
 
102 150
 import {MenuService} from './app.menu.service';
103 151
 import {AppBreadcrumbService} from './app.breadcrumb.service';
152
+import {AppContactusComponent} from './pages/app.contactus.component';
104 153
 
105 154
 import dayGridPlugin from '@fullcalendar/daygrid';
106 155
 import timeGridPlugin from '@fullcalendar/timegrid';
107 156
 import interactionPlugin from '@fullcalendar/interaction';
157
+import { CandidateListComponent } from './pages/candidate/candidate-list/candidate-list.component';
158
+import { CandidateService } from './shared/services/candidate.service';
159
+import { CandidateSidebarComponent } from './pages/candidate/candidate-sidebar/candidate-sidebar.component';
108 160
 
109 161
 FullCalendarModule.registerPlugins([
110 162
     dayGridPlugin,
@@ -211,11 +263,56 @@ FullCalendarModule.registerPlugins([
211 263
         AppRightMenuComponent,
212 264
         AppBreadcrumbComponent,
213 265
         AppTopBarComponent,
214
-        AppFooterComponent
266
+        AppFooterComponent,
267
+        DashboardComponent,
268
+        DashboardAnalyticsComponent,
269
+        FormLayoutDemoComponent,
270
+        FloatLabelDemoComponent,
271
+        InvalidStateDemoComponent,
272
+        InputDemoComponent,
273
+        ButtonDemoComponent,
274
+        TableDemoComponent,
275
+        ListDemoComponent,
276
+        TreeDemoComponent,
277
+        PanelsDemoComponent,
278
+        OverlaysDemoComponent,
279
+        MediaDemoComponent,
280
+        MenusDemoComponent,
281
+        MessagesDemoComponent,
282
+        MessagesDemoComponent,
283
+        MiscDemoComponent,
284
+        ChartsDemoComponent,
285
+        EmptyDemoComponent,
286
+        FileDemoComponent,
287
+        DocumentationComponent,
288
+        DisplayComponent,
289
+        ElevationComponent,
290
+        FlexboxComponent,
291
+        GridComponent,
292
+        IconsComponent,
293
+        WidgetsComponent,
294
+        SpacingComponent,
295
+        TypographyComponent,
296
+        TextComponent,
297
+        AppCrudComponent,
298
+        AppCalendarComponent,
299
+        AppLoginComponent,
300
+        AppLandingComponent,
301
+        AppInvoiceComponent,
302
+        AppHelpComponent,
303
+        AppNotfoundComponent,
304
+        AppErrorComponent,
305
+        AppAccessdeniedComponent,
306
+        AppTimelineDemoComponent,
307
+        AppWizardComponent,
308
+        AppContactusComponent,
309
+        CandidateListComponent,
310
+        CandidateSidebarComponent
215 311
     ],
216 312
     providers: [
217 313
         {provide: LocationStrategy, useClass: HashLocationStrategy},
218
-        MenuService, AppBreadcrumbService
314
+        CountryService, CustomerService, EventService, IconService, NodeService,
315
+        PhotoService, ProductService, MenuService, AppBreadcrumbService,CandidateService
219 316
     ],
220 317
     bootstrap: [AppComponent]
221 318
 })

+ 24
- 7
Angular/src/app/app.topbar.component.html 查看文件

@@ -1,8 +1,7 @@
1 1
 <div class="layout-topbar shadow-4">
2 2
     <div class="layout-topbar-left">
3 3
         <a class="layout-topbar-logo" routerLink="/">
4
-            <img id="app-logo" src="assets/layout/images/logo-light.png" style="height: 2.25rem">
5
-            <h3 class="m-1"> NATAN</h3>
4
+            <img id="app-logo" src="assets/layout/images/logo-light.svg" alt="ultima-layout" style="height: 2.25rem">
6 5
         </a>
7 6
 
8 7
         <a class="layout-menu-button shadow-6" (click)="appMain.onMenuButtonClick($event)" pRipple>
@@ -16,11 +15,11 @@
16 15
 
17 16
     <div class="layout-topbar-right" [ngClass]="{'layout-topbar-mobile-active': appMain.mobileTopbarActive}">
18 17
         <div class="layout-topbar-actions-left">
19
-            <!-- <p-megaMenu [model]="model" styleClass="layout-megamenu"></p-megaMenu> -->
18
+            <p-megaMenu [model]="model" styleClass="layout-megamenu"></p-megaMenu>
20 19
         </div>
21 20
         <div class="layout-topbar-actions-right">
22 21
             <ul class="layout-topbar-items">
23
-                <!-- <li class="layout-topbar-item layout-search-item">
22
+                <li class="layout-topbar-item layout-search-item">
24 23
                     <a class="layout-topbar-action rounded-circle" (click)="appMain.onTopbarItemClick($event, 'search')" pRipple>
25 24
                         <i class="pi pi-search fs-large"></i>
26 25
                     </a>
@@ -140,7 +139,7 @@
140 139
                             </div>
141 140
                         </div>
142 141
                     </div>
143
-                </li> -->
142
+                </li>
144 143
                 <li class="layout-topbar-item">
145 144
                     <a class="layout-topbar-action flex flex-row justify-content-center align-items-center px-2 rounded-circle" (click)="appMain.onTopbarItemClick($event, 'profile')" pRipple>
146 145
                         <img src="assets/demo/images/avatar/amyelsner.png" alt="avatar" style="width: 32px; height: 32px;">
@@ -149,17 +148,35 @@
149 148
                     <ul class="layout-topbar-action-panel shadow-6" [@topbarActionPanelAnimation]="'visible'" *ngIf="appMain.activeTopbarItem === 'profile'">
150 149
                         <li class="layout-topbar-action-item">
151 150
                             <a class="flex flex-row align-items-center" pRipple>
151
+                                <i class="pi pi-cog" [ngClass]="{'mr-2': !app.isRTL, 'ml-2': app.isRTL}"></i>
152
+                                <span>Settings</span>
153
+                            </a>
154
+                        </li>
155
+                        <li class="layout-topbar-action-item">
156
+                            <a class="flex flex-row align-items-center" pRipple>
157
+                                <i class="pi pi-file-o" [ngClass]="{'mr-2': !app.isRTL, 'ml-2': app.isRTL}"></i>
158
+                                <span>Terms of Usage</span>
159
+                            </a>
160
+                        </li>
161
+                        <li class="layout-topbar-action-item">
162
+                            <a class="flex flex-row align-items-center" pRipple>
163
+                                <i class="pi pi-compass" [ngClass]="{'mr-2': !app.isRTL, 'ml-2': app.isRTL}"></i>
164
+                                <span>Support</span>
165
+                            </a>
166
+                        </li>
167
+                        <li class="layout-topbar-action-item">
168
+                            <a class="flex flex-row align-items-center" pRipple>
152 169
                                 <i class="pi pi-power-off" [ngClass]="{'mr-2': !app.isRTL, 'ml-2': app.isRTL}"></i>
153 170
                                 <span>Logout</span>
154 171
                             </a>
155 172
                         </li>
156 173
                     </ul>
157 174
                 </li>
158
-                <!-- <li class="layout-topbar-item">
175
+                <li class="layout-topbar-item">
159 176
                     <a class="layout-topbar-action rounded-circle" (click)="appMain.onRightMenuButtonClick($event)" pRipple>
160 177
                         <i class="pi fs-large" [ngClass]="{'pi-arrow-left': !app.isRTL, 'pi-arrow-right': app.isRTL}"></i>
161 178
                     </a>
162
-                </li> -->
179
+                </li>
163 180
             </ul>
164 181
         </div>
165 182
     </div>

+ 20
- 0
Angular/src/app/demo/domain/customer.ts 查看文件

@@ -0,0 +1,20 @@
1
+export interface Country {
2
+    name?: string;
3
+    code?: string;
4
+}
5
+
6
+export interface Representative {
7
+    name?: string;
8
+    image?: string;
9
+}
10
+
11
+export interface Customer {
12
+    id?: number;
13
+    name?: string;
14
+    country?: Country;
15
+    company?: string;
16
+    date?: string;
17
+    status?: string;
18
+    activity?: number;
19
+    representative?: Representative;
20
+}

+ 6
- 0
Angular/src/app/demo/domain/image.ts 查看文件

@@ -0,0 +1,6 @@
1
+export interface Image {
2
+    previewImageSrc?;
3
+    thumbnailImageSrc?;
4
+    alt?;
5
+    title?;
6
+}

+ 12
- 0
Angular/src/app/demo/domain/product.ts 查看文件

@@ -0,0 +1,12 @@
1
+export interface Product {
2
+    id?: string;
3
+    code?: string;
4
+    name?: string;
5
+    description?: string;
6
+    price?: number;
7
+    quantity?: number;
8
+    inventoryStatus?: string;
9
+    category?: string;
10
+    image?: string;
11
+    rating?: number;
12
+}

+ 15
- 0
Angular/src/app/demo/service/countryservice.ts 查看文件

@@ -0,0 +1,15 @@
1
+import { HttpClient } from '@angular/common/http';
2
+import { Injectable } from '@angular/core';
3
+
4
+@Injectable()
5
+export class CountryService {
6
+
7
+    constructor(private http: HttpClient) { }
8
+
9
+    getCountries() {
10
+    return this.http.get<any>('assets/demo/data/countries.json')
11
+      .toPromise()
12
+      .then(res => res.data as any[])
13
+      .then(data => data);
14
+    }
15
+}

+ 31
- 0
Angular/src/app/demo/service/customerservice.ts 查看文件

@@ -0,0 +1,31 @@
1
+import { HttpClient } from '@angular/common/http';
2
+import { Injectable } from '@angular/core';
3
+import { Customer } from '../domain/customer';
4
+
5
+@Injectable()
6
+export class CustomerService {
7
+
8
+    constructor(private http: HttpClient) { }
9
+
10
+    getCustomersSmall() {
11
+        return this.http.get<any>('assets/demo/data/customers-small.json')
12
+            .toPromise()
13
+            .then(res => res.data as Customer[])
14
+            .then(data => data);
15
+    }
16
+
17
+    getCustomersMedium() {
18
+        return this.http.get<any>('assets/demo/data/customers-medium.json')
19
+            .toPromise()
20
+            .then(res => res.data as Customer[])
21
+            .then(data => data);
22
+    }
23
+
24
+    getCustomersLarge() {
25
+        return this.http.get<any>('assets/demo/data/customers-large.json')
26
+            .toPromise()
27
+            .then(res => res.data as Customer[])
28
+            .then(data => data);
29
+    }
30
+
31
+}

+ 15
- 0
Angular/src/app/demo/service/eventservice.ts 查看文件

@@ -0,0 +1,15 @@
1
+import { HttpClient } from '@angular/common/http';
2
+import { Injectable } from '@angular/core';
3
+
4
+@Injectable()
5
+export class EventService {
6
+
7
+    constructor(private http: HttpClient) { }
8
+
9
+    getEvents() {
10
+    return this.http.get<any>('assets/demo/data/scheduleevents.json')
11
+      .toPromise()
12
+      .then(res => res.data as any[])
13
+      .then(data => data);
14
+    }
15
+}

+ 22
- 0
Angular/src/app/demo/service/iconservice.ts 查看文件

@@ -0,0 +1,22 @@
1
+import { Injectable } from '@angular/core';
2
+import { HttpClient, HttpHeaders } from '@angular/common/http';
3
+import {map} from 'rxjs/operators';
4
+
5
+@Injectable()
6
+export class IconService {
7
+
8
+    constructor(private http: HttpClient) { }
9
+
10
+    icons: any[];
11
+
12
+    selectedIcon: any;
13
+
14
+    apiUrl = 'assets/demo/data/icons.json';
15
+
16
+    getIcons() {
17
+        return this.http.get(this.apiUrl).pipe(map((response: any) => {
18
+            this.icons = response.icons;
19
+            return this.icons;
20
+        }));
21
+    }
22
+}

+ 34
- 0
Angular/src/app/demo/service/nodeservice.ts 查看文件

@@ -0,0 +1,34 @@
1
+import { HttpClient } from '@angular/common/http';
2
+import { Injectable } from '@angular/core';
3
+
4
+import { TreeNode } from 'primeng/api';
5
+
6
+@Injectable()
7
+export class NodeService {
8
+
9
+    constructor(private http: HttpClient) { }
10
+
11
+    getFiles() {
12
+    return this.http.get<any>('assets/demo/data/files.json')
13
+      .toPromise()
14
+      .then(res => res.data as TreeNode[]);
15
+    }
16
+
17
+    getLazyFiles() {
18
+    return this.http.get<any>('assets/demo/data/files-lazy.json')
19
+      .toPromise()
20
+      .then(res => res.data as TreeNode[]);
21
+    }
22
+
23
+    getFilesystem() {
24
+    return this.http.get<any>('assets/demo/data/filesystem.json')
25
+      .toPromise()
26
+      .then(res => res.data as TreeNode[]);
27
+    }
28
+
29
+    getLazyFilesystem() {
30
+    return this.http.get<any>('assets/demo/data/filesystem-lazy.json')
31
+      .toPromise()
32
+      .then(res => res.data as TreeNode[]);
33
+    }
34
+}

+ 17
- 0
Angular/src/app/demo/service/photoservice.ts 查看文件

@@ -0,0 +1,17 @@
1
+import { HttpClient } from '@angular/common/http';
2
+import { Injectable } from '@angular/core';
3
+
4
+import { Image } from '../domain/image';
5
+
6
+@Injectable()
7
+export class PhotoService {
8
+
9
+    constructor(private http: HttpClient) { }
10
+
11
+    getImages() {
12
+    return this.http.get<any>('assets/demo/data/photos.json')
13
+      .toPromise()
14
+      .then(res => res.data as Image[])
15
+      .then(data => data);
16
+    }
17
+}

+ 38
- 0
Angular/src/app/demo/service/productservice.ts 查看文件

@@ -0,0 +1,38 @@
1
+import { HttpClient } from '@angular/common/http';
2
+import { Injectable } from '@angular/core';
3
+
4
+import { Product } from '../domain/product';
5
+
6
+@Injectable()
7
+export class ProductService {
8
+
9
+    constructor(private http: HttpClient) { }
10
+
11
+    getProductsSmall() {
12
+        return this.http.get<any>('assets/demo/data/products-small.json')
13
+        .toPromise()
14
+        .then(res => res.data as Product[])
15
+        .then(data => data);
16
+    }
17
+
18
+    getProducts() {
19
+        return this.http.get<any>('assets/demo/data/products.json')
20
+        .toPromise()
21
+        .then(res => res.data as Product[])
22
+        .then(data => data);
23
+    }
24
+
25
+    getProductsMixed() {
26
+        return this.http.get<any>('assets/demo/data/products-mixed.json')
27
+        .toPromise()
28
+        .then(res => res.data as Product[])
29
+        .then(data => data);
30
+    }
31
+
32
+    getProductsWithOrdersSmall() {
33
+        return this.http.get<any>('assets/demo/data/products-orders-small.json')
34
+        .toPromise()
35
+        .then(res => res.data as Product[])
36
+        .then(data => data);
37
+    }
38
+}

+ 116
- 0
Angular/src/app/demo/view/buttondemo.component.html 查看文件

@@ -0,0 +1,116 @@
1
+<div class="grid button-demo">
2
+	<div class="col-12 md:col-6">
3
+		<div class="card">
4
+			<h5>Default</h5>
5
+			<p-button label="Submit" class="mr-2 mb-2"></p-button>
6
+			<p-button label="Disabled" disabled="true" class="mr-2 mb-2"></p-button>
7
+            <p-button label="Link" styleClass="p-button-link mr-2"></p-button>
8
+		</div>
9
+		<div class="card">
10
+			<h5>Severities</h5>
11
+			<button pButton pRipple type="button" label="Primary" class="mr-2 mb-2"></button>
12
+			<button pButton pRipple type="button" label="Secondary" class="p-button-secondary mr-2 mb-2"></button>
13
+			<button pButton pRipple type="button" label="Success" class="p-button-success mr-2 mb-2"></button>
14
+			<button pButton pRipple type="button" label="Info" class="p-button-info mr-2 mb-2"></button>
15
+			<button pButton pRipple type="button" label="Warning" class="p-button-warning mr-2 mb-2"></button>
16
+			<button pButton pRipple type="button" label="Help" class="p-button-help mr-2 mb-2"></button>
17
+			<button pButton pRipple type="button" label="Danger" class="p-button-danger mr-2 mb-2"></button>
18
+		</div>
19
+		<div class="card">
20
+			<h5>Text</h5>
21
+			<button pButton pRipple type="button" label="Primary" class="p-button-text mr-2 mb-2"></button>
22
+			<button pButton pRipple type="button" label="Secondary" class="p-button-secondary p-button-text mr-2 mb-2"></button>
23
+			<button pButton pRipple type="button" label="Success" class="p-button-success p-button-text mr-2 mb-2"></button>
24
+			<button pButton pRipple type="button" label="Info" class="p-button-info p-button-text mr-2 mb-2"></button>
25
+			<button pButton pRipple type="button" label="Warning" class="p-button-warning p-button-text mr-2 mb-2"></button>
26
+			<button pButton pRipple type="button" label="Help" class="p-button-help p-button-text mr-2 mb-2"></button>
27
+			<button pButton pRipple type="button" label="Danger" class="p-button-danger p-button-text mr-2 mb-2"></button>
28
+			<button pButton pRipple type="button" label="Plain" class="p-button-text p-button-plain mr-2 mb-2"></button>
29
+		</div>
30
+		<div class="card">
31
+			<h5>Outlined</h5>
32
+			<button pButton pRipple type="button" label="Primary" class="p-button-outlined mr-2 mb-2"></button>
33
+			<button pButton pRipple type="button" label="Secondary" class="p-button-outlined p-button-secondary mr-2 mb-2"></button>
34
+			<button pButton pRipple type="button" label="Success" class="p-button-outlined p-button-success mr-2 mb-2"></button>
35
+			<button pButton pRipple type="button" label="Info" class="p-button-outlined p-button-info mr-2 mb-2"></button>
36
+			<button pButton pRipple type="button" label="Warning" class="p-button-outlined p-button-warning mr-2 mb-2"></button>
37
+			<button pButton pRipple type="button" label="Help" class="p-button-outlined p-button-help mr-2 mb-2"></button>
38
+			<button pButton pRipple type="button" label="Danger" class="p-button-outlined p-button-danger mr-2 mb-2"></button>
39
+		</div>
40
+		<div class="card">
41
+			<h5>Button Set</h5>
42
+			<span class="p-buttonset">
43
+				<button pButton pRipple label="Save" icon="pi pi-check"></button>
44
+				<button pButton pRipple label="Delete" icon="pi pi-trash"></button>
45
+				<button pButton pRipple label="Cancel" icon="pi pi-times"></button>
46
+			</span>
47
+		</div>
48
+		<div class="card">
49
+			<h5>SplitButton</h5>
50
+			<p-splitButton label="Save" icon="pi pi-plus" [model]="items" styleClass="p-button-info mr-2 mb-2"></p-splitButton>
51
+			<p-splitButton label="Save" icon="pi pi-plus" [model]="items" styleClass="p-button-success mr-2 mb-2"></p-splitButton>
52
+			<p-splitButton label="Save" icon="pi pi-plus" [model]="items" styleClass="p-button-warning mr-2 mb-2"></p-splitButton>
53
+			<p-splitButton label="Save" icon="pi pi-plus" [model]="items" styleClass="p-button-help mr-2 mb-2"></p-splitButton>
54
+			<p-splitButton label="Save" icon="pi pi-plus" [model]="items" styleClass="p-button-danger mr-2 mb-2"></p-splitButton>
55
+		</div>
56
+	</div>
57
+	<div class="col-12 md:col-6">
58
+		<div class="card">
59
+			<h5>Icons</h5>
60
+			<p-button icon="pi pi-star" class="mr-2 mb-2"></p-button>
61
+			<p-button label="Submit" icon="pi pi-bookmark" class="mr-2 mb-2"></p-button>
62
+			<p-button label="Submit" icon="pi pi-bookmark" iconPos="right" class="mr-2 mb-2"></p-button>
63
+		</div>
64
+		<div class="card">
65
+			<h5>Raised</h5>
66
+			<button pButton pRipple type="button" label="Primary" class="p-button-raised mr-2 mb-2"></button>
67
+			<button pButton pRipple type="button" label="Secondary" class="p-button-raised p-button-secondary mr-2 mb-2"></button>
68
+			<button pButton pRipple type="button" label="Success" class="p-button-raised p-button-success mr-2 mb-2"></button>
69
+			<button pButton pRipple type="button" label="Info" class="p-button-raised p-button-info mr-2 mb-2"></button>
70
+			<button pButton pRipple type="button" label="Warning" class="p-button-raised p-button-warning mr-2 mb-2"></button>
71
+			<button pButton pRipple type="button" label="Help" class="p-button-raised p-button-help mr-2 mb-2"></button>
72
+			<button pButton pRipple type="button" label="Danger" class="p-button-raised p-button-danger mr-2 mb-2"></button>
73
+		</div>
74
+		<div class="card">
75
+			<h5>Rounded</h5>
76
+			<button pButton pRipple type="button" label="Primary" class="p-button-rounded mr-2 mb-2"></button>
77
+			<button pButton pRipple type="button" label="Secondary" class="p-button-rounded p-button-secondary mr-2 mb-2"></button>
78
+			<button pButton pRipple type="button" label="Success" class="p-button-rounded p-button-success mr-2 mb-2"></button>
79
+			<button pButton pRipple type="button" label="Info" class="p-button-rounded p-button-info mr-2 mb-2"></button>
80
+			<button pButton pRipple type="button" label="Warning" class="p-button-rounded p-button-warning mr-2 mb-2"></button>
81
+			<button pButton pRipple type="button" label="Help" class="p-button-rounded p-button-help mr-2 mb-2"></button>
82
+			<button pButton pRipple type="button" label="Danger" class="p-button-rounded p-button-danger mr-2 mb-2"></button>
83
+		</div>
84
+		<div class="card">
85
+			<h5>Rounded Icons</h5>
86
+			<button pButton pRipple type="button" icon="pi pi-check" class="p-button-rounded mr-2 mb-2"></button>
87
+			<button pButton pRipple type="button" icon="pi pi-bookmark" class="p-button-rounded p-button-secondary mr-2 mb-2"></button>
88
+			<button pButton pRipple type="button" icon="pi pi-search" class="p-button-rounded p-button-success mr-2 mb-2"></button>
89
+			<button pButton pRipple type="button" icon="pi pi-user" class="p-button-rounded p-button-info mr-2 mb-2"></button>
90
+			<button pButton pRipple type="button" icon="pi pi-bell" class="p-button-rounded p-button-warning mr-2 mb-2"></button>
91
+			<button pButton pRipple type="button" icon="pi pi-heart" class="p-button-rounded p-button-help mr-2 mb-2"></button>
92
+			<button pButton pRipple type="button" icon="pi pi-times" class="p-button-rounded p-button-danger mr-2 mb-2"></button>
93
+		</div>
94
+		<div class="card">
95
+			<h5>Rounded Text</h5>
96
+			<button pButton pRipple type="button" icon="pi pi-check" class="p-button-rounded p-button-text mr-2 mb-2"></button>
97
+			<button pButton pRipple type="button" icon="pi pi-bookmark" class="p-button-rounded p-button-secondary p-button-text mr-2 mb-2"></button>
98
+			<button pButton pRipple type="button" icon="pi pi-search" class="p-button-rounded p-button-success p-button-text mr-2 mb-2"></button>
99
+			<button pButton pRipple type="button" icon="pi pi-user" class="p-button-rounded p-button-info p-button-text mr-2 mb-2"></button>
100
+			<button pButton pRipple type="button" icon="pi pi-bell" class="p-button-rounded p-button-warning p-button-text mr-2 mb-2"></button>
101
+			<button pButton pRipple type="button" icon="pi pi-heart" class="p-button-rounded p-button-help p-button-text mr-2 mb-2"></button>
102
+			<button pButton pRipple type="button" icon="pi pi-times" class="p-button-rounded p-button-danger p-button-text mr-2 mb-2"></button>
103
+			<button pButton pRipple type="button" icon="pi pi-filter" class="p-button-rounded p-button-text p-button-plain mr-2 mb-2"></button>
104
+		</div>
105
+		<div class="card">
106
+			<h5>Rounded Outlined</h5>
107
+			<button pButton pRipple type="button" icon="pi pi-check" class="p-button-rounded p-button-outlined mr-2 mb-2"></button>
108
+			<button pButton pRipple type="button" icon="pi pi-bookmark" class="p-button-rounded p-button-secondary p-button-outlined mr-2 mb-2"></button>
109
+			<button pButton pRipple type="button" icon="pi pi-search" class="p-button-rounded p-button-success p-button-outlined mr-2 mb-2"></button>
110
+			<button pButton pRipple type="button" icon="pi pi-user" class="p-button-rounded p-button-info p-button-outlined mr-2 mb-2"></button>
111
+			<button pButton pRipple type="button" icon="pi pi-bell" class="p-button-rounded p-button-warning p-button-outlined mr-2 mb-2"></button>
112
+			<button pButton pRipple type="button" icon="pi pi-heart" class="p-button-rounded p-button-help p-button-outlined mr-2 mb-2"></button>
113
+			<button pButton pRipple type="button" icon="pi pi-times" class="p-button-rounded p-button-danger p-button-outlined mr-2 mb-2"></button>
114
+		</div>
115
+	</div>
116
+</div>

+ 28
- 0
Angular/src/app/demo/view/buttondemo.component.ts 查看文件

@@ -0,0 +1,28 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {MenuItem} from 'primeng/api';
3
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
4
+
5
+@Component({
6
+    templateUrl: './buttondemo.component.html'
7
+})
8
+export class ButtonDemoComponent implements OnInit {
9
+
10
+    items: MenuItem[];
11
+
12
+    constructor(private breadcrumbService: AppBreadcrumbService) {
13
+        this.breadcrumbService.setItems([
14
+            { label: 'UI Kit' },
15
+            { label: 'Button', routerLink: ['/uikit/button'] }
16
+        ]);
17
+    }
18
+
19
+    ngOnInit() {
20
+        this.items = [
21
+            {label: 'Update', icon: 'pi pi-refresh'},
22
+            {label: 'Delete', icon: 'pi pi-times'},
23
+            {label: 'Angular.io', icon: 'pi pi-info', url: 'http://angular.io'},
24
+            {separator: true},
25
+            {label: 'Setup', icon: 'pi pi-cog'}
26
+        ];
27
+    }
28
+}

+ 42
- 0
Angular/src/app/demo/view/chartsdemo.component.html 查看文件

@@ -0,0 +1,42 @@
1
+<div class="grid p-fluid">
2
+    <div class="col-12 lg:col-6">
3
+        <div class="card">
4
+            <h5 class="centerText">Linear Chart</h5>
5
+            <p-chart type="line" [data]="lineData" [options]="lineOptions"></p-chart>
6
+        </div>
7
+
8
+        <div class="card">
9
+            <h5 class="centerText">Pie Chart</h5>
10
+            <div class="flex justify-content-center">
11
+                <p-chart type="pie" [data]="pieData" [options]="pieOptions" [style]="{'width': '50%'}"></p-chart>
12
+            </div>
13
+        </div>
14
+
15
+        <div class="card">
16
+            <h5 class="centerText">Polar Area Chart</h5>
17
+            <div class="flex justify-content-center">
18
+                <p-chart type="polarArea" [data]="polarData" [options]="polarOptions" [style]="{'width': '50%'}"></p-chart>
19
+            </div>
20
+        </div>
21
+    </div>
22
+    <div class="col-12 lg:col-6">
23
+        <div class="card">
24
+            <h5 class="centerText">Bar Chart</h5>
25
+            <p-chart type="bar" [data]="barData" [options]="barOptions"></p-chart>
26
+        </div>
27
+
28
+        <div class="card">
29
+            <h5 class="centerText">Doughnut Chart</h5>
30
+            <div class="flex justify-content-center">
31
+                <p-chart type="doughnut" [data]="doughnutData" [options]="doughnutOptions" [style]="{'width': '50%'}"></p-chart>
32
+            </div>
33
+        </div>
34
+
35
+        <div class="card">
36
+            <h5 class="centerText">Radar Chart</h5>
37
+            <div class="flex justify-content-center">
38
+                <p-chart type="radar" [data]="radarData" [options]="radarOptions" [style]="{'width': '50%'}"></p-chart>
39
+            </div>
40
+        </div>
41
+    </div>
42
+</div>

+ 304
- 0
Angular/src/app/demo/view/chartsdemo.component.ts 查看文件

@@ -0,0 +1,304 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import { AppComponent } from 'src/app/app.component';
3
+import { AppMainComponent } from 'src/app/app.main.component';
4
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
5
+
6
+@Component({
7
+    templateUrl: './chartsdemo.component.html'
8
+})
9
+export class ChartsDemoComponent implements OnInit {
10
+
11
+    lineData: any;
12
+
13
+    barData: any;
14
+
15
+    pieData: any;
16
+
17
+    doughnutData: any;
18
+
19
+    polarData: any;
20
+
21
+    radarData: any;
22
+
23
+    lineOptions: any;
24
+
25
+    barOptions: any;
26
+
27
+    pieOptions: any;
28
+
29
+    doughnutOptions: any;
30
+
31
+    polarOptions: any;
32
+
33
+    radarOptions: any;
34
+
35
+    constructor(public app: AppComponent, public appMain: AppMainComponent, private breadcrumbService: AppBreadcrumbService) {
36
+        this.breadcrumbService.setItems([
37
+            { label: 'UI Kit' },
38
+            { label: 'Chart', routerLink: ['/uikit/charts'] }
39
+        ]);
40
+    }
41
+
42
+    ngOnInit() {
43
+
44
+        this.lineData = this.getLineData();
45
+        this.barData = this.getBarData();
46
+        this.pieData = this.getPieData();
47
+        this.doughnutData = this.getPieData();
48
+        this.polarData = this.getPolarData();
49
+
50
+        this.lineOptions = this.getChartOptions();
51
+        this.barOptions = this.getChartOptions();
52
+        this.pieOptions = this.getChartOptions2();
53
+        this.doughnutOptions = this.getChartOptions2();
54
+        this.polarOptions = this.getChartOptions3();
55
+        this.radarOptions = this.getChartOptions3();
56
+
57
+        this.appMain['refreshChart'] = () => {
58
+            this.lineData = this.getLineData();
59
+            this.barData = this.getBarData();
60
+            this.pieData = this.getPieData();
61
+            this.doughnutData = this.getPieData();
62
+            this.polarData = this.getPolarData();
63
+
64
+            this.lineOptions = this.getChartOptions();
65
+            this.barOptions = this.getChartOptions();
66
+            this.pieOptions = this.getChartOptions2();
67
+            this.doughnutOptions = this.getChartOptions2();
68
+            this.polarOptions = this.getChartOptions3();
69
+            this.radarOptions = this.getChartOptions3();
70
+        };
71
+
72
+        this.radarData = {
73
+            labels: ['Eating', 'Drinking', 'Sleeping', 'Designing', 'Coding', 'Cycling', 'Running'],
74
+            datasets: [
75
+                {
76
+                    label: 'First Dataset',
77
+                    backgroundColor: 'rgba(54, 162, 235,0.2)',
78
+                    borderColor: 'rgba(54, 162, 235,1)',
79
+                    pointBackgroundColor: 'rgba(54, 162, 235,1)',
80
+                    pointBorderColor: '#fff',
81
+                    pointHoverBackgroundColor: '#fff',
82
+                    pointHoverBorderColor: 'rgba(54, 162, 235,1)',
83
+                    data: [65, 59, 90, 81, 56, 55, 40]
84
+                },
85
+                {
86
+                    label: 'Second Dataset',
87
+                    backgroundColor: 'rgba(255, 99, 132,0.2)',
88
+                    borderColor: 'rgba(255, 99, 132,1)',
89
+                    pointBackgroundColor: 'rgba(255, 99, 132,1)',
90
+                    pointBorderColor: '#fff',
91
+                    pointHoverBackgroundColor: '#fff',
92
+                    pointHoverBorderColor: 'rgba(255, 99, 132,1)',
93
+                    data: [28, 48, 40, 19, 96, 27, 100]
94
+                }
95
+            ]
96
+        };
97
+    }
98
+
99
+    getLineData() {
100
+        const isLight = this.app.layoutMode === 'light';
101
+        const dataset1Color = isLight ? '#00ACC1' : '#4DD0E1';
102
+        const dataset2Color = isLight ? '#FF9800' : '#FFB74D';
103
+
104
+        return {
105
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
106
+            datasets: [
107
+                {
108
+                    label: 'First Dataset',
109
+                    data: [65, 59, 80, 81, 56, 55, 40],
110
+                    fill: false,
111
+                    backgroundColor: dataset1Color,
112
+                    borderColor: dataset1Color,
113
+                    tension: .4
114
+                },
115
+                {
116
+                    label: 'Second Dataset',
117
+                    data: [28, 48, 40, 19, 86, 27, 90],
118
+                    fill: false,
119
+                    backgroundColor: dataset2Color,
120
+                    borderColor: dataset2Color,
121
+                    tension: .4
122
+                }
123
+            ]
124
+        };
125
+    }
126
+
127
+    getBarData() {
128
+        const isLight = this.app.layoutMode === 'light';
129
+        const dataset1Color = isLight ? '#00ACC1' : '#4DD0E1';
130
+        const dataset2Color = isLight ? '#FF9800' : '#FFB74D';
131
+
132
+        return {
133
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
134
+            datasets: [
135
+                {
136
+                    label: 'First Dataset',
137
+                    backgroundColor: dataset1Color,
138
+                    borderColor: dataset1Color,
139
+                    data: [65, 59, 80, 81, 56, 55, 40]
140
+                },
141
+                {
142
+                    label: 'Second Dataset',
143
+                    backgroundColor: dataset2Color,
144
+                    borderColor: dataset2Color,
145
+                    data: [28, 48, 40, 19, 86, 27, 90]
146
+                }
147
+            ]
148
+        };
149
+    }
150
+
151
+    getPieData() {
152
+        const { limeColor, blueColor, tealColor, orangeColor } = this.getColors();
153
+        const borderColor = getComputedStyle(document.body).getPropertyValue('--divider-color') || 'rgba(160, 167, 181, .3)';
154
+
155
+        return {
156
+            labels: ['A', 'B', 'C', 'D'],
157
+            datasets: [
158
+                {
159
+                    data: [540, 325, 702, 421],
160
+                    backgroundColor: [
161
+                        blueColor,
162
+                        tealColor,
163
+                        limeColor,
164
+                        orangeColor
165
+                    ],
166
+                    borderColor
167
+                }]
168
+        };
169
+    }
170
+
171
+    getPolarData() {
172
+        const { limeColor, blueColor, tealColor, orangeColor } = this.getColors();
173
+        const borderColor = getComputedStyle(document.body).getPropertyValue('--divider-color') || 'rgba(160, 167, 181, .3)';
174
+
175
+        return {
176
+            datasets: [{
177
+                data: [
178
+                    11,
179
+                    16,
180
+                    7,
181
+                    3
182
+                ],
183
+                backgroundColor: [
184
+                    blueColor,
185
+                    tealColor,
186
+                    limeColor,
187
+                    orangeColor
188
+                ],
189
+                borderColor,
190
+                label: 'Dataset'
191
+            }],
192
+            labels: [
193
+                'A',
194
+                'B',
195
+                'C',
196
+                'D'
197
+            ]
198
+        };
199
+    }
200
+
201
+    getColors() {
202
+        const isLight = this.app.layoutMode === 'light';
203
+        return {
204
+            pinkColor: isLight ? '#EC407A' : '#F48FB1',
205
+            purpleColor: isLight ? '#AB47BC' : '#CE93D8',
206
+            deeppurpleColor: isLight ? '#7E57C2' : '#B39DDB',
207
+            indigoColor: isLight ? '#5C6BC0' : '#9FA8DA',
208
+            blueColor: isLight ? '#42A5F5' : '#90CAF9',
209
+            lightblueColor: isLight ? '#29B6F6' : '#81D4FA',
210
+            cyanColor: isLight ? '#00ACC1' : '#4DD0E1',
211
+            tealColor: isLight ? '#26A69A' : '#80CBC4',
212
+            greenColor: isLight ? '#66BB6A' : '#A5D6A7',
213
+            lightgreenColor: isLight ? '#9CCC65' : '#C5E1A5',
214
+            limeColor: isLight ? '#D4E157' : '#E6EE9C',
215
+            yellowColor: isLight ? 'FFEE58' : '#FFF59D',
216
+            amberColor: isLight ? '#FFCA28' : '#FFE082',
217
+            orangeColor: isLight ? '#FFA726' : '#FFCC80',
218
+            deeporangeColor: isLight ? '#FF7043' : '#FFAB91',
219
+            brownColor: isLight ? '#8D6E63' : '#BCAAA4'
220
+        };
221
+    }
222
+
223
+    getChartOptions() {
224
+        const textColor = getComputedStyle(document.body).getPropertyValue('--text-color') || 'rgba(0, 0, 0, 0.87)';
225
+        const gridLinesColor = getComputedStyle(document.body).getPropertyValue('--divider-color') || 'rgba(160, 167, 181, .3)';
226
+        const fontFamily = getComputedStyle(document.body).getPropertyValue('--font-family');
227
+        return {
228
+            plugins: {
229
+                legend: {
230
+                    display: true,
231
+                    labels: {
232
+                        fontFamily,
233
+                        fontColor: textColor,
234
+                    }
235
+                }
236
+            },
237
+            responsive: true,
238
+            scales: {
239
+                y: {
240
+                    ticks: {
241
+                        fontFamily,
242
+                        color: textColor
243
+                    },
244
+                    grid: {
245
+                        color: gridLinesColor
246
+                    }
247
+                },
248
+                x: {
249
+                    ticks: {
250
+                        fontFamily,
251
+                        color: textColor
252
+                    },
253
+                    grid: {
254
+                        color: gridLinesColor
255
+                    }
256
+                }
257
+            }
258
+        };
259
+    }
260
+
261
+    getChartOptions2() {
262
+        const textColor = getComputedStyle(document.body).getPropertyValue('--text-color') || 'rgba(0, 0, 0, 0.87)';
263
+        const fontFamily = getComputedStyle(document.body).getPropertyValue('--font-family');
264
+        return {
265
+            plugins: {
266
+                legend: {
267
+                    display: true,
268
+                    labels: {
269
+                        fontFamily,
270
+                        fontColor: textColor,
271
+                    }
272
+                }
273
+            }
274
+        };
275
+    }
276
+
277
+    getChartOptions3() {
278
+        const textColor = getComputedStyle(document.body).getPropertyValue('--text-color') || 'rgba(0, 0, 0, 0.87)';
279
+        const fontFamily = getComputedStyle(document.body).getPropertyValue('--font-family');
280
+        const gridLinesColor = getComputedStyle(document.body).getPropertyValue('--divider-color') || 'rgba(160, 167, 181, .3)';
281
+
282
+        return {
283
+            plugins: {
284
+                legend: {
285
+                    display: true,
286
+                    labels: {
287
+                        fontFamily,
288
+                        fontColor: textColor,
289
+                    }
290
+                }
291
+            },
292
+            scales: {
293
+                r: {
294
+                    grid: {
295
+                        color: gridLinesColor
296
+                    },
297
+                    pointLabels: {
298
+                        fontColor: textColor
299
+                    }
300
+                }
301
+            }
302
+        };
303
+    }
304
+}

+ 406
- 0
Angular/src/app/demo/view/dashboard.component.html 查看文件

@@ -0,0 +1,406 @@
1
+<div class="grid dashboard">
2
+    <div class="col-12 md:col-6 lg:col-3">
3
+        <div class="card overview-box flex flex-column pt-2">
4
+            <div class="flex align-items-center muted-text">
5
+                <i class="pi pi-shopping-cart"></i>
6
+                <h6 class="m-0" [ngClass]="{'pl-2': !app.isRTL, 'pr-2': app.isRTL}">Orders</h6>
7
+                <div [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">
8
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu1.toggle($event)"></button>
9
+                    <p-menu #menu1 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
10
+                </div>
11
+            </div>
12
+            <div class="flex justify-content-between mt-3 flex-wrap">
13
+                <div class="flex flex-column" style="width: 80px">
14
+                    <span class="mb-1 fs-xlarge">640</span>
15
+                    <span class="overview-status p-1 teal-bgcolor fs-small">1420 Completed</span>
16
+                </div>
17
+                <div class="flex align-items-end">
18
+                    <p-chart type="line" [data]="overviewChartData1" [options]="overviewChartOptions1" responsive="true" height="60px" width="160px"></p-chart>
19
+                </div>
20
+            </div>
21
+        </div>
22
+    </div>
23
+
24
+    <div class="col-12 md:col-6 lg:col-3">
25
+        <div class="card overview-box flex flex-column pt-2">
26
+            <div class="flex align-items-center muted-text">
27
+                <i class="pi pi-dollar"></i>
28
+                <h6 class="m-0" [ngClass]="{'pl-2': !app.isRTL, 'pr-2': app.isRTL}">Revenue</h6>
29
+                <div [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">
30
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu2.toggle($event)"></button>
31
+                    <p-menu #menu2 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
32
+                </div>
33
+            </div>
34
+            <div class="flex justify-content-between mt-3 flex-wrap">
35
+                <div class="flex flex-column" style="width: 80px">
36
+                    <span class="mb-1 fs-xlarge">$57K</span>
37
+                    <span class="overview-status p-1 teal-bgcolor fs-small">$9,640 Income</span>
38
+                </div>
39
+                <div class="flex align-items-end">
40
+                    <p-chart type="line" [data]="overviewChartData2" [options]="overviewChartOptions2" responsive="true" height="60px" width="160px"></p-chart>
41
+                </div>
42
+            </div>
43
+        </div>
44
+    </div>
45
+
46
+    <div class="col-12 md:col-6 lg:col-3">
47
+        <div class="card overview-box flex flex-column pt-2">
48
+            <div class="flex align-items-center muted-text">
49
+                <i class="pi pi-users"></i>
50
+                <h6 class="m-0" [ngClass]="{'pl-2': !app.isRTL, 'pr-2': app.isRTL}">Customers</h6>
51
+                <div [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">
52
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu3.toggle($event)"></button>
53
+                    <p-menu #menu3 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
54
+                </div>
55
+            </div>
56
+            <div class="flex justify-content-between mt-3 flex-wrap">
57
+                <div class="flex flex-column" style="width: 80px">
58
+                    <span class="mb-1 fs-xlarge">8572</span>
59
+                    <span class="overview-status p-1 pink-bgcolor fs-small">25402 Registered</span>
60
+                </div>
61
+                <div class="flex align-items-end">
62
+                    <p-chart type="line" [data]="overviewChartData3" [options]="overviewChartOptions3" responsive="true" height="60px" width="160px"></p-chart>
63
+                </div>
64
+            </div>
65
+        </div>
66
+    </div>
67
+
68
+    <div class="col-12 md:col-6 lg:col-3">
69
+        <div class="card overview-box flex flex-column pt-2">
70
+            <div class="flex align-items-center muted-text">
71
+                <i class="pi pi-comments"></i>
72
+                <h6 class="m-0" [ngClass]="{'pl-2': !app.isRTL, 'pr-2': app.isRTL}">Comments</h6>
73
+                <div [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">
74
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu4.toggle($event)"></button>
75
+                    <p-menu #menu4 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
76
+                </div>
77
+            </div>
78
+            <div class="flex justify-content-between mt-3 flex-wrap">
79
+                <div class="flex flex-column" style="width: 80px">
80
+                    <span class="mb-1 fs-xlarge">805</span>
81
+                    <span class="overview-status p-1 teal-bgcolor fs-small">85 Responded</span>
82
+                </div>
83
+                <div class="flex align-items-end">
84
+                    <p-chart type="line" [data]="overviewChartData4" [options]="overviewChartOptions4" responsive="true" height="60px" width="160px"></p-chart>
85
+                </div>
86
+            </div>
87
+        </div>
88
+    </div>
89
+
90
+    <div class="col-12 lg:col-6">
91
+        <div class="card height-100">
92
+            <div class="card-header">
93
+                <h5>Contact</h5>
94
+                <div>
95
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu5.toggle($event)"></button>
96
+                    <p-menu #menu5 [popup]="true" [model]="[{label: 'New', icon: 'pi pi-fw pi-plus'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'},{label: 'Delete', icon: 'pi pi-fw pi-trash'}]"></p-menu>
97
+                </div>
98
+            </div>
99
+
100
+            <ul class="widget-list">
101
+                <li class="flex align-items-center py-3">
102
+                    <div class="person-item flex align-items-center">
103
+                        <img src="assets/demo/images/avatar/xuxuefeng.png">
104
+                        <div [ngClass]="{'ml-2': !app.isRTL, 'mr-2': app.isRTL}">
105
+                            <div>Xuxue Feng</div>
106
+                            <small class="muted-text">feng@ultima.org</small>
107
+                        </div>
108
+                    </div>
109
+                    <span class="person-tag indigo-bgcolor p-1 fs-small" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">Accounting</span>
110
+                    <span class="person-tag orange-bgcolor p-1 fs-small" [ngClass]="{'ml-2': !app.isRTL, 'mr-2': app.isRTL}">Sales</span>
111
+                </li>
112
+
113
+                <li class="flex align-items-center py-3">
114
+                    <div class="person-item flex align-items-center">
115
+                        <img src="assets/demo/images/avatar/elwinsharvill.png">
116
+                        <div [ngClass]="{'ml-2': !app.isRTL, 'mr-2': app.isRTL}">
117
+                            <div>Elwin Sharvill</div>
118
+                            <small class="muted-text">sharvill@ultima.org</small>
119
+                        </div>
120
+                    </div>
121
+                    <span class="person-tag teal-bgcolor p-1 fs-small" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">Finance</span>
122
+                    <span class="person-tag orange-bgcolor p-1 fs-small" [ngClass]="{'ml-2': !app.isRTL, 'mr-2': app.isRTL}">Sales</span>
123
+                </li>
124
+
125
+                <li class="flex align-items-center py-3">
126
+                    <div class="person-item flex align-items-center">
127
+                        <img src="assets/demo/images/avatar/avatar-1.png">
128
+                        <div [ngClass]="{'ml-2': !app.isRTL, 'mr-2': app.isRTL}">
129
+                            <div>Anna Fali</div>
130
+                            <small class="muted-text">fali@ultima.org</small>
131
+                        </div>
132
+                    </div>
133
+                    <span class="person-tag pink-bgcolor p-1 fs-small" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">Management</span>
134
+                </li>
135
+
136
+                <li class="flex align-items-center py-3">
137
+                    <div class="person-item flex align-items-center">
138
+                        <img src="assets/demo/images/avatar/avatar-2.png">
139
+                        <div [ngClass]="{'ml-2': !app.isRTL, 'mr-2': app.isRTL}">
140
+                            <div>Jon Stone</div>
141
+                            <small class="muted-text">stone@ultima.org</small>
142
+                        </div>
143
+                    </div>
144
+                    <span class="person-tag pink-bgcolor p-1 fs-small" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">Management</span>
145
+                    <span class="person-tag teal-bgcolor p-1 fs-small" [ngClass]="{'ml-2': !app.isRTL, 'mr-2': app.isRTL}">Finance</span>
146
+                </li>
147
+
148
+                <li class="flex align-items-center py-3">
149
+                    <div class="person-item flex align-items-center">
150
+                        <img src="assets/demo/images/avatar/avatar-3.png">
151
+                        <div [ngClass]="{'ml-2': !app.isRTL, 'mr-2': app.isRTL}">
152
+                            <div>Stephen Shaw</div>
153
+                            <small class="muted-text">shaw@ultima.org</small>
154
+                        </div>
155
+                    </div>
156
+                    <span class="person-tag teal-bgcolor p-1 fs-small" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">Finance</span>
157
+                </li>
158
+            </ul>
159
+        </div>
160
+    </div>
161
+
162
+    <div class="col-12 lg:col-6">
163
+        <div class="card height-100">
164
+            <div class="card-header">
165
+                <h5>Order Graph</h5>
166
+                <div>
167
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu6.toggle($event)"></button>
168
+                    <p-menu #menu6 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
169
+                </div>
170
+            </div>
171
+            <p-chart type="line" [data]="ordersChart" [options]="ordersOptions"></p-chart>
172
+        </div>
173
+    </div>
174
+
175
+    <div class="col-12 lg:col-6">
176
+        <div class="card height-100 widget-timeline">
177
+            <div class="card-header">
178
+                <h5>Timeline</h5>
179
+                <div>
180
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu7.toggle($event)"></button>
181
+                    <p-menu #menu7 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
182
+                </div>
183
+            </div>
184
+
185
+            <p-timeline [value]="timelineEvents" align="left" styleClass="customized-timeline">
186
+                <ng-template pTemplate="marker" let-event>
187
+                    <span class="custom-marker shadow-2 p-2" [style.backgroundColor]="event.color">
188
+                        <i class="marker-icon" [ngClass]="event.icon"></i>
189
+                    </span>
190
+                </ng-template>
191
+                <ng-template pTemplate="content" let-event>
192
+                    <p-card styleClass="mb-3" [header]="event.status" [subheader]="event.date">
193
+                        <img *ngIf="event.image" [src]="'assets/showcase/images/demo/product/' + event.image" [alt]="event.name" width="200" class="shadow-2" />
194
+                        <p>{{event.description}}</p>
195
+                    </p-card>
196
+                </ng-template>
197
+            </p-timeline>
198
+        </div>
199
+    </div>
200
+
201
+    <div class="col-12 md:col-12 lg:col-6">
202
+        <div class="card height-100">
203
+            <p-table [value]="products" [paginator]="true" [rows]="8" styleClass="p-datatable-products">
204
+                <ng-template pTemplate="header">
205
+                    <tr>
206
+                        <th style="width:5rem">Image</th>
207
+                        <th pSortableColumn="name">Name
208
+                            <p-sortIcon field="name"></p-sortIcon>
209
+                        </th>
210
+                        <th pSortableColumn="category">Category
211
+                            <p-sortIcon field="category"></p-sortIcon>
212
+                        </th>
213
+                        <th pSortableColumn="price">Price
214
+                            <p-sortIcon field="price"></p-sortIcon>
215
+                        </th>
216
+                        <th style="width:4rem">View</th>
217
+                    </tr>
218
+                </ng-template>
219
+                <ng-template pTemplate="body" let-product>
220
+                    <tr>
221
+                        <td>
222
+                            <img [src]="'assets/demo/images/product/' + product.image" [alt]="product.image" width="50px" class="shadow-4" />
223
+                        </td>
224
+                        <td>
225
+                            <span class="p-column-title">Name</span>
226
+                            {{product.name}}
227
+                        </td>
228
+                        <td>
229
+                            <span class="p-column-title">Category</span>
230
+                            {{product.category}}
231
+                        </td>
232
+                        <td>
233
+                            <span class="p-column-title">Price</span>
234
+                            {{product.price | currency:'USD'}}
235
+                        </td>
236
+                        <td>
237
+                            <span class="p-column-title">View</span>
238
+                            <button pRipple pButton type="button" icon="pi pi-search" class="p-button-rounded p-button-text mb-1" [ngClass]="{'mr-2': !app.isRTL, 'ml-2': app.isRTL}"></button>
239
+                        </td>
240
+                    </tr>
241
+                </ng-template>
242
+            </p-table>
243
+        </div>
244
+    </div>
245
+
246
+    <div class="col-12 lg:col-6">
247
+        <div class="card height-100">
248
+            <div class="card-header">
249
+                <h5>Chat</h5>
250
+                <div>
251
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu8.toggle($event)"></button>
252
+                    <p-menu #menu8 [popup]="true" [model]="[{label: 'View Media', icon: 'pi pi-fw pi-images'},{label: 'Starred Messages', icon: 'pi pi-fw pi-star-o'},{label: 'Search', icon: 'pi pi-fw pi-search'}]"></p-menu>
253
+                </div>
254
+            </div>
255
+            <div class="widget-chat">
256
+                <ul #chatcontainer>
257
+                    <li *ngFor="let chartMessage of chatMessages; let last = last;" class="flex align-items-start" [ngClass]="{'from': !!chartMessage.from, 'own justify-content-end': !chartMessage.from, 'mb-3': !last, 'mb-1': last}">
258
+                        <img *ngIf="!!chartMessage.url" [src]="chartMessage.url" alt="avatar" [ngClass]="{'mr-2': !app.isRTL, 'ml-2': app.isRTL}">
259
+                        <div class="messages flex flex-column" [ngClass]="{'align-items-start': !!chartMessage.from, 'align-items-end': !chartMessage.from}">
260
+                            <span *ngFor="let message of chartMessage.messages; let first = first" class="message" [ngClass]="{'cyan-bgcolor': !!chartMessage.from, 'pink-bgcolor': !chartMessage.from, 'mt-1': !first}">
261
+                                {{message}}
262
+                            </span>
263
+                        </div>
264
+                    </li>
265
+                </ul>
266
+                <div class="p-inputgroup write-message mt-3">
267
+                    <span class="p-inputgroup-addon">
268
+                        <button pButton pRipple type="button" icon="pi pi-plus-circle" class="p-button-text p-button-plain"></button>
269
+                    </span>
270
+                    <input #chatInput type="text" pInputText placeholder="Write your message (Hint: 'PrimeNG')" (keydown)="onChatKeydown($event)">
271
+                    <span class="p-inputgroup-addon">
272
+                        <button pButton pRipple type="button" icon="pi pi-video" class="p-button-text p-button-plain"></button>
273
+                    </span>
274
+                    <span class="p-inputgroup-addon">
275
+                        <button pButton pRipple type="button" icon="pi pi-clock" (click)="op.toggle($event)" class="p-button-text p-button-plain"></button>
276
+                        <p-overlayPanel #op styleClass="emoji">
277
+                            <ng-template pTemplate>
278
+                                <button *ngFor="let emoji of chatEmojis;" pButton pRipple (click)="op.hide(); onEmojiClick(chatInput, emoji)" type="button" [label]="emoji" class="emoji-button p-2 p-button-text p-button-plain"></button>
279
+                            </ng-template>
280
+                        </p-overlayPanel>
281
+                    </span>
282
+                </div>
283
+            </div>
284
+        </div>
285
+    </div>
286
+
287
+    <div class="col-12 lg:col-3">
288
+        <div class="card height-100">
289
+            <div class="card-header">
290
+                <h5>Activity</h5>
291
+                <div>
292
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu9.toggle($event)"></button>
293
+                    <p-menu #menu9 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
294
+                </div>
295
+            </div>
296
+
297
+            <ul class="widget-activity">
298
+                <li>
299
+                    <div class="activity-item flex flex-column">
300
+                        <div class="activity-title mb-1">Income</div>
301
+                        <div class="activity-subtext mb-2">30 November, 16.20</div>
302
+                        <p-progressBar [value]="50" [showValue]="false"></p-progressBar>
303
+                    </div>
304
+                </li>
305
+                <li>
306
+                    <div class="activity-item flex flex-column">
307
+                        <div class="activity-title mb-1">Tax</div>
308
+                        <div class="activity-subtext mb-2">1 December, 15.27</div>
309
+                        <p-progressBar [value]="15" [showValue]="false"></p-progressBar>
310
+                    </div>
311
+                </li>
312
+                <li>
313
+                    <div class="activity-item flex flex-column">
314
+                        <div class="activity-title mb-1">Invoices</div>
315
+                        <div class="activity-subtext mb-2">1 December, 15.28</div>
316
+                        <p-progressBar [value]="78" [showValue]="false"></p-progressBar>
317
+                    </div>
318
+                </li>
319
+                <li>
320
+                    <div class="activity-item flex flex-column">
321
+                        <div class="activity-title mb-1">Expanses</div>
322
+                        <div class="activity-subtext mb-2">3 December, 09.15</div>
323
+                        <p-progressBar [value]="66" [showValue]="false"></p-progressBar>
324
+                    </div>
325
+                </li>
326
+                <li>
327
+                    <div class="activity-item flex flex-column">
328
+                        <div class="activity-title mb-1">Bonus</div>
329
+                        <div class="activity-subtext mb-2">1 December, 23.55</div>
330
+                        <p-progressBar [value]="85" [showValue]="false"></p-progressBar>
331
+                    </div>
332
+                </li>
333
+                <li>
334
+                    <div class="activity-item flex flex-column">
335
+                        <div class="activity-title mb-1">Revenue</div>
336
+                        <div class="activity-subtext mb-2">30 November, 16.20</div>
337
+                        <p-progressBar [value]="54" [showValue]="false"></p-progressBar>
338
+                    </div>
339
+                </li>
340
+            </ul>
341
+        </div>
342
+    </div>
343
+
344
+    <div class="col-12 lg:col-3">
345
+        <div class="card height-100">
346
+            <div class="card-header">
347
+                <h5>Best Sellers</h5>
348
+                <div>
349
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu10.toggle($event)"></button>
350
+                    <p-menu #menu10 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
351
+                </div>
352
+            </div>
353
+            <ul class="widget-bestsellers">
354
+                <li>
355
+                    <div class="bestseller-item flex align-items-center p-3 mb-2">
356
+                        <img src="assets/demo/images/product/blue-band.jpg" alt="product" [ngClass]="{'mr-3': !app.isRTL, 'ml-3': app.isRTL}">
357
+                        <span>Blue Band</span>
358
+                        <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
359
+                    </div>
360
+
361
+                    <div class="bestseller-item flex align-items-center p-3 mb-2">
362
+                        <img src="assets/demo/images/product/bracelet.jpg" alt="product" [ngClass]="{'mr-3': !app.isRTL, 'ml-3': app.isRTL}">
363
+                        <span>Bracelet</span>
364
+                        <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
365
+                    </div>
366
+
367
+                    <div class="bestseller-item flex align-items-center p-3 mb-2">
368
+                        <img src="assets/demo/images/product/black-watch.jpg" alt="product" [ngClass]="{'mr-3': !app.isRTL, 'ml-3': app.isRTL}">
369
+                        <span>Black Watch</span>
370
+                        <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
371
+                    </div>
372
+
373
+                    <div class="bestseller-item flex align-items-center p-3 mb-2">
374
+                        <img src="assets/demo/images/product/bamboo-watch.jpg" alt="product" [ngClass]="{'mr-3': !app.isRTL, 'ml-3': app.isRTL}">
375
+                        <span>Bamboo Watch</span>
376
+                        <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
377
+                    </div>
378
+
379
+                    <div class="bestseller-item flex align-items-center p-3 mb-2">
380
+                        <img src="assets/demo/images/product/blue-t-shirt.jpg" alt="product" [ngClass]="{'mr-3': !app.isRTL, 'ml-3': app.isRTL}">
381
+                        <span>Blue T-Shirt</span>
382
+                        <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
383
+                    </div>
384
+
385
+                    <div class="bestseller-item flex align-items-center p-3 mb-2">
386
+                        <img src="assets/demo/images/product/game-controller.jpg" alt="product" [ngClass]="{'mr-3': !app.isRTL, 'ml-3': app.isRTL}">
387
+                        <span>Game Controller</span>
388
+                        <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
389
+                    </div>
390
+
391
+                    <div class="bestseller-item flex align-items-center p-3 mb-2">
392
+                        <img src="assets/demo/images/product/gold-phone-case.jpg" alt="product" [ngClass]="{'mr-3': !app.isRTL, 'ml-3': app.isRTL}">
393
+                        <span>Phone Case</span>
394
+                        <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
395
+                    </div>
396
+
397
+                    <div class="bestseller-item flex align-items-center p-3 mb-2">
398
+                        <img src="assets/demo/images/product/purple-t-shirt.jpg" alt="product" [ngClass]="{'mr-3': !app.isRTL, 'ml-3': app.isRTL}">
399
+                        <span>Purple T-Shirt</span>
400
+                        <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
401
+                    </div>
402
+                </li>
403
+            </ul>
404
+        </div>
405
+    </div>
406
+</div>

+ 394
- 0
Angular/src/app/demo/view/dashboard.component.ts 查看文件

@@ -0,0 +1,394 @@
1
+import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
2
+import { EventService } from '../service/eventservice';
3
+import { SelectItem } from 'primeng/api';
4
+import { Product } from '../domain/product';
5
+import { ProductService } from '../service/productservice';
6
+import { AppBreadcrumbService } from '../../app.breadcrumb.service';
7
+import { AppMainComponent } from 'src/app/app.main.component';
8
+import { AppComponent } from 'src/app/app.component';
9
+
10
+@Component({
11
+    templateUrl: './dashboard.component.html'
12
+})
13
+export class DashboardComponent implements OnInit {
14
+
15
+    cities: SelectItem[];
16
+
17
+    products: Product[];
18
+
19
+    ordersChart: any;
20
+
21
+    ordersOptions: any;
22
+
23
+    selectedCity: any;
24
+
25
+    timelineEvents: any[];
26
+
27
+    overviewChartData1: any;
28
+
29
+    overviewChartData2: any;
30
+
31
+    overviewChartData3: any;
32
+
33
+    overviewChartData4: any;
34
+
35
+    overviewChartOptions1: any;
36
+
37
+    overviewChartOptions2: any;
38
+
39
+    overviewChartOptions3: any;
40
+
41
+    overviewChartOptions4: any;
42
+
43
+    chatMessages: any[];
44
+
45
+    chatEmojis: any[];
46
+
47
+    @ViewChild('chatcontainer') chatContainerViewChild: ElementRef;
48
+
49
+    constructor(public app: AppComponent, public appMain: AppMainComponent, private productService: ProductService,
50
+                private eventService: EventService, private breadcrumbService: AppBreadcrumbService) {
51
+        this.breadcrumbService.setItems([
52
+            { label: 'Dashboard', routerLink: ['/'] }
53
+        ]);
54
+    }
55
+
56
+    ngOnInit() {
57
+        this.productService.getProducts().then(data => this.products = data);
58
+
59
+        this.cities = [];
60
+        this.cities.push({ label: 'Select City', value: null });
61
+        this.cities.push({ label: 'New York', value: { id: 1, name: 'New York', code: 'NY' } });
62
+        this.cities.push({ label: 'Rome', value: { id: 2, name: 'Rome', code: 'RM' } });
63
+        this.cities.push({ label: 'London', value: { id: 3, name: 'London', code: 'LDN' } });
64
+        this.cities.push({ label: 'Istanbul', value: { id: 4, name: 'Istanbul', code: 'IST' } });
65
+        this.cities.push({ label: 'Paris', value: { id: 5, name: 'Paris', code: 'PRS' } });
66
+
67
+        this.chatMessages = [
68
+            { from: 'Ioni Bowcher', url: 'assets/demo/images/avatar/ionibowcher.png', messages: ['Hey M. hope you are well.', 'Our idea is accepted by the board. Now it’s time to execute it'] },
69
+            { messages: ['We did it! 🤠'] },
70
+            { from: 'Ioni Bowcher', url: 'assets/demo/images/avatar/ionibowcher.png', messages: ['That\'s really good!'] },
71
+            { messages: ['But it’s important to ship MVP ASAP'] },
72
+            { from: 'Ioni Bowcher', url: 'assets/demo/images/avatar/ionibowcher.png', messages: ['I’ll be looking at the process then, just to be sure 🤓'] },
73
+            { messages: ['That’s awesome. Thanks!'] }
74
+        ];
75
+
76
+        this.chatEmojis = [
77
+            '😀', '😃', '😄', '😁', '😆', '😅', '😂', '🤣', '😇', '😉', '😊', '🙂', '🙃', '😋', '😌', '😍', '🥰', '😘', '😗', '😙', '😚', '🤪', '😜', '😝', '😛',
78
+            '🤑', '😎', '🤓', '🧐', '🤠', '🥳', '🤗', '🤡', '😏', '😶', '😐', '😑', '😒', '🙄', '🤨', '🤔', '🤫', '🤭', '🤥', '😳', '😞', '😟', '😠', '😡', '🤬', '😔',
79
+            '😟', '😠', '😡', '🤬', '😔', '😕', '🙁', '😬', '🥺', '😣', '😖', '😫', '😩', '🥱', '😤', '😮', '😱', '😨', '😰', '😯', '😦', '😧', '😢', '😥', '😪', '🤤'
80
+        ];
81
+
82
+        this.ordersChart = {
83
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September'],
84
+            datasets: [{
85
+                label: 'New Orders',
86
+                data: [31, 83, 69, 29, 62, 25, 59, 26, 46],
87
+                borderColor: [
88
+                    '#4DD0E1',
89
+                ],
90
+                backgroundColor: [
91
+                    'rgba(77, 208, 225, 0.8)',
92
+                ],
93
+                borderWidth: 2,
94
+                fill: true,
95
+                tension: .4
96
+            }, {
97
+                label: 'Completed Orders',
98
+                data: [67, 98, 27, 88, 38, 3, 22, 60, 56],
99
+                borderColor: [
100
+                    '#3F51B5',
101
+                ],
102
+                backgroundColor: [
103
+                    'rgba(63, 81, 181, 0.8)',
104
+                ],
105
+                borderWidth: 2,
106
+                fill: true,
107
+                tension: .4
108
+            }]
109
+        };
110
+
111
+        this.ordersOptions = this.getOrdersOptions();
112
+
113
+        this.overviewChartData1 = {
114
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September'],
115
+            datasets: [
116
+                {
117
+                    data: [50, 64, 32, 24, 18, 27, 20, 36, 30],
118
+                    borderColor: [
119
+                        '#4DD0E1',
120
+                    ],
121
+                    backgroundColor: [
122
+                        'rgba(77, 208, 225, 0.8)',
123
+                    ],
124
+                    borderWidth: 2,
125
+                    fill: true,
126
+                    tension: .4
127
+                }
128
+            ]
129
+        };
130
+
131
+        this.overviewChartData2 = {
132
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September'],
133
+            datasets: [
134
+                {
135
+                    data: [11, 30, 52, 35, 39, 20, 14, 18, 29],
136
+                    borderColor: [
137
+                        '#4DD0E1',
138
+                    ],
139
+                    backgroundColor: [
140
+                        'rgba(77, 208, 225, 0.8)',
141
+                    ],
142
+                    borderWidth: 2,
143
+                    fill: true,
144
+                    tension: .4
145
+                }
146
+            ]
147
+        };
148
+
149
+        this.overviewChartData3 = {
150
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September'],
151
+            datasets: [
152
+                {
153
+                    data: [20, 29, 39, 36, 45, 24, 28, 20, 15],
154
+                    borderColor: [
155
+                        '#4DD0E1',
156
+                    ],
157
+                    backgroundColor: [
158
+                        'rgba(77, 208, 225, 0.8)',
159
+                    ],
160
+                    borderWidth: 2,
161
+                    fill: true,
162
+                    tension: .4
163
+                }
164
+            ]
165
+        };
166
+
167
+        this.overviewChartData4 = {
168
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September'],
169
+            datasets: [
170
+                {
171
+                    data: [30, 39, 50, 21, 33, 18, 10, 24, 20],
172
+                    borderColor: [
173
+                        '#4DD0E1',
174
+                    ],
175
+                    backgroundColor: [
176
+                        'rgba(77, 208, 225, 0.8)',
177
+                    ],
178
+                    borderWidth: 2,
179
+                    fill: true,
180
+                    tension: .4
181
+                }
182
+            ]
183
+        };
184
+
185
+        this.overviewChartOptions1 = {
186
+            plugins: {
187
+                legend: {
188
+                    display: false
189
+                }
190
+            },
191
+            scales: {
192
+                y: {
193
+                    display: false
194
+                },
195
+                x: {
196
+                    display: false
197
+                }
198
+            },
199
+            tooltips: {
200
+                enabled: false
201
+            },
202
+            elements: {
203
+                point: {
204
+                    radius: 0
205
+                }
206
+            },
207
+        };
208
+
209
+        this.overviewChartOptions2 = {
210
+            plugins: {
211
+                legend: {
212
+                    display: false
213
+                }
214
+            },
215
+            scales: {
216
+                y: {
217
+                    display: false
218
+                },
219
+                x: {
220
+                    display: false
221
+                }
222
+            },
223
+            tooltips: {
224
+                enabled: false
225
+            },
226
+            elements: {
227
+                point: {
228
+                    radius: 0
229
+                }
230
+            },
231
+        };
232
+
233
+        this.overviewChartOptions3 = {
234
+            plugins: {
235
+                legend: {
236
+                    display: false
237
+                }
238
+            },
239
+            scales: {
240
+                y: {
241
+                    display: false
242
+                },
243
+                x: {
244
+                    display: false
245
+                }
246
+            },
247
+            tooltips: {
248
+                enabled: false
249
+            },
250
+            elements: {
251
+                point: {
252
+                    radius: 0
253
+                }
254
+            },
255
+        };
256
+
257
+        this.overviewChartOptions4 = {
258
+            plugins: {
259
+                legend: {
260
+                    display: false
261
+                }
262
+            },
263
+            scales: {
264
+                y: {
265
+                    display: false
266
+                },
267
+                x: {
268
+                    display: false
269
+                }
270
+            },
271
+            tooltips: {
272
+                enabled: false
273
+            },
274
+            elements: {
275
+                point: {
276
+                    radius: 0
277
+                }
278
+            },
279
+        };
280
+
281
+        this.setOverviewColors();
282
+
283
+        this.appMain['refreshChart'] = () => {
284
+            this.ordersOptions = this.getOrdersOptions();
285
+            this.setOverviewColors();
286
+        };
287
+
288
+        this.timelineEvents = [
289
+            { status: 'Ordered', date: '15/10/2020 10:30', icon: 'pi pi-shopping-cart', color: '#E91E63', description: 'Richard Jones (C8012) has ordered a blue t-shirt for $79.' },
290
+            { status: 'Processing', date: '15/10/2020 14:00', icon: 'pi pi-cog', color: '#FB8C00', description: 'Order #99207 has processed succesfully.' },
291
+            { status: 'Shipped', date: '15/10/2020 16:15', icon: 'pi pi-compass', color: '#673AB7', description: 'Order #99207 has shipped with shipping code 2222302090.' },
292
+            { status: 'Delivered', date: '16/10/2020 10:00', icon: 'pi pi-check-square', color: '#0097A7', description: 'Richard Jones (C8012) has recieved his blue t-shirt.' }
293
+        ];
294
+    }
295
+
296
+    onEmojiClick(chatInput, emoji) {
297
+        if (chatInput) {
298
+            chatInput.value += emoji;
299
+            chatInput.focus();
300
+        }
301
+    }
302
+
303
+    onChatKeydown(event) {
304
+        if (event.key === 'Enter') {
305
+            const message = event.currentTarget.value;
306
+            const lastMessage = this.chatMessages[this.chatMessages.length - 1];
307
+
308
+            if (lastMessage.from) {
309
+                this.chatMessages.push({ messages: [message] });
310
+            }
311
+            else {
312
+                lastMessage.messages.push(message);
313
+            }
314
+
315
+            if (message.match(/primeng|primereact|primefaces|primevue/i)) {
316
+                this.chatMessages.push({ from: 'Ioni Bowcher', url: 'assets/demo/images/avatar/ionibowcher.png', messages: ['Always bet on Prime!'] });
317
+            }
318
+
319
+            event.currentTarget.value = '';
320
+
321
+            const el = this.chatContainerViewChild.nativeElement;
322
+            setTimeout(() => {
323
+                el.scroll({
324
+                    top: el.scrollHeight,
325
+                    behavior: 'smooth'
326
+                });
327
+            }, 1);
328
+        }
329
+    }
330
+
331
+    setOverviewColors() {
332
+        const { pinkBorderColor, pinkBgColor, tealBorderColor, tealBgColor } = this.getOverviewColors();
333
+
334
+        this.overviewChartData1.datasets[0].borderColor[0] = tealBorderColor;
335
+        this.overviewChartData1.datasets[0].backgroundColor[0] = tealBgColor;
336
+
337
+        this.overviewChartData2.datasets[0].borderColor[0] = tealBorderColor;
338
+        this.overviewChartData2.datasets[0].backgroundColor[0] = tealBgColor;
339
+
340
+        this.overviewChartData3.datasets[0].borderColor[0] = pinkBorderColor;
341
+        this.overviewChartData3.datasets[0].backgroundColor[0] = pinkBgColor;
342
+
343
+        this.overviewChartData4.datasets[0].borderColor[0] = tealBorderColor;
344
+        this.overviewChartData4.datasets[0].backgroundColor[0] = tealBgColor;
345
+    }
346
+
347
+    getOverviewColors() {
348
+        const isLight = this.app.layoutMode === 'light';
349
+        return {
350
+            pinkBorderColor: isLight ? '#E91E63' : '#EC407A',
351
+            pinkBgColor: isLight ? '#F48FB1' : '#F8BBD0',
352
+            tealBorderColor: isLight ? '#009688' : '#26A69A',
353
+            tealBgColor: isLight ? '#80CBC4' : '#B2DFDB'
354
+        };
355
+    }
356
+
357
+    getOrdersOptions() {
358
+        const textColor = getComputedStyle(document.body).getPropertyValue('--text-color') || 'rgba(0, 0, 0, 0.87)';
359
+        const gridLinesColor = getComputedStyle(document.body).getPropertyValue('--divider-color') || 'rgba(160, 167, 181, .3)';
360
+        const fontFamily = getComputedStyle(document.body).getPropertyValue('--font-family');
361
+        return {
362
+            plugins: {
363
+                legend: {
364
+                    display: true,
365
+                    labels: {
366
+                        fontFamily,
367
+                        fontColor: textColor,
368
+                    }
369
+                }
370
+            },
371
+            responsive: true,
372
+            scales: {
373
+                y: {
374
+                    ticks: {
375
+                        fontFamily,
376
+                        color: textColor
377
+                    },
378
+                    grid: {
379
+                        color: gridLinesColor
380
+                    }
381
+                },
382
+                x: {
383
+                    ticks: {
384
+                        fontFamily,
385
+                        color: textColor
386
+                    },
387
+                    grid: {
388
+                        color: gridLinesColor
389
+                    }
390
+                }
391
+            }
392
+        };
393
+    }
394
+}

+ 358
- 0
Angular/src/app/demo/view/dashboardanalytics.component.html 查看文件

@@ -0,0 +1,358 @@
1
+<div class="grid dashboard">
2
+    <div class="col-12 md:col-8">
3
+        <div class="card height-100">
4
+            <div class="card-header">
5
+                <h5>Monthly Comparison</h5>
6
+                <button pRipple pButton type="button" label="Vertical/Stacked Data" class="p-button-text" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}" (click)="changeMonthlyDataView()"></button>
7
+            </div>
8
+
9
+            <p-chart #bar type="bar" [data]="chartMonthlyData" [options]="chartMonthlyOptions" responsive="true" height="400px"></p-chart>
10
+        </div>
11
+    </div>
12
+
13
+    <div class="col-12 md:col-4">
14
+        <div class="card widget-insights height-100">
15
+            <div class="card-header mb-2">
16
+                <h5>Insights</h5>
17
+                <div>
18
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu11.toggle($event)"></button>
19
+                    <p-menu #menu11 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
20
+                </div>
21
+            </div>
22
+            <div class="card-subheader mb-2 flex align-items-center">
23
+                <span>November 22 - November 29</span>
24
+                <button pRipple pButton type="button" label="Semi/Full Data" class="p-button-text" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}" (click)="changeDoughnutDataView()"></button>
25
+            </div>
26
+            <p-chart #doughnut type="doughnut" [data]="doughnutData" [options]="doughnutOptions" responsive="true"></p-chart>
27
+            <div class="flex flex-column justify-content-center">
28
+                <div class="flex flex-row align-items-center mt-4 px-3">
29
+                    <i class="pi pi-thumbs-up p-3 rounded-circle lightgreen-bgcolor solid-surface-text-color"></i>
30
+                    <div class="flex flex-column" [ngClass]="{'ml-3': !app.isRTL, 'mr-3': app.isRTL}">
31
+                        <span>Best Day of the Week</span>
32
+                        <small>Friday</small>
33
+                    </div>
34
+                    <span class="indigo-color" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">95</span>
35
+                </div>
36
+                <div class="flex flex-row align-items-center my-4 px-3">
37
+                    <i class="pi pi-thumbs-down rounded-circle p-3 orange-bgcolor solid-surface-text-color"></i>
38
+                    <div class="flex flex-column" [ngClass]="{'ml-3': !app.isRTL, 'mr-3': app.isRTL}">
39
+                        <span>Worst Day of the Week</span>
40
+                        <small>Saturday</small>
41
+                    </div>
42
+                    <span class="indigo-color" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}">6</span>
43
+                </div>
44
+            </div>
45
+        </div>
46
+    </div>
47
+
48
+    <div class="col-12 md:col-4">
49
+        <div class="card widget-social">
50
+            <div class="flex justify-content-between align-items-center p-3">
51
+                <div class="social-icon">
52
+                    <i class="pi pi-twitter blue-color fs-xxlarge"></i>
53
+                </div>
54
+                <div class="info flex flex-column">
55
+                    <span class="value">44.995</span>
56
+                    <span class="subtext mt-2">Retweets</span>
57
+                </div>
58
+            </div>
59
+
60
+            <div class="stats flex justify-content-between mt-3">
61
+                <div class="left flex flex-column ">
62
+                    <span class="title">Target</span>
63
+                    <span class="value mb-2">10.000</span>
64
+                    <p-progressBar [value]="50" [showValue]="false"></p-progressBar>
65
+                </div>
66
+                <div class="right flex flex-column">
67
+                    <span class="title">All Time Record</span>
68
+                    <span class="value mb-2">50.702</span>
69
+                    <p-progressBar [value]="24" [showValue]="false"></p-progressBar>
70
+                </div>
71
+            </div>
72
+        </div>
73
+    </div>
74
+
75
+    <div class="col-12 md:col-4">
76
+        <div class="card widget-social">
77
+            <div class="flex justify-content-between align-items-center p-3">
78
+                <div class="social-icon">
79
+                    <i class="pi pi-facebook indigo-color fs-xxlarge"></i>
80
+                </div>
81
+                <div class="info flex flex-column">
82
+                    <span class="value">44.995</span>
83
+                    <span class="subtext mt-2">Facebook Interactions</span>
84
+                </div>
85
+            </div>
86
+
87
+            <div class="stats flex justify-content-between mt-3">
88
+                <div class="left flex flex-column ">
89
+                    <span class="title">Target</span>
90
+                    <span class="value mb-2">10.000</span>
91
+                    <p-progressBar [value]="23" [showValue]="false"></p-progressBar>
92
+                </div>
93
+                <div class="right flex flex-column">
94
+                    <span class="title">All Time Record</span>
95
+                    <span class="value mb-2">99.028</span>
96
+                    <p-progressBar [value]="38" [showValue]="false"></p-progressBar>
97
+                </div>
98
+            </div>
99
+        </div>
100
+    </div>
101
+
102
+    <div class="col-12 md:col-4">
103
+        <div class="card widget-social">
104
+            <div class="flex justify-content-between align-items-center p-3">
105
+                <div class="social-icon">
106
+                    <i class="pi pi-github text-color fs-xxlarge"></i>
107
+                </div>
108
+                <div class="info flex flex-column">
109
+                    <span class="value">81.002</span>
110
+                    <span class="subtext mt-2">Star</span>
111
+                </div>
112
+            </div>
113
+
114
+            <div class="stats flex justify-content-between mt-3">
115
+                <div class="left flex flex-column ">
116
+                    <span class="title">Target</span>
117
+                    <span class="value mb-2">10.000</span>
118
+                    <p-progressBar [value]="62" [showValue]="false"></p-progressBar>
119
+                </div>
120
+                <div class="right flex flex-column">
121
+                    <span class="title">All Time Record</span>
122
+                    <span class="value mb-2">162.550</span>
123
+                    <p-progressBar [value]="14" [showValue]="false"></p-progressBar>
124
+                </div>
125
+            </div>
126
+        </div>
127
+    </div>
128
+
129
+    <div class="col-12 md:col-12">
130
+        <div class="card grid grid-nogutter widget-sales block sm:flex">
131
+            <div class="lg:col-3 md:col-6 sm:col-12 p-0">
132
+                <div class="sales-info flex flex-column p-4">
133
+                    <span class="muted-text">Store A Sales</span>
134
+                    <span class="fs-large mt-2">
135
+                        <i *ngIf="storeADiff !== 0" class="fw-700 fs-large pi" [ngClass]="{'pr-1': !app.isRTL, 'pl-1': app.isRTL, 'pi-arrow-up green-color': storeADiff > 0, 'pi-arrow-down pink-color': storeADiff < 0}"></i>
136
+                        ${{storeATotalValue}}
137
+                        <span *ngIf="storeADiff !== 0" class="fw-500 fs-normal" [ngClass]="{'ml-1': !app.isRTL, 'mr-1': app.isRTL, 'green-color': storeADiff > 0, 'pink-color': storeADiff < 0}">
138
+                            {{storeADiff > 0 ? '+' : ''}}{{storeADiff}}
139
+                        </span>
140
+                    </span>
141
+                </div>
142
+                <div class="px-4">
143
+                    <p-chart #storeA type="line" [data]="storeAData" [options]="storeAOptions" responsive="true"></p-chart>
144
+                </div>
145
+            </div>
146
+            <div class="lg:col-3 md:col-6 sm:col-12 p-0">
147
+                <div class="sales-info flex flex-column p-4">
148
+                    <span class="muted-text">Store B Sales</span>
149
+                    <span class="fs-large mt-2">
150
+                        <i *ngIf="storeBDiff !== 0" class="fw-700 fs-large pi" [ngClass]="{'pr-1': !app.isRTL, 'pl-1': app.isRTL, 'pi-arrow-up green-color': storeBDiff > 0, 'pi-arrow-down pink-color': storeBDiff < 0}"></i>
151
+                        ${{storeBTotalValue}}
152
+                        <span *ngIf="storeBDiff !== 0" class="fw-500 fs-normal" [ngClass]="{'ml-1': !app.isRTL, 'mr-1': app.isRTL,'green-color': storeBDiff > 0, 'pink-color': storeBDiff < 0}">
153
+                            {{storeBDiff > 0 ? '+' : ''}}{{storeBDiff}}
154
+                        </span>
155
+                    </span>
156
+                </div>
157
+                <div class="px-4">
158
+                    <p-chart #storeB type="line" [data]="storeBData" [options]="storeBOptions" responsive="true"></p-chart>
159
+                </div>
160
+            </div>
161
+            <div class="lg:col-3 md:col-6 sm:col-12 p-0">
162
+                <div class="sales-info flex flex-column p-4">
163
+                    <span class="muted-text">Store C Sales</span>
164
+                    <span class="fs-large mt-2">
165
+                        <i *ngIf="storeCDiff !== 0" class="fw-700 fs-large pi" [ngClass]="{'pr-1': !app.isRTL, 'pl-1': app.isRTL, 'pi-arrow-up green-color': storeCDiff > 0, 'pi-arrow-down pink-color': storeCDiff < 0}"></i>
166
+                        ${{storeCTotalValue}}
167
+                        <span *ngIf="storeCDiff !== 0" class="fw-500 fs-normal" [ngClass]="{'ml-1': !app.isRTL, 'mr-1': app.isRTL, 'green-color': storeCDiff > 0, 'pink-color': storeCDiff < 0}">
168
+                            {{storeCDiff > 0 ? '+' : ''}}{{storeCDiff}}
169
+                        </span>
170
+                    </span>
171
+                </div>
172
+                <div class="px-4">
173
+                    <p-chart #storeC type="line" [data]="storeCData" [options]="storeCOptions" responsive="true"></p-chart>
174
+                </div>
175
+            </div>
176
+            <div class="lg:col-3 md:col-6 sm:col-12 p-0">
177
+                <div class="sales-info flex flex-column p-4">
178
+                    <span class="muted-text">Store D Sales</span>
179
+                    <span class="fs-large mt-2">
180
+                        <i *ngIf="storeDDiff !== 0" class="fw-700 fs-large pi" [ngClass]="{'pr-1': !app.isRTL, 'pl-1': app.isRTL, 'pi-arrow-up green-color': storeDDiff > 0, 'pi-arrow-down pink-color': storeDDiff < 0}"></i>
181
+                        ${{storeDTotalValue}}
182
+                        <span *ngIf="storeDDiff !== 0" class="fw-500 fs-normal" [ngClass]="{'ml-1': !app.isRTL, 'mr-1': app.isRTL, 'green-color': storeDDiff > 0, 'pink-color': storeDDiff < 0}">
183
+                            {{storeDDiff > 0 ? '+' : ''}}{{storeDDiff}}
184
+                        </span>
185
+                    </span>
186
+                </div>
187
+                <div class="px-4">
188
+                    <p-chart #storeD type="line" [data]="storeDData" [options]="storeDOptions" responsive="true"></p-chart>
189
+                </div>
190
+            </div>
191
+        </div>
192
+    </div>
193
+
194
+    <div class="col-12 md:col-6">
195
+        <div class="card height-100 widget-topsearchs">
196
+            <div class=card-header>
197
+                <h5>Top Searchs</h5>
198
+                <div>
199
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu12.toggle($event)"></button>
200
+                    <p-menu #menu12 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
201
+                </div>
202
+            </div>
203
+            <div class="flex justify-content-between item">
204
+                <span>Mat Orange Case</span>
205
+                <span class="value type-green">82% CONV RATE</span>
206
+            </div>
207
+            <div class="flex justify-content-between item">
208
+                <span>Space T-Shirt</span>
209
+                <span class="value type-green">78% CONV RATE</span>
210
+            </div>
211
+            <div class="flex justify-content-between item">
212
+                <span>Orange Black Hoodie</span>
213
+                <span class="value type-green">61% CONV RATE</span>
214
+            </div>
215
+            <div class="flex justify-content-between item">
216
+                <span>Wonders Notebook</span>
217
+                <span class="value type-yellow">48 CONV RATE</span>
218
+            </div>
219
+            <div class="flex justify-content-between item">
220
+                <span>Robots T-Shirt</span>
221
+                <span class="value type-yellow">34% CONV RATE</span>
222
+            </div>
223
+            <div class="flex justify-content-between item">
224
+                <span>Green Portal Sticker</span>
225
+                <span class="value type-pink">11% CONV RATE</span>
226
+            </div>
227
+        </div>
228
+    </div>
229
+
230
+    <div class="col-12 md:col-6">
231
+        <div class="card">
232
+            <p-table [value]="products" [paginator]="true" [rows]="4" styleClass="p-datatable-products">
233
+                <ng-template pTemplate="header">
234
+                    <tr>
235
+                        <th style="width:5rem">Image</th>
236
+                        <th pSortableColumn="name">Name
237
+                            <p-sortIcon field="name"></p-sortIcon>
238
+                        </th>
239
+                        <th pSortableColumn="category">Category
240
+                            <p-sortIcon field="category"></p-sortIcon>
241
+                        </th>
242
+                        <th pSortableColumn="price">Price
243
+                            <p-sortIcon field="price"></p-sortIcon>
244
+                        </th>
245
+                        <th style="width:4rem">View</th>
246
+                    </tr>
247
+                </ng-template>
248
+                <ng-template pTemplate="body" let-product>
249
+                    <tr>
250
+                        <td>
251
+                            <img [src]="'assets/demo/images/product/' + product.image" [alt]="product.image" width="50px" class="shadow-4" />
252
+                        </td>
253
+                        <td>
254
+                            <span class="p-column-title">Name</span>
255
+                            {{product.name}}
256
+                        </td>
257
+                        <td>
258
+                            <span class="p-column-title">Category</span>
259
+                            {{product.category}}
260
+                        </td>
261
+                        <td>
262
+                            <span class="p-column-title">Price</span>
263
+                            {{product.price | currency:'USD'}}
264
+                        </td>
265
+                        <td>
266
+                            <span class="p-column-title">View</span>
267
+                            <button pRipple pButton type="button" icon="pi pi-search" class="p-button-rounded p-button-text mb-1" [ngClass]="{'mr-2': !app.isRTL, 'ml-2': app.isRTL}"></button>
268
+                        </td>
269
+                    </tr>
270
+                </ng-template>
271
+            </p-table>
272
+        </div>
273
+    </div>
274
+
275
+    <div class="col-12 md:col-4">
276
+        <div class="card widget-expenses">
277
+            <div class=card-header>
278
+                <h5>Expenses</h5>
279
+                <div>
280
+                    <button pButton pRipple type="button" icon="pi pi-ellipsis-h" class="p-button-rounded p-button-text p-button-plain" (click)="menu13.toggle($event)"></button>
281
+                    <p-menu #menu13 [popup]="true" [model]="[{label: 'Update', icon: 'pi pi-fw pi-refresh'},{label: 'Edit', icon: 'pi pi-fw pi-pencil'}]"></p-menu>
282
+                </div>
283
+            </div>
284
+            <div class="card-subheader mb-2 pb-3">
285
+                November 22 - November 29
286
+            </div>
287
+
288
+            <div class="flex justify-content-between align-items-center my-2 item">
289
+                <div class="flex flex-column">
290
+                    <i class="pi pi-cloud type mb-2"></i>
291
+                    <span class="value mb-1">$30.247</span>
292
+                    <span class="subtext">Cloud Infrastructure</span>
293
+                </div>
294
+                <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
295
+            </div>
296
+            <div class="flex justify-content-between align-items-center my-2 item">
297
+                <div class="flex flex-column">
298
+                    <i class="pi pi-tag type mb-2"></i>
299
+                    <span class="value mb-1">$29.550</span>
300
+                    <span class="subtext">General Goods</span>
301
+                </div>
302
+                <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
303
+            </div>
304
+            <div class="flex justify-content-between align-items-center my-2 item">
305
+                <div class="flex flex-column">
306
+                    <i class="pi pi-desktop type mb-2"></i>
307
+                    <span class="value mb-1">$16.660</span>
308
+                    <span class="subtext">Consumer Electronics</span>
309
+                </div>
310
+                <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
311
+            </div>
312
+            <div class="flex justify-content-between align-items-center my-2 item">
313
+                <div class="flex flex-column">
314
+                    <i class="pi pi-compass type mb-2"></i>
315
+                    <span class="value mb-1">$5.801</span>
316
+                    <span class="subtext">Incalculables</span>
317
+                </div>
318
+                <span class="item-button"><a href="#"><i class="pi pi-chevron-right"></i></a></span>
319
+            </div>
320
+        </div>
321
+    </div>
322
+
323
+    <div class="col-12 md:col-8">
324
+        <div class="card widget-traffic height-100">
325
+            <div class="card-header">
326
+                <h5>All Traffic Channels</h5>
327
+                <button pRipple pButton type="button" label="Pie/Doughnut Data" class="p-button-text" [ngClass]="{'ml-auto': !app.isRTL, 'mr-auto': app.isRTL}" (click)="togglePieDoughnut()"></button>
328
+                <button pRipple pButton type="button" label="Semi/Full Data" class="p-button-text mx-2" (click)="changePieDoughnutDataView()"></button>
329
+            </div>
330
+            <div class="flex grid">
331
+                <div class="col-12 md:col-6 left flex flex-column justify-content-evenly">
332
+                    <div class="total flex flex-column">
333
+                        <span class="title mb-2">Total</span>
334
+                        <span class="value mb-5">66.761</span>
335
+                    </div>
336
+
337
+                    <div class="info flex justify-content-between">
338
+                        <div class="organic flex flex-column">
339
+                            <span class="title mb-1">Organic</span>
340
+                            <span class="value">51.596</span>
341
+                        </div>
342
+                        <div class="direct flex flex-column">
343
+                            <span class="title mb-1">Direct</span>
344
+                            <span class="value">11.421</span>
345
+                        </div>
346
+                        <div class="referral flex flex-column">
347
+                            <span class="title mb-1">Referral</span>
348
+                            <span class="value">3.862</span>
349
+                        </div>
350
+                    </div>
351
+                </div>
352
+                <div class="col-12 md:col-6 right flex justify-content-center">
353
+                    <p-chart #pie type="pie" [data]="pieData" [options]="pieOptions" [style]="{'width': '70%'}"></p-chart>
354
+                </div>
355
+            </div>
356
+        </div>
357
+    </div>
358
+</div>

+ 629
- 0
Angular/src/app/demo/view/dashboardanalytics.component.ts 查看文件

@@ -0,0 +1,629 @@
1
+import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core';
2
+import { EventService } from '../service/eventservice';
3
+import { SelectItem } from 'primeng/api';
4
+import { Product } from '../domain/product';
5
+import { ProductService } from '../service/productservice';
6
+import { AppBreadcrumbService } from '../../app.breadcrumb.service';
7
+import { UIChart } from 'primeng/chart';
8
+import { AppComponent } from 'src/app/app.component';
9
+import { AppMainComponent } from 'src/app/app.main.component';
10
+
11
+@Component({
12
+    templateUrl: './dashboardanalytics.component.html'
13
+})
14
+export class DashboardAnalyticsComponent implements OnInit, OnDestroy {
15
+
16
+    cities: SelectItem[];
17
+
18
+    products: Product[];
19
+
20
+    chartMonthlyData: any;
21
+
22
+    chartMonthlyOptions: any;
23
+
24
+    doughnutData: any;
25
+
26
+    doughnutOptions: any;
27
+
28
+    storeATotalValue = 100;
29
+
30
+    storeADiff = 0;
31
+
32
+    storeAStatus = 0;
33
+
34
+    storeAData: any;
35
+
36
+    storeAOptions: any;
37
+
38
+    storeBTotalValue = 120;
39
+
40
+    storeBDiff = 0;
41
+
42
+    storeBStatus = 0;
43
+
44
+    storeBData: any;
45
+
46
+    storeBOptions: any;
47
+
48
+    storeCTotalValue = 150;
49
+
50
+    storeCDiff = 0;
51
+
52
+    storeCStatus = 0;
53
+
54
+    storeCData: any;
55
+
56
+    storeCOptions: any;
57
+
58
+    storeDTotalValue = 80;
59
+
60
+    storeDDiff = 0;
61
+
62
+    storeDStatus = 0;
63
+
64
+    storeDData: any;
65
+
66
+    storeDOptions: any;
67
+
68
+    storeInterval: any;
69
+
70
+    pieData: any;
71
+
72
+    pieOptions: any;
73
+
74
+    mainData: any;
75
+
76
+    events: any[];
77
+
78
+    selectedCity: any;
79
+
80
+    @ViewChild('doughnut') doughnutViewChild: UIChart;
81
+
82
+    @ViewChild('bar') chartViewChild: UIChart;
83
+
84
+    @ViewChild('storeA') storeAViewChild: UIChart;
85
+
86
+    @ViewChild('storeB') storeBViewChild: UIChart;
87
+
88
+    @ViewChild('storeC') storeCViewChild: UIChart;
89
+
90
+    @ViewChild('storeD') storeDViewChild: UIChart;
91
+
92
+    @ViewChild('pie') pieViewChild: UIChart;
93
+
94
+    constructor(public app: AppComponent, public appMain: AppMainComponent, private productService: ProductService,
95
+                private eventService: EventService, private breadcrumbService: AppBreadcrumbService) {
96
+        this.breadcrumbService.setItems([
97
+            { label: 'Dashboard Analytics', routerLink: ['/favorites/dashboardanalytics'] }
98
+        ]);
99
+    }
100
+
101
+    ngOnInit() {
102
+        this.productService.getProducts().then(data => this.products = data);
103
+
104
+        this.eventService.getEvents().then(events => { this.events = events; });
105
+
106
+        this.cities = [];
107
+        this.cities.push({ label: 'Select City', value: null });
108
+        this.cities.push({ label: 'New York', value: { id: 1, name: 'New York', code: 'NY' } });
109
+        this.cities.push({ label: 'Rome', value: { id: 2, name: 'Rome', code: 'RM' } });
110
+        this.cities.push({ label: 'London', value: { id: 3, name: 'London', code: 'LDN' } });
111
+        this.cities.push({ label: 'Istanbul', value: { id: 4, name: 'Istanbul', code: 'IST' } });
112
+        this.cities.push({ label: 'Paris', value: { id: 5, name: 'Paris', code: 'PRS' } });
113
+
114
+        this.chartMonthlyData = this.getChartData();
115
+        this.chartMonthlyOptions = this.getChartOptions();
116
+
117
+        this.doughnutData = this.getDoughnutData();
118
+        this.doughnutOptions = this.getDoughnutOptions();
119
+
120
+        this.pieData = this.getPieData();
121
+        this.pieOptions = this.getPieOptions();
122
+
123
+        this.appMain['refreshChart'] = () => {
124
+            this.chartMonthlyData = this.getChartData();
125
+            this.chartMonthlyOptions = this.getChartOptions();
126
+            this.doughnutData = this.getDoughnutData();
127
+            this.doughnutOptions = this.getDoughnutOptions();
128
+            this.pieData = this.getPieData();
129
+            this.pieOptions = this.getPieOptions();
130
+        };
131
+
132
+        this.storeAData = {
133
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September'],
134
+            datasets: [{
135
+                data: [55, 3, 45, 6, 44, 58, 84, 68, 64],
136
+                borderColor: [
137
+                    '#4DD0E1',
138
+                ],
139
+                backgroundColor: [
140
+                    'rgba(77, 208, 225, 0.8)',
141
+                ],
142
+                borderWidth: 2,
143
+                fill: true,
144
+                tension: .4
145
+            }
146
+            ]
147
+        };
148
+
149
+        this.storeBData = {
150
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September'],
151
+            datasets: [{
152
+                data: [81, 75, 63, 100, 69, 79, 38, 37, 76],
153
+                borderColor: [
154
+                    '#4DD0E1',
155
+                ],
156
+                backgroundColor: [
157
+                    'rgba(77, 208, 225, 0.8)',
158
+                ],
159
+                borderWidth: 2,
160
+                fill: true,
161
+                tension: .4
162
+            }
163
+            ]
164
+        };
165
+
166
+        this.storeCData = {
167
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September'],
168
+            datasets: [{
169
+                data: [99, 55, 22, 72, 24, 79, 35, 91, 48],
170
+                borderColor: [
171
+                    '#4DD0E1',
172
+                ],
173
+                backgroundColor: [
174
+                    'rgba(77, 208, 225, 0.8)',
175
+                ],
176
+                borderWidth: 2,
177
+                fill: true,
178
+                tension: .4
179
+            }
180
+            ]
181
+        };
182
+
183
+        this.storeDData = {
184
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September'],
185
+            datasets: [{
186
+                data: [5, 51, 68, 82, 28, 21, 29, 45, 44],
187
+                borderColor: [
188
+                    '#4DD0E1',
189
+                ],
190
+                backgroundColor: [
191
+                    'rgba(77, 208, 225, 0.8)',
192
+                ],
193
+                borderWidth: 2,
194
+                fill: true,
195
+                tension: .4
196
+            }
197
+            ]
198
+        };
199
+
200
+        this.storeAOptions = {
201
+            plugins: {
202
+                legend: {
203
+                    display: false
204
+                }
205
+            },
206
+            responsive: true,
207
+            aspectRatio: 4,
208
+            scales: {
209
+                y: {
210
+                    display: false
211
+                },
212
+                x: {
213
+                    display: false
214
+                }
215
+            },
216
+            tooltips: {
217
+                enabled: false
218
+            },
219
+            elements: {
220
+                point: {
221
+                    radius: 0
222
+                }
223
+            },
224
+        };
225
+
226
+        this.storeBOptions = {
227
+            plugins: {
228
+                legend: {
229
+                    display: false
230
+                }
231
+            },
232
+            responsive: true,
233
+            aspectRatio: 4,
234
+            scales: {
235
+                y: {
236
+                    display: false
237
+                },
238
+                x: {
239
+                    display: false
240
+                }
241
+            },
242
+            tooltips: {
243
+                enabled: false
244
+            },
245
+            elements: {
246
+                point: {
247
+                    radius: 0
248
+                }
249
+            },
250
+        };
251
+
252
+        this.storeCOptions = {
253
+            plugins: {
254
+                legend: {
255
+                    display: false
256
+                }
257
+            },
258
+            responsive: true,
259
+            aspectRatio: 4,
260
+            scales: {
261
+                y: {
262
+                    display: false
263
+                },
264
+                x: {
265
+                    display: false
266
+                }
267
+            },
268
+            tooltips: {
269
+                enabled: false
270
+            },
271
+            elements: {
272
+                point: {
273
+                    radius: 0
274
+                }
275
+            },
276
+        };
277
+
278
+        this.storeDOptions = {
279
+            plugins: {
280
+                legend: {
281
+                    display: false
282
+                }
283
+            },
284
+            responsive: true,
285
+            aspectRatio: 4,
286
+            scales: {
287
+                y: {
288
+                    display: false
289
+                },
290
+                x: {
291
+                    display: false
292
+                }
293
+            },
294
+            tooltips: {
295
+                enabled: false
296
+            },
297
+            elements: {
298
+                point: {
299
+                    radius: 0
300
+                }
301
+            },
302
+        };
303
+
304
+        const calculateStore = (storeData, totalValue) => {
305
+            const randomNumber = +((Math.random() * 500).toFixed(2));
306
+            const data = storeData.datasets[0].data;
307
+            const length = data.length;
308
+            data.push(randomNumber);
309
+            data.shift();
310
+
311
+            const diff = +((data[length - 1] - data[length - 2]).toFixed(2));
312
+            const status = diff === 0 ? 0 : (diff > 0 ? 1 : -1);
313
+            totalValue = +((totalValue + diff).toFixed(2));
314
+
315
+            return { diff, totalValue, status };
316
+        };
317
+
318
+        this.storeInterval = setInterval(() => {
319
+            requestAnimationFrame(() => {
320
+                const { diff: storeADiff, totalValue: storeATotalValue, status: storeAStatus } =
321
+                    calculateStore(this.storeAData, this.storeATotalValue);
322
+                this.storeADiff = storeADiff;
323
+                this.storeATotalValue = storeATotalValue;
324
+                this.storeAStatus = storeAStatus;
325
+                this.storeAViewChild.chart.update();
326
+
327
+                const { diff: storeBDiff, totalValue: storeBTotalValue, status: storeBStatus } =
328
+                    calculateStore(this.storeBData, this.storeBTotalValue);
329
+                this.storeBDiff = storeBDiff;
330
+                this.storeBTotalValue = storeBTotalValue;
331
+                this.storeBStatus = storeBStatus;
332
+                this.storeBViewChild.chart.update();
333
+
334
+                const { diff: storeCDiff, totalValue: storeCTotalValue, status: storeCStatus } =
335
+                    calculateStore(this.storeCData, this.storeCTotalValue);
336
+                this.storeCDiff = storeCDiff;
337
+                this.storeCTotalValue = storeCTotalValue;
338
+                this.storeCStatus = storeCStatus;
339
+                this.storeCViewChild.chart.update();
340
+
341
+                const { diff: storeDDiff, totalValue: storeDTotalValue, status: storeDStatus } =
342
+                    calculateStore(this.storeDData, this.storeDTotalValue);
343
+                this.storeDDiff = storeDDiff;
344
+                this.storeDTotalValue = storeDTotalValue;
345
+                this.storeDStatus = storeDStatus;
346
+                this.storeDViewChild.chart.update();
347
+            });
348
+        }, 2000);
349
+    }
350
+
351
+    ngOnDestroy() {
352
+        if (this.storeInterval) {
353
+            clearInterval(this.storeInterval);
354
+        }
355
+    }
356
+
357
+    getColors() {
358
+        const isLight = this.app.layoutMode === 'light';
359
+        return {
360
+            pinkColor: isLight ? '#EC407A' : '#F48FB1',
361
+            purpleColor: isLight ? '#AB47BC' : '#CE93D8',
362
+            deeppurpleColor: isLight ? '#7E57C2' : '#B39DDB',
363
+            indigoColor: isLight ? '#5C6BC0' : '#9FA8DA',
364
+            blueColor: isLight ? '#42A5F5' : '#90CAF9',
365
+            lightblueColor: isLight ? '#29B6F6' : '#81D4FA',
366
+            cyanColor: isLight ? '#00ACC1' : '#4DD0E1',
367
+            tealColor: isLight ? '#26A69A' : '#80CBC4',
368
+            greenColor: isLight ? '#66BB6A' : '#A5D6A7',
369
+            lightgreenColor: isLight ? '#9CCC65' : '#C5E1A5',
370
+            limeColor: isLight ? '#D4E157' : '#E6EE9C',
371
+            yellowColor: isLight ? '#FFEE58' : '#FFF59D',
372
+            amberColor: isLight ? '#FFCA28' : '#FFE082',
373
+            orangeColor: isLight ? '#FFA726' : '#FFCC80',
374
+            deeporangeColor: isLight ? '#FF7043' : '#FFAB91',
375
+            brownColor: isLight ? '#8D6E63' : '#BCAAA4'
376
+        };
377
+    }
378
+
379
+    getPieData() {
380
+        const { limeColor, blueColor, tealColor } = this.getColors();
381
+        const borderColor = getComputedStyle(document.body).getPropertyValue('--divider-color') || 'rgba(160, 167, 181, .3)';
382
+        return {
383
+            labels: ['O', 'D', 'R'],
384
+            datasets: [
385
+                {
386
+                    data: [300, 50, 100],
387
+                    backgroundColor: [
388
+                        blueColor,
389
+                        tealColor,
390
+                        limeColor
391
+                    ],
392
+                    borderColor
393
+                }
394
+            ]
395
+        };
396
+    }
397
+
398
+    getPieOptions() {
399
+        const textColor = getComputedStyle(document.body).getPropertyValue('--text-color') || 'rgba(0, 0, 0, 0.87)';
400
+        const fontFamily = getComputedStyle(document.body).getPropertyValue('--font-family');
401
+        return {
402
+            responsive: true,
403
+            aspectRatio: 1,
404
+            plugins: {
405
+                legend: {
406
+                    position: 'top',
407
+                    labels: {
408
+                        fontFamily,
409
+                        fontColor: textColor
410
+                    }
411
+                },
412
+            },
413
+            animation: {
414
+                animateScale: true,
415
+                animateRotate: true
416
+            },
417
+            cutout: '0',
418
+        };
419
+    }
420
+
421
+    getChartData() {
422
+        const { limeColor, amberColor, orangeColor, blueColor, lightblueColor,
423
+            cyanColor, tealColor, greenColor, lightgreenColor } = this.getColors();
424
+
425
+        return {
426
+            labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
427
+            datasets: [
428
+                {
429
+                    label: '2012',
430
+                    data: [6, 25, 97, 12, 7, 70, 42],
431
+                    borderColor: blueColor,
432
+                    backgroundColor: blueColor,
433
+                    borderWidth: 2,
434
+                    fill: true
435
+                },
436
+                {
437
+                    label: '2013',
438
+                    data: [81, 3, 5, 11, 59, 47, 99],
439
+                    borderColor: lightblueColor,
440
+                    backgroundColor: lightblueColor,
441
+                    borderWidth: 2,
442
+                    fill: true
443
+                },
444
+                {
445
+                    label: '2014',
446
+                    data: [68, 47, 46, 46, 61, 70, 94],
447
+                    borderColor: cyanColor,
448
+                    backgroundColor: cyanColor,
449
+                    borderWidth: 2,
450
+                    fill: true
451
+                },
452
+                {
453
+                    label: '2015',
454
+                    data: [31, 9, 18, 76, 6, 11, 79],
455
+                    borderColor: tealColor,
456
+                    backgroundColor: tealColor,
457
+                    borderWidth: 2,
458
+                    fill: true
459
+                },
460
+                {
461
+                    label: '2016',
462
+                    data: [85, 37, 47, 29, 2, 10, 54],
463
+                    borderColor: greenColor,
464
+                    backgroundColor: greenColor,
465
+                    borderWidth: 2,
466
+                    fill: true
467
+                },
468
+                {
469
+                    label: '2017',
470
+                    data: [28, 48, 40, 19, 86, 27, 90],
471
+                    borderColor: lightgreenColor,
472
+                    backgroundColor: lightgreenColor,
473
+                    borderWidth: 2,
474
+                    fill: true
475
+                },
476
+                {
477
+                    label: '2018',
478
+                    data: [89, 18, 95, 18, 97, 61, 54],
479
+                    borderColor: limeColor,
480
+                    backgroundColor: limeColor,
481
+                    borderWidth: 2,
482
+                    fill: true
483
+                },
484
+                {
485
+                    label: '2019',
486
+                    data: [18, 36, 39, 58, 41, 50, 72],
487
+                    borderColor: amberColor,
488
+                    backgroundColor: amberColor,
489
+                    borderWidth: 2,
490
+                    fill: true
491
+                },
492
+                {
493
+                    label: '2020',
494
+                    data: [31, 4, 35, 74, 47, 35, 46],
495
+                    borderColor: orangeColor,
496
+                    backgroundColor: orangeColor,
497
+                    borderWidth: 2,
498
+                    fill: true
499
+                }
500
+            ]
501
+        };
502
+    }
503
+
504
+    getChartOptions() {
505
+        const textColor = getComputedStyle(document.body).getPropertyValue('--text-color') || 'rgba(0, 0, 0, 0.87)';
506
+        const gridLinesColor = getComputedStyle(document.body).getPropertyValue('--divider-color') || 'rgba(160, 167, 181, .3)';
507
+        const fontFamily = getComputedStyle(document.body).getPropertyValue('--font-family');
508
+        return {
509
+            plugins: {
510
+                legend: {
511
+                    display: true,
512
+                    labels: {
513
+                        fontFamily,
514
+                        fontColor: textColor
515
+                    }
516
+                },
517
+            },
518
+            animation: {
519
+                animateScale: true,
520
+                animateRotate: true
521
+            },
522
+            responsive: true,
523
+            maintainAspectRatio: false,
524
+            scales: {
525
+                y: {
526
+                    ticks: {
527
+                        fontFamily,
528
+                        color: textColor
529
+                    },
530
+                    grid: {
531
+                        color: gridLinesColor
532
+                    }
533
+                },
534
+                x: {
535
+                    categoryPercentage: .9,
536
+                    barPercentage: .8,
537
+                    ticks: {
538
+                        fontFamily,
539
+                        color: textColor
540
+                    },
541
+                    grid: {
542
+                        color: gridLinesColor
543
+                    }
544
+                }
545
+            },
546
+        };
547
+    }
548
+
549
+    getDoughnutData() {
550
+        const { blueColor, lightblueColor, cyanColor, tealColor, greenColor,
551
+            lightgreenColor, orangeColor } = this.getColors();
552
+        const borderColor = getComputedStyle(document.body).getPropertyValue('--divider-color') || 'rgba(160, 167, 181, .3)';
553
+
554
+        return {
555
+            labels: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
556
+            datasets: [
557
+                {
558
+                    data: [11, 29, 71, 33, 28, 95, 6],
559
+                    backgroundColor: [blueColor, lightblueColor, cyanColor, tealColor, greenColor, lightgreenColor, orangeColor],
560
+                    borderColor
561
+                }
562
+            ]
563
+        };
564
+    }
565
+
566
+    getDoughnutOptions() {
567
+        const textColor = getComputedStyle(document.body).getPropertyValue('--text-color') || 'rgba(0, 0, 0, 0.87)';
568
+        const fontFamily = getComputedStyle(document.body).getPropertyValue('--font-family');
569
+        return {
570
+            plugins: {
571
+                legend: {
572
+                    position: 'top',
573
+                    labels: {
574
+                        fontFamily,
575
+                        fontColor: textColor
576
+                    }
577
+                },
578
+            },
579
+            circumference: 180,
580
+            rotation: -90,
581
+            animation: {
582
+                animateScale: true,
583
+                animateRotate: true
584
+            }
585
+        };
586
+    }
587
+
588
+    changeMonthlyDataView() {
589
+        if (this.chartViewChild.chart.options.scales.x.stacked) {
590
+            this.chartViewChild.chart.options.scales.x.stacked = false;
591
+            this.chartViewChild.chart.options.scales.y.stacked = false;
592
+        }
593
+        else {
594
+            this.chartViewChild.chart.options.scales.x.stacked = true;
595
+            this.chartViewChild.chart.options.scales.y.stacked = true;
596
+        }
597
+
598
+        this.chartViewChild.chart.update();
599
+    }
600
+
601
+    changeDoughnutDataView() {
602
+        if (this.doughnutViewChild.chart.options.circumference === 180) {
603
+            this.doughnutViewChild.chart.options.circumference = 360;
604
+            this.doughnutViewChild.chart.options.rotation = -45;
605
+        } else {
606
+            this.doughnutViewChild.chart.options.circumference = 180;
607
+            this.doughnutViewChild.chart.options.rotation = -90;
608
+        }
609
+
610
+        this.doughnutViewChild.chart.update();
611
+    }
612
+
613
+    togglePieDoughnut() {
614
+        this.pieViewChild.chart.options.cutout = this.pieViewChild.chart.options.cutout !== '0' ? '0' : '50%';
615
+        this.pieViewChild.chart.update();
616
+    }
617
+
618
+    changePieDoughnutDataView() {
619
+        if (this.pieViewChild.chart.options.circumference === 180) {
620
+            this.pieViewChild.chart.options.circumference = 360;
621
+            this.pieViewChild.chart.options.rotation = -45;
622
+        } else {
623
+            this.pieViewChild.chart.options.circumference = 180;
624
+            this.pieViewChild.chart.options.rotation = -90;
625
+        }
626
+
627
+        this.pieViewChild.chart.update();
628
+    }
629
+}

+ 1302
- 0
Angular/src/app/demo/view/documentation.component.html
文件差異過大導致無法顯示
查看文件


+ 38
- 0
Angular/src/app/demo/view/documentation.component.ts 查看文件

@@ -0,0 +1,38 @@
1
+import {Component} from '@angular/core';
2
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
3
+
4
+@Component({
5
+    templateUrl: './documentation.component.html',
6
+    styles: [`
7
+        .docs h1 {
8
+            margin-top: 30px;
9
+        }
10
+
11
+        .docs pre.doc-command {
12
+            font-family: monospace;
13
+            background-color: #2d353c;
14
+            color: #dddddd;
15
+            padding: 1em;
16
+            font-size: 14px;
17
+            border-radius: 3px;
18
+            overflow: auto;
19
+        }
20
+
21
+        .inline-code {
22
+            background-color: #0C2238;
23
+            color: #dddddd;
24
+            font-style: normal;
25
+            font-size: 13px;
26
+            padding: 0 .5em;
27
+        }`
28
+    ]
29
+})
30
+export class DocumentationComponent {
31
+
32
+    constructor(private breadcrumbService: AppBreadcrumbService) {
33
+        this.breadcrumbService.setItems([
34
+            { label: 'Start' },
35
+            { label: 'Documentation', routerLink: ['/documentation'] }
36
+        ]);
37
+    }
38
+}

+ 8
- 0
Angular/src/app/demo/view/emptydemo.component.html 查看文件

@@ -0,0 +1,8 @@
1
+<div class="grid">
2
+    <div class="col-12">
3
+        <div class="card">
4
+            <h5>Empty Page</h5>
5
+            <p>This is your empty page template to start building beautiful applications.</p>
6
+        </div>
7
+    </div>
8
+</div>

+ 15
- 0
Angular/src/app/demo/view/emptydemo.component.ts 查看文件

@@ -0,0 +1,15 @@
1
+import {Component} from '@angular/core';
2
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
3
+
4
+@Component({
5
+    templateUrl: './emptydemo.component.html'
6
+})
7
+export class EmptyDemoComponent {
8
+
9
+    constructor(private breadcrumbService: AppBreadcrumbService) {
10
+        this.breadcrumbService.setItems([
11
+            { label: 'Pages' },
12
+            { label: 'Empty Page', routerLink: ['/pages/empty'] }
13
+        ]);
14
+    }
15
+}

+ 19
- 0
Angular/src/app/demo/view/filedemo.component.html 查看文件

@@ -0,0 +1,19 @@
1
+<div class="grid">
2
+    <div class="col-12">
3
+        <div class="card">
4
+            <h5>Advanced</h5>
5
+            <p-fileUpload name="demo[]" url="./upload.php" (onUpload)="onUpload($event)"
6
+                          multiple="multiple" accept="image/*" maxFileSize="1000000">
7
+                <ng-template pTemplate="content">
8
+                    <ul *ngIf="uploadedFiles.length">
9
+                        <li *ngFor="let file of uploadedFiles">{{file.name}} - {{file.size}} bytes</li>
10
+                    </ul>
11
+                </ng-template>
12
+            </p-fileUpload>
13
+
14
+            <h5>Basic</h5>
15
+            <p-fileUpload mode="basic" name="demo[]" url="./upload.php" accept="image/*" maxFileSize="1000000" (onUpload)="onBasicUpload($event)" chooseLabel="Select"></p-fileUpload>
16
+
17
+        </div>
18
+    </div>
19
+</div>

+ 31
- 0
Angular/src/app/demo/view/filedemo.component.ts 查看文件

@@ -0,0 +1,31 @@
1
+import {Component} from '@angular/core';
2
+import {MessageService} from 'primeng/api';
3
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
4
+
5
+@Component({
6
+    templateUrl: './filedemo.component.html',
7
+    providers: [MessageService]
8
+})
9
+export class FileDemoComponent {
10
+
11
+    uploadedFiles: any[] = [];
12
+
13
+    constructor(private messageService: MessageService, private breadcrumbService: AppBreadcrumbService) {
14
+        this.breadcrumbService.setItems([
15
+            { label: 'UI Kit' },
16
+            { label: 'File', routerLink: ['/uikit/file'] }
17
+        ]);
18
+    }
19
+
20
+    onUpload(event) {
21
+        for (const file of event.files) {
22
+            this.uploadedFiles.push(file);
23
+        }
24
+
25
+        this.messageService.add({severity: 'info', summary: 'Success', detail: 'File Uploaded'});
26
+    }
27
+
28
+    onBasicUpload(event) {
29
+        this.messageService.add({severity: 'info', summary: 'Success', detail: 'File Uploaded with Basic Mode'});
30
+    }
31
+}

+ 95
- 0
Angular/src/app/demo/view/floatlabeldemo.component.html 查看文件

@@ -0,0 +1,95 @@
1
+<div class="grid grid-nogutter floatlabel-demo">
2
+    <div class="card p-fluid" style="width: 100%">
3
+        <h5>Float Label</h5>
4
+        <p>All input text components support floating labels by adding (<mark>.p-float-label</mark>) to wrapper class.</p>
5
+        <div class="grid">
6
+            <div class="col-12 md:col-6">
7
+                <div class="field">
8
+                    <span class="p-float-label">
9
+                        <input type="text" id="inputtext" pInputText [(ngModel)]="value1">
10
+                        <label for="inputtext">InputText</label>
11
+                    </span>
12
+                </div>
13
+                <div class="field">
14
+                    <span class="p-float-label p-input-icon-left">
15
+                        <i class="pi pi-search"></i>
16
+                        <input type="text" id="lefticon" pInputText [(ngModel)]="value11">
17
+                        <label for="lefticon">Left Icon</label>
18
+                    </span>
19
+                </div>
20
+                <div class="field">
21
+                    <span class="p-float-label p-input-icon-right">
22
+                        <input type="text" id="righticon" pInputText [(ngModel)]="value12">
23
+                        <label for="righticon">Right Icon</label>
24
+                        <i class="pi pi-spin pi-spinner"></i>
25
+                    </span>
26
+                </div>
27
+                <div class="field">
28
+                    <span class="p-float-label">
29
+                        <p-inputMask inputId="inputmask" mask="99/99/9999" [(ngModel)]="value5"></p-inputMask>
30
+                        <label for="inputmask">InputMask</label>
31
+                    </span>
32
+                </div>
33
+                <div class="field">
34
+                    <span class="p-float-label">
35
+                        <p-inputNumber inputId="inputnumber" [(ngModel)]="value6"></p-inputNumber>
36
+                        <label for="inputnumber">InputNumber</label>
37
+                    </span>
38
+                </div>
39
+                <div class="field">
40
+                    <span class="p-float-label">
41
+                        <p-chips inputId="chips" [(ngModel)]="value4"></p-chips>
42
+                        <label for="chips">Chips</label>
43
+                    </span>
44
+                </div>
45
+            </div>
46
+
47
+            <div class="col-12 md:col-6">
48
+                <div class="field">
49
+                    <div class="p-inputgroup">
50
+                        <span class="p-inputgroup-addon">
51
+                            <i class="pi pi-user"></i>
52
+                        </span>
53
+                        <span class="p-float-label">
54
+                            <input type="text" id="inputgroup" pInputText [(ngModel)]="value7">
55
+                            <label for="inputgroup">InputGroup</label>
56
+                        </span>
57
+                    </div>
58
+                </div>
59
+                <div class="field">
60
+                    <span class="p-float-label">
61
+                        <p-autoComplete inputId="autocomplete" [(ngModel)]="value2" [suggestions]="filteredCountries"
62
+                                        (completeMethod)="searchCountry($event)" field="name"></p-autoComplete>
63
+                        <label for="autocomplete">AutoComplete</label>
64
+                    </span>
65
+                </div>
66
+                <div class="field">
67
+                    <span class="p-float-label">
68
+                        <p-calendar inputId="calendar" [(ngModel)]="value3"></p-calendar>
69
+                        <label for="calendar">Calendar</label>
70
+                    </span>
71
+                </div>
72
+                <div class="field">
73
+                    <span class="p-float-label">
74
+                        <p-dropdown inputId="dropdown" [autoDisplayFirst]="false" [options]="cities" [(ngModel)]="value8"
75
+                                    optionLabel="name"></p-dropdown>
76
+                        <label for="dropdown">Dropdown</label>
77
+                    </span>
78
+                </div>
79
+                <div class="field">
80
+                    <span class="p-float-label">
81
+                        <p-multiSelect inputId="multiselect" [options]="cities" [(ngModel)]="value9" optionLabel="name"
82
+                                       [filter]="false"></p-multiSelect>
83
+                        <label for="multiselect">MultiSelect</label>
84
+                    </span>
85
+                </div>
86
+                <div class="field">
87
+                    <span class="p-float-label">
88
+                        <textarea inputId="textarea" rows="3" cols="30" [(ngModel)]="value10" pInputTextarea></textarea>
89
+                        <label for="textarea">Textarea</label>
90
+                    </span>
91
+                </div>
92
+            </div>
93
+        </div>
94
+    </div>
95
+</div>

+ 77
- 0
Angular/src/app/demo/view/floatlabeldemo.component.ts 查看文件

@@ -0,0 +1,77 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import { CountryService } from '../service/countryservice';
3
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
4
+
5
+@Component({
6
+    templateUrl: './floatlabeldemo.component.html',
7
+    styleUrls: ['./floatlabeldemo.scss']
8
+})
9
+export class FloatLabelDemoComponent implements OnInit{
10
+
11
+    countries: any[];
12
+
13
+    cities: any[];
14
+
15
+    filteredCountries: any[];
16
+
17
+    value1: any;
18
+
19
+    value2: any;
20
+
21
+    value3: any;
22
+
23
+    value4: any;
24
+
25
+    value5: any;
26
+
27
+    value6: any;
28
+
29
+    value7: any;
30
+
31
+    value8: any;
32
+
33
+    value9: any;
34
+
35
+    value10: any;
36
+
37
+    value11: any;
38
+
39
+    value12: any;
40
+
41
+    constructor(private countryService: CountryService, private breadcrumbService: AppBreadcrumbService) {
42
+        this.breadcrumbService.setItems([
43
+            { label: 'UI Kit' },
44
+            { label: 'Float Label', routerLink: ['/uikit/floatlabel'] }
45
+        ]);
46
+
47
+        this.cities = [
48
+            {name: 'New York', code: 'NY'},
49
+            {name: 'Rome', code: 'RM'},
50
+            {name: 'London', code: 'LDN'},
51
+            {name: 'Istanbul', code: 'IST'},
52
+            {name: 'Paris', code: 'PRS'}
53
+        ];
54
+    }
55
+
56
+    ngOnInit() {
57
+        this.countryService.getCountries().then(countries => {
58
+            this.countries = countries;
59
+        });
60
+    }
61
+
62
+    searchCountry(event) {
63
+        // in a real application, make a request to a remote url with the query and
64
+        // return filtered results, for demo we filter at client side
65
+        const filtered: any[] = [];
66
+        const query = event.query;
67
+        // tslint:disable-next-line:prefer-for-of
68
+        for (let i = 0; i < this.countries.length; i++) {
69
+            const country = this.countries[i];
70
+            if (country.name.toLowerCase().indexOf(query.toLowerCase()) == 0) {
71
+                filtered.push(country);
72
+            }
73
+        }
74
+
75
+        this.filteredCountries = filtered;
76
+    }
77
+}

+ 5
- 0
Angular/src/app/demo/view/floatlabeldemo.scss 查看文件

@@ -0,0 +1,5 @@
1
+.floatlabel-demo {
2
+    .field {
3
+        margin-top: 2rem;
4
+    }
5
+}

+ 116
- 0
Angular/src/app/demo/view/formlayoutdemo.component.html 查看文件

@@ -0,0 +1,116 @@
1
+<div class="grid">
2
+	<div class="col-12 md:col-6">
3
+		<div class="card">
4
+			<h5>Vertical</h5>
5
+            <div class="field">
6
+                <label for="firstname1">Name</label>
7
+                <input pInputText id="firstname1" type="text" class="w-full">
8
+            </div>
9
+            <div class="field">
10
+                <label for="lastname1">Email</label>
11
+                <input pInputText id="lastname1" type="text" class="w-full">
12
+            </div>
13
+            <div class="field">
14
+                <label for="age1">Age</label>
15
+                <input pInputText id="age1" type="text" class="w-full">
16
+            </div>
17
+		</div>
18
+
19
+		<div class="card">
20
+			<h5>Vertical Grid</h5>
21
+			<div class="formgrid grid">
22
+				<div class="field col">
23
+					<label for="firstname2">Name</label>
24
+					<input id="firstname2" type="text" class="w-full" pInputText>
25
+				</div>
26
+				<div class="field col">
27
+					<label for="lastname2">Email</label>
28
+					<input id="lastname2" type="text" class="w-full" pInputText>
29
+				</div>
30
+			</div>
31
+		</div>
32
+	</div>
33
+
34
+	<div class="col-12 md:col-6">
35
+		<div class="card">
36
+			<h5>Horizontal</h5>
37
+            <div class="field grid">
38
+                <label for="firstname4" class="col-12 mb-2 md:col-2 md:mb-0">Name</label>
39
+                <div class="col-12 md:col-10">
40
+                    <input id="firstname4" type="text" class="w-full" pInputText>
41
+                </div>
42
+            </div>
43
+            <div class="field grid">
44
+                <label for="lastname4" class="col-12 mb-2 md:col-2 md:mb-0">Email</label>
45
+                <div class="col-12 md:col-10">
46
+                    <input id="lastname4" type="text" class="w-full" pInputText>
47
+                </div>
48
+            </div>
49
+		</div>
50
+
51
+		<div class="card">
52
+			<h5>Inline</h5>
53
+			<div class="formgroup-inline">
54
+				<div class="field">
55
+                    <span class="p-float-label">
56
+					    <input id="firstname5" type="text" pInputText>
57
+                        <label for="firstname5">Firstname</label>
58
+                    </span>
59
+				</div>
60
+				<div class="field">
61
+                    <span class="p-float-label">
62
+                        <input id="lastname5" type="text" pInputText>
63
+                        <label for="lastname5">Lastname</label>
64
+                    </span>
65
+				</div>
66
+				<button pButton pRipple type="button" label="Submit"></button>
67
+			</div>
68
+		</div>
69
+
70
+		<div class="card">
71
+			<h5>Help Text</h5>
72
+			<div class="field">
73
+                <span class="p-float-label">
74
+                    <input id="username" type="username" pInputText class="w-full" aria-describedby="username-help">
75
+                    <label for="username">Username</label>
76
+                </span>
77
+				<small id="username-help">Enter your username to reset your password.</small>
78
+            </div>
79
+		</div>
80
+	</div>
81
+
82
+	<div class="col-12">
83
+		<div class="card">
84
+			<h5>Advanced</h5>
85
+			<div class="formgrid grid">
86
+				<div class="field col-12 md:col-6">
87
+					<label for="firstname6">Firstname</label>
88
+					<input id="firstname6" type="text" class="w-full" pInputText>
89
+				</div>
90
+				<div class="field col-12 md:col-6">
91
+					<label for="lastname6">Lastname</label>
92
+					<input id="lastname6" type="text" class="w-full" pInputText>
93
+				</div>
94
+				<div class="field col-12">
95
+					<label for="address">Address</label>
96
+					<textarea id="address" type="text" rows="4" class="w-full" pInputTextarea></textarea>
97
+				</div>
98
+				<div class="field col-12 md:col-6">
99
+					<label for="city">City</label>
100
+					<input id="city" type="text" class="w-full" pInputText>
101
+				</div>
102
+				<div class="field col-12 md:col-3">
103
+                    <label for="state">State</label>
104
+                    <span class="p-float-label">
105
+                        <p-dropdown inputId="state" [options]="states" [(ngModel)]="selectedState" optionLabel="name" [autoDisplayFirst]="false" styleClass="w-full"></p-dropdown>
106
+                        <label>Choose</label>
107
+                    </span>
108
+				</div>
109
+				<div class="field col-12 md:col-3">
110
+					<label for="zip">Zip</label>
111
+					<input id="zip" type="text" class="w-full" pInputText>
112
+				</div>
113
+			</div>
114
+		</div>
115
+	</div>
116
+</div>

+ 25
- 0
Angular/src/app/demo/view/formlayoutdemo.component.ts 查看文件

@@ -0,0 +1,25 @@
1
+import {Component} from '@angular/core';
2
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
3
+
4
+@Component({
5
+    templateUrl: './formlayoutdemo.component.html'
6
+})
7
+export class FormLayoutDemoComponent {
8
+
9
+    selectedState: any = null;
10
+
11
+    constructor(private breadcrumbService: AppBreadcrumbService) {
12
+        this.breadcrumbService.setItems([
13
+            { label: 'UI Kit' },
14
+            { label: 'Form Layout', routerLink: ['/uikit/formlayout'] }
15
+        ]);
16
+    }
17
+
18
+    states: any[] = [
19
+        {name: 'Arizona', code: 'Arizona'},
20
+        {name: 'California', value: 'California'},
21
+        {name: 'Florida', code: 'Florida'},
22
+        {name: 'Ohio', code: 'Ohio'},
23
+        {name: 'Washington', code: 'Washington'}
24
+    ];
25
+}

+ 243
- 0
Angular/src/app/demo/view/inputdemo.component.html 查看文件

@@ -0,0 +1,243 @@
1
+<div class="grid p-fluid">
2
+    <div class="col-12 md:col-6">
3
+        <div class="card">
4
+            <h5>InputText</h5>
5
+            <div class="grid formgrid">
6
+                <div class="col-12 mb-2 lg:col-4 mb-lg-0">
7
+                    <span class="p-float-label">
8
+                        <input type="text" class="w-full" pInputText>
9
+                        <label>Default</label>
10
+                    </span>
11
+                </div>
12
+                <div class="col-12 mb-2 lg:col-4 mb-lg-0">
13
+                    <span class="p-float-label">
14
+                        <input type="text" class="w-full" pInputText [disabled]="true"/>
15
+                        <label>Disabled</label>
16
+                    </span>
17
+                </div>
18
+                <div class="col-12 mb-2 lg:col-4 mb-lg-0">
19
+                    <span class="p-float-label">
20
+                        <input type="text" pInputText class="ng-invalid ng-dirty w-full"/>
21
+                        <label>Invalid*</label>
22
+                    </span>
23
+                </div>
24
+            </div>
25
+
26
+            <h5>Icons</h5>
27
+            <div class="grid formgrid">
28
+                <div class="col-12 mb-2 lg:col-4 mb-lg-0">
29
+					<span class="p-input-icon-left p-float-label">
30
+						<i class="pi pi-user"></i>
31
+                        <input type="text" class="w-full" pInputText/>
32
+                        <label>Username</label>
33
+					</span>
34
+                </div>
35
+                <div class="col-12 mb-2 lg:col-4 mb-lg-0">
36
+					<span class="p-input-icon-right p-float-label">
37
+                        <input type="text" class="w-full" pInputText/>
38
+                        <label>Search</label>
39
+						<i class="pi pi-search"></i>
40
+					</span>
41
+                </div>
42
+                <div class="col-12 mb-2 lg:col-4 mb-lg-0">
43
+					<span class="p-input-icon-left p-input-icon-right p-float-label">
44
+						<i class="pi pi-user"></i>
45
+                        <input type="text" class="w-full" pInputText/>
46
+                        <label>Search</label>
47
+						<i class="pi pi-search"></i>
48
+					</span>
49
+                </div>
50
+            </div>
51
+
52
+            <h5>Placeholder</h5>
53
+            <input type="text" pInputText class="w-full" placeholder="Username">
54
+
55
+            <h5>Textarea</h5>
56
+            <span class="p-float-label">
57
+                <textarea rows="5" cols="30" class="w-full" pInputTextarea></textarea>
58
+                <label>Your Message</label>
59
+            </span>
60
+
61
+            <h5>AutoComplete</h5>
62
+            <span class="p-float-label">
63
+                <p-autoComplete [(ngModel)]="selectedCountryAdvanced" [suggestions]="filteredCountries" styleClass="w-full"
64
+                                (completeMethod)="filterCountry($event)" field="name" [dropdown]="true">
65
+                </p-autoComplete>
66
+                <label>Choose a country</label>
67
+            </span>
68
+
69
+            <h5>Calendar</h5>
70
+            <span class="p-float-label">
71
+                <p-calendar [showIcon]="true" inputId="icon" styleClass="w-full"></p-calendar>
72
+                <label>Choose a date</label>
73
+            </span>
74
+
75
+            <h5>InputNumber</h5>
76
+            <span class="p-float-label">
77
+                <p-inputNumber mode="decimal" styleClass="w-full" [showButtons]="true" [min]="0" [max]="100">
78
+                </p-inputNumber>
79
+                <label>Enter a number</label>
80
+            </span>
81
+
82
+            <h5>Chips</h5>
83
+            <span class="p-float-label">
84
+                <p-chips styleClass="w-full"></p-chips>
85
+                <label>Enter a text</label>
86
+            </span>
87
+        </div>
88
+
89
+        <div class="card">
90
+            <div class="grid">
91
+                <div class="col-12">
92
+                    <h5>Slider</h5>
93
+                    <input type="text" pInputText [(ngModel)]="valSlider" readonly/>
94
+                    <p-slider [(ngModel)]="valSlider"></p-slider>
95
+                </div>
96
+                <div class="col-12 md:col-6">
97
+                    <h5>Rating</h5>
98
+                    <p-rating></p-rating>
99
+                </div>
100
+                <div class="col-12 md:col-6">
101
+                    <h5>ColorPicker</h5>
102
+                    <p-colorPicker [(ngModel)]="valColor"></p-colorPicker>
103
+                </div>
104
+                <div class="col-12">
105
+                    <h5>Knob</h5>
106
+                    <p-knob [(ngModel)]="valueKnob" valueTemplate="{value}%" [step]="10" [min]="-50"
107
+                            [max]="50"></p-knob>
108
+                </div>
109
+            </div>
110
+        </div>
111
+    </div>
112
+
113
+    <div class="col-12 md:col-6">
114
+        <div class="card">
115
+            <h5>RadioButton</h5>
116
+            <div class="grid">
117
+                <div class="col-12 md:col-4">
118
+                    <div class="field-radiobutton">
119
+                        <p-radioButton name="city" value="Chicago" [(ngModel)]="valRadio" id="city1"></p-radioButton>
120
+                        <label for="city1">Chicago</label>
121
+                    </div>
122
+                </div>
123
+                <div class="col-12 md:col-4">
124
+                    <div class="field-radiobutton">
125
+                        <p-radioButton name="city" value="Los Angeles" [(ngModel)]="valRadio"
126
+                                       id="city2"></p-radioButton>
127
+                        <label for="city2">Los Angeles</label>
128
+                    </div>
129
+                </div>
130
+                <div class="col-12 md:col-4">
131
+                    <div class="field-radiobutton">
132
+                        <p-radioButton name="city" value="New York" [(ngModel)]="valRadio" id="city3"></p-radioButton>
133
+                        <label for="city3">New York</label>
134
+                    </div>
135
+                </div>
136
+            </div>
137
+
138
+            <h5>Checkbox</h5>
139
+            <div class="grid">
140
+                <div class="col-12 md:col-4">
141
+                    <div class="field-checkbox">
142
+                        <p-checkbox name="group1" value="New York" [(ngModel)]="valCheck" id="ny"></p-checkbox>
143
+                        <label for="ny">New York</label>
144
+                    </div>
145
+                </div>
146
+                <div class="col-12 md:col-4">
147
+                    <div class="field-checkbox">
148
+                        <p-checkbox name="group1" value="San Francisco" [(ngModel)]="valCheck" id="sf"></p-checkbox>
149
+                        <label for="sf">San Francisco</label>
150
+                    </div>
151
+                </div>
152
+                <div class="col-12 md:col-4">
153
+                    <div class="field-checkbox">
154
+                        <p-checkbox name="group1" value="Los Angeles" [(ngModel)]="valCheck" id="la"></p-checkbox>
155
+                        <label for="la">Los Angeles</label>
156
+                    </div>
157
+                </div>
158
+            </div>
159
+
160
+            <h5>Input Switch</h5>
161
+            <p-inputSwitch [(ngModel)]="valSwitch"></p-inputSwitch>
162
+        </div>
163
+
164
+        <div class="card p-fluid">
165
+            <h5>Listbox</h5>
166
+            <p-listbox [options]="cities" [(ngModel)]="selectedList" [filter]="true"></p-listbox>
167
+
168
+            <h5>Dropdown</h5>
169
+            <span class="p-float-label">
170
+                <p-dropdown [options]="cities" [(ngModel)]="selectedDrop" [showClear]="true"
171
+                            [autoDisplayFirst]="false"></p-dropdown>
172
+                <label>Select a city</label>
173
+            </span>
174
+
175
+            <h5>Multiselect</h5>
176
+            <span class="p-float-label">
177
+                <p-multiSelect [options]="countries" [(ngModel)]="selectedMulti" optionLabel="name"
178
+                               [filter]="false"></p-multiSelect>
179
+                <label>Select a country</label>
180
+            </span>
181
+        </div>
182
+
183
+        <div class="card">
184
+            <h5>ToggleButton</h5>
185
+            <p-toggleButton [(ngModel)]="valToggle" onLabel="Yes" offLabel="No"
186
+                            [style]="{'width': '10em'}"></p-toggleButton>
187
+
188
+            <h5>SelectOneButton</h5>
189
+            <p-selectButton [options]="paymentOptions" [(ngModel)]="valSelect1" optionLabel="name"></p-selectButton>
190
+
191
+            <h5>SelectManyButton</h5>
192
+            <p-selectButton [options]="paymentOptions" [(ngModel)]="valSelect2" multiple="multiple"
193
+                            optionLabel="name"></p-selectButton>
194
+        </div>
195
+    </div>
196
+    <div class="col-12">
197
+        <div class="card">
198
+            <h5>InputGroup</h5>
199
+            <div class="grid p-fluid">
200
+                <div class="col-12 md:col-6">
201
+                    <div class="p-inputgroup">
202
+                        <span class="p-inputgroup-addon"><i class="pi pi-user"></i></span>
203
+                        <span class="p-float-label">
204
+                            <input type="text" pInputText/>
205
+                            <label>Username</label>
206
+                        </span>
207
+                    </div>
208
+                </div>
209
+                <div class="col-12 md:col-6">
210
+                    <div class="p-inputgroup">
211
+                        <span class="p-inputgroup-addon"><i class="pi pi-tags" style="line-height: 1.25;"></i></span>
212
+                        <span class="p-inputgroup-addon"><i class="pi pi-shopping-cart" style="line-height: 1.25;"></i></span>
213
+                        <span class="p-float-label">
214
+                            <input type="text" pInputText/>
215
+                            <label>Price</label>
216
+                        </span>
217
+                        <span class="p-inputgroup-addon">$</span>
218
+                        <span class="p-inputgroup-addon">.00</span>
219
+                    </div>
220
+                </div>
221
+                <div class="col-12 md:col-6">
222
+                    <div class="p-inputgroup">
223
+                        <button pButton pRipple type="button" label="Search"></button>
224
+                        <span class="p-float-label">
225
+                            <input type="text" pInputText/>
226
+                            <label>Keyword</label>
227
+                        </span>
228
+                    </div>
229
+                </div>
230
+                <div class="col-12 md:col-6">
231
+                    <div class="p-inputgroup">
232
+                        <span class="p-inputgroup-addon"><p-checkbox></p-checkbox></span>
233
+                        <span class="p-float-label">
234
+                            <input type="text" pInputText/>
235
+                            <label>Username</label>
236
+                        </span>
237
+                    </div>
238
+                </div>
239
+            </div>
240
+        </div>
241
+    </div>
242
+
243
+</div>

+ 83
- 0
Angular/src/app/demo/view/inputdemo.component.ts 查看文件

@@ -0,0 +1,83 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {CountryService} from '../service/countryservice';
3
+import {SelectItem} from 'primeng/api';
4
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
5
+
6
+@Component({
7
+    templateUrl: './inputdemo.component.html'
8
+})
9
+export class InputDemoComponent implements OnInit {
10
+    countries: any[];
11
+
12
+    filteredCountries: any[];
13
+
14
+    selectedCountryAdvanced: any[];
15
+
16
+    valSlider = 50;
17
+
18
+    valColor = '#424242';
19
+
20
+    valRadio: string;
21
+
22
+    valCheck: string[] = [];
23
+
24
+    valSwitch: boolean;
25
+
26
+    cities: SelectItem[];
27
+
28
+    selectedList: SelectItem;
29
+
30
+    selectedDrop: SelectItem;
31
+
32
+    selectedMulti: string[] = [];
33
+
34
+    valToggle = false;
35
+
36
+    paymentOptions: any[];
37
+
38
+    valSelect1: string;
39
+
40
+    valSelect2: string;
41
+
42
+    valueKnob = 20;
43
+
44
+    constructor(private countryService: CountryService, private breadcrumbService: AppBreadcrumbService) {
45
+        this.breadcrumbService.setItems([
46
+            {label: 'UI Kit'},
47
+            {label: 'Input', routerLink: ['/uikit/input']}
48
+        ]);
49
+    }
50
+
51
+    ngOnInit() {
52
+        this.countryService.getCountries().then(countries => {
53
+            this.countries = countries;
54
+        });
55
+
56
+        this.cities = [
57
+            {label: 'New York', value: {id: 1, name: 'New York', code: 'NY'}},
58
+            {label: 'Rome', value: {id: 2, name: 'Rome', code: 'RM'}},
59
+            {label: 'London', value: {id: 3, name: 'London', code: 'LDN'}},
60
+            {label: 'Istanbul', value: {id: 4, name: 'Istanbul', code: 'IST'}},
61
+            {label: 'Paris', value: {id: 5, name: 'Paris', code: 'PRS'}}
62
+        ];
63
+
64
+        this.paymentOptions = [
65
+            {name: 'Option 1', value: 1},
66
+            {name: 'Option 2', value: 2},
67
+            {name: 'Option 3', value: 3}
68
+        ];
69
+    }
70
+
71
+    filterCountry(event) {
72
+        const filtered: any[] = [];
73
+        const query = event.query;
74
+        for (let i = 0; i < this.countries.length; i++) {
75
+            const country = this.countries[i];
76
+            if (country.name.toLowerCase().indexOf(query.toLowerCase()) == 0) {
77
+                filtered.push(country);
78
+            }
79
+        }
80
+
81
+        this.filteredCountries = filtered;
82
+    }
83
+}

+ 49
- 0
Angular/src/app/demo/view/invalidstatedemo.component.html 查看文件

@@ -0,0 +1,49 @@
1
+<div class="grid grid-nogutter">
2
+    <div class="card" style="width: 100%">
3
+        <h5>Invalid State</h5>
4
+        <p>All form components have an invalid state style to display the validation errors when ng-invalid ng-dirty combination is applied by Angular.</p>
5
+        <div class="p-fluid grid">
6
+            <div class="col-12 md:col-6">
7
+                <div class="field">
8
+                    <label for="inputtext">InputText</label>
9
+                    <input type="text" id="inputtext" pInputText class="ng-invalid ng-dirty">
10
+                </div>
11
+                <div class="field">
12
+                    <label for="autocomplete">AutoComplete</label>
13
+                    <p-autoComplete inputId="autocomplete" [(ngModel)]="value2" [suggestions]="filteredCountries" (completeMethod)="searchCountry($event)" field="name" class="ng-invalid ng-dirty"></p-autoComplete>
14
+                </div>
15
+                <div class="field">
16
+                    <label for="calendar">Calendar</label>
17
+                    <p-calendar inputId="calendar" [(ngModel)]="value3" class="ng-invalid ng-dirty" [showIcon]="true"></p-calendar>
18
+                </div>
19
+                <div class="field">
20
+                    <label for="chips">Chips</label>
21
+                    <p-chips inputId="chips" [(ngModel)]="value4" class="ng-invalid ng-dirty"></p-chips>
22
+                </div>
23
+                <div class="field">
24
+                    <label for="textarea">Textarea</label>
25
+                    <textarea inputId="textarea" rows="3" cols="30" [(ngModel)]="value9" pInputTextarea class="ng-invalid ng-dirty"></textarea>
26
+                </div>
27
+            </div>
28
+
29
+            <div class="col-12 md:col-6">
30
+                <div class="field">
31
+                    <label for="inputmask">InputMask</label>
32
+                    <p-inputMask inputId="inputmask" mask="99/99/9999" [(ngModel)]="value5" class="ng-invalid ng-dirty"></p-inputMask>
33
+                </div>
34
+                <div class="field">
35
+                    <label for="inputnumber">InputNumber</label>
36
+                    <p-inputNumber inputId="inputnumber" [(ngModel)]="value6" class="ng-invalid ng-dirty"></p-inputNumber>
37
+                </div>
38
+                <div class="field">
39
+                    <label for="dropdown">Dropdown</label>
40
+                    <p-dropdown inputId="dropdown" [autoDisplayFirst]="false" [options]="cities" [(ngModel)]="value7" optionLabel="name" class="ng-invalid ng-dirty"></p-dropdown>
41
+                </div>
42
+                <div class="field">
43
+                    <label for="multiselect">MultiSelect</label>
44
+                    <p-multiSelect inputId="multiselect" [options]="cities" [(ngModel)]="value7" optionLabel="name" [filter]="false" class="ng-invalid ng-dirty"></p-multiSelect>
45
+                </div>
46
+            </div>
47
+        </div>
48
+    </div>
49
+</div>

+ 70
- 0
Angular/src/app/demo/view/invalidstatedemo.component.ts 查看文件

@@ -0,0 +1,70 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {CountryService} from '../service/countryservice';
3
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
4
+
5
+@Component({
6
+    templateUrl: './invalidstatedemo.component.html'
7
+})
8
+export class InvalidStateDemoComponent implements OnInit {
9
+
10
+
11
+    countries: any[];
12
+
13
+    cities: any[];
14
+
15
+    filteredCountries: any[];
16
+
17
+    value1: any;
18
+
19
+    value2: any;
20
+
21
+    value3: any;
22
+
23
+    value4: any;
24
+
25
+    value5: any;
26
+
27
+    value6: any;
28
+
29
+    value7: any;
30
+
31
+    value8: any;
32
+
33
+    value9: any;
34
+
35
+    constructor(private countryService: CountryService, private breadcrumbService: AppBreadcrumbService) {
36
+        this.breadcrumbService.setItems([
37
+            {label: 'UI Kit'},
38
+            {label: 'Invalid State', routerLink: ['/uikit/invalidstate']}
39
+        ]);
40
+
41
+        this.cities = [
42
+            {name: 'New York', code: 'NY'},
43
+            {name: 'Rome', code: 'RM'},
44
+            {name: 'London', code: 'LDN'},
45
+            {name: 'Istanbul', code: 'IST'},
46
+            {name: 'Paris', code: 'PRS'}
47
+        ];
48
+    }
49
+
50
+    ngOnInit() {
51
+        this.countryService.getCountries().then(countries => {
52
+            this.countries = countries;
53
+        });
54
+    }
55
+
56
+    searchCountry(event) {
57
+        // in a real application, make a request to a remote url with the query and return filtered results,
58
+        // for demo we filter at client side
59
+        const filtered: any[] = [];
60
+        const query = event.query;
61
+        for (let i = 0; i < this.countries.length; i++) {
62
+            const country = this.countries[i];
63
+            if (country.name.toLowerCase().indexOf(query.toLowerCase()) == 0) {
64
+                filtered.push(country);
65
+            }
66
+        }
67
+
68
+        this.filteredCountries = filtered;
69
+    }
70
+}

+ 84
- 0
Angular/src/app/demo/view/listdemo.component.html 查看文件

@@ -0,0 +1,84 @@
1
+<div class="grid list-demo">
2
+	<div class="col-12">
3
+		<div class="card">
4
+			<h5>DataView</h5>
5
+			<p-dataView #dv [value]="products" [paginator]="true" [rows]="9" filterBy="name"
6
+						[sortField]="sortField" [sortOrder]="sortOrder" layout="grid">
7
+				<ng-template pTemplate="header">
8
+					<div class="flex flex-column md:flex-row md:justify-content-between">
9
+						<p-dropdown [options]="sortOptions" [(ngModel)]="sortKey" placeholder="Sort By Price" (onChange)="onSortChange($event)" styleClass="mb-2 md:mb-0"></p-dropdown>
10
+						<span class="p-input-icon-left mb-2 md:mb-0">
11
+                            <i class="pi pi-search"></i>
12
+                            <input type="search" pInputText placeholder="Search by Name" (input)="dv.filter($event.target.value)">
13
+                        </span>
14
+						<p-dataViewLayoutOptions></p-dataViewLayoutOptions>
15
+					</div>
16
+				</ng-template>
17
+				<ng-template let-product pTemplate="listItem">
18
+					<div class="col-12">
19
+						<div class="product-list-item">
20
+							<img [src]="'assets/demo/images/product/' + product.image" [alt]="product.name"/>
21
+							<div class="product-list-detail">
22
+								<div class="product-name">{{product.name}}</div>
23
+								<div class="product-description">{{product.description}}</div>
24
+								<p-rating [ngModel]="product.rating" [readonly]="true" [cancel]="false"></p-rating>
25
+								<i class="pi pi-tag product-category-icon"></i><span class="product-category">{{product.category}}</span>
26
+							</div>
27
+							<div class="product-list-action">
28
+								<span class="product-price">${{product.price}}</span>
29
+								<p-button icon="pi pi-shopping-cart" label="Add to Cart" [disabled]="product.inventoryStatus === 'OUTOFSTOCK'"></p-button>
30
+								<span [class]="'product-badge status-' + product.inventoryStatus.toLowerCase()">{{product.inventoryStatus}}</span>
31
+							</div>
32
+						</div>
33
+					</div>
34
+				</ng-template>
35
+				<ng-template let-product pTemplate="gridItem">
36
+					<div class="col-12 md:col-4">
37
+						<div class="product-grid-item card">
38
+							<div class="product-grid-item-top">
39
+								<div>
40
+									<i class="pi pi-tag product-category-icon"></i>
41
+									<span class="product-category">{{product.category}}</span>
42
+								</div>
43
+								<span [class]="'product-badge status-' + product.inventoryStatus.toLowerCase()">{{product.inventoryStatus}}</span>
44
+							</div>
45
+							<div class="product-grid-item-content">
46
+								<img [src]="'assets/demo/images/product/' + product.image" [alt]="product.name"/>
47
+								<div class="product-name">{{product.name}}</div>
48
+								<div class="product-description">{{product.description}}</div>
49
+								<p-rating [ngModel]="product.rating" [readonly]="true" [cancel]="false"></p-rating>
50
+							</div>
51
+							<div class="product-grid-item-bottom">
52
+								<span class="product-price">${{product.price}}</span>
53
+								<p-button icon="pi pi-shopping-cart" [disabled]="product.inventoryStatus === 'OUTOFSTOCK'"></p-button>
54
+							</div>
55
+						</div>
56
+					</div>
57
+				</ng-template>
58
+			</p-dataView>
59
+		</div>
60
+	</div>
61
+
62
+	<div class="col-12 lg:col-8">
63
+		<div class="card">
64
+			<h5>PickList</h5>
65
+			<p-pickList [source]="sourceCities" [target]="targetCities" sourceHeader="From" targetHeader="To" dragdrop="true"
66
+						[responsive]="true" [sourceStyle]="{'height':'300px'}" [targetStyle]="{'height':'300px'}">
67
+				<ng-template let-city pTemplate="item">
68
+					<div>{{city.name}}</div>
69
+				</ng-template>
70
+			</p-pickList>
71
+		</div>
72
+	</div>
73
+
74
+	<div class="col-12 lg:col-4">
75
+		<div class="card">
76
+			<h5>OrderList</h5>
77
+			<p-orderList [value]="orderCities" [listStyle]="{'height':'auto'}" header="Cities" dragdrop="true">
78
+				<ng-template let-city pTemplate="item">
79
+					<div>{{city.name}}</div>
80
+				</ng-template>
81
+			</p-orderList>
82
+		</div>
83
+	</div>
84
+</div>

+ 73
- 0
Angular/src/app/demo/view/listdemo.component.ts 查看文件

@@ -0,0 +1,73 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {SelectItem} from 'primeng/api';
3
+import {Product} from '../domain/product';
4
+import {ProductService} from '../service/productservice';
5
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
6
+
7
+@Component({
8
+    templateUrl: './listdemo.component.html',
9
+    styleUrls: ['./listdemo.scss']
10
+})
11
+export class ListDemoComponent implements OnInit {
12
+
13
+    products: Product[];
14
+
15
+    sortOptions: SelectItem[];
16
+
17
+    sortOrder: number;
18
+
19
+    sortField: string;
20
+
21
+    sourceCities: any[];
22
+
23
+    targetCities: any[];
24
+
25
+    orderCities: any[];
26
+
27
+    constructor(private productService: ProductService, private breadcrumbService: AppBreadcrumbService) {
28
+        this.breadcrumbService.setItems([
29
+            { label: 'UI Kit' },
30
+            { label: 'List', routerLink: ['/uikit/list'] }
31
+        ]);
32
+    }
33
+
34
+    ngOnInit() {
35
+        this.productService.getProducts().then(data => this.products = data);
36
+
37
+        this.sourceCities = [
38
+            {name: 'San Francisco', code: 'SF'},
39
+            {name: 'London', code: 'LDN'},
40
+            {name: 'Paris', code: 'PRS'},
41
+            {name: 'Istanbul', code: 'IST'},
42
+            {name: 'Berlin', code: 'BRL'},
43
+            {name: 'Barcelona', code: 'BRC'},
44
+            {name: 'Rome', code: 'RM'}];
45
+        this.targetCities = [];
46
+
47
+        this.orderCities = [
48
+            {name: 'San Francisco', code: 'SF'},
49
+            {name: 'London', code: 'LDN'},
50
+            {name: 'Paris', code: 'PRS'},
51
+            {name: 'Istanbul', code: 'IST'},
52
+            {name: 'Berlin', code: 'BRL'},
53
+            {name: 'Barcelona', code: 'BRC'},
54
+            {name: 'Rome', code: 'RM'}];
55
+
56
+        this.sortOptions = [
57
+            {label: 'Price High to Low', value: '!price'},
58
+            {label: 'Price Low to High', value: 'price'}
59
+        ];
60
+    }
61
+
62
+    onSortChange(event) {
63
+        const value = event.value;
64
+
65
+        if (value.indexOf('!') === 0) {
66
+            this.sortOrder = -1;
67
+            this.sortField = value.substring(1, value.length);
68
+        } else {
69
+            this.sortOrder = 1;
70
+            this.sortField = value;
71
+        }
72
+    }
73
+}

+ 146
- 0
Angular/src/app/demo/view/listdemo.scss 查看文件

@@ -0,0 +1,146 @@
1
+:host ::ng-deep {
2
+	.p-dropdown {
3
+		width: 14rem;
4
+		font-weight: normal;
5
+	}
6
+
7
+	.product-name {
8
+		font-size: 1.5rem;
9
+		font-weight: 700;
10
+	}
11
+
12
+	.product-description {
13
+		margin: 0 0 1rem 0;
14
+	}
15
+
16
+	.product-category-icon {
17
+		vertical-align: middle;
18
+		margin-right: .5rem;
19
+	}
20
+
21
+	.product-category {
22
+		font-weight: 600;
23
+		vertical-align: middle;
24
+	}
25
+
26
+	.product-list-item {
27
+		display: flex;
28
+		align-items: center;
29
+		padding: 1rem;
30
+		width: 100%;
31
+
32
+		img {
33
+			width: 150px;
34
+			box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
35
+			margin-right: 2rem;
36
+		}
37
+
38
+		.product-list-detail {
39
+			flex: 1 1 0;
40
+		}
41
+
42
+		.p-rating {
43
+			margin: 0 0 .5rem 0;
44
+		}
45
+
46
+		.product-price {
47
+			font-size: 1.5rem;
48
+			font-weight: 600;
49
+			margin-bottom: .5rem;
50
+			align-self: flex-end;
51
+		}
52
+
53
+		.product-list-action {
54
+			display: flex;
55
+			flex-direction: column;
56
+		}
57
+
58
+		.p-button {
59
+			margin-bottom: .5rem;
60
+		}
61
+	}
62
+
63
+	.product-grid-item {
64
+		margin: .5em;
65
+		border: 1px solid var(--surface-d);
66
+
67
+		.product-grid-item-top,
68
+		.product-grid-item-bottom {
69
+			display: flex;
70
+			align-items: center;
71
+			justify-content: space-between;
72
+		}
73
+
74
+		img {
75
+			width: 75%;
76
+			box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
77
+			margin: 2rem 0;
78
+		}
79
+
80
+		.product-grid-item-content {
81
+			text-align: center;
82
+		}
83
+
84
+		.product-price {
85
+			font-size: 1.5rem;
86
+			font-weight: 600;
87
+		}
88
+	}
89
+}
90
+
91
+.product-badge {
92
+	border-radius: 2px;
93
+	padding: .25em .5rem;
94
+	text-transform: uppercase;
95
+	font-weight: 700;
96
+	font-size: 12px;
97
+	letter-spacing: .3px;
98
+
99
+	&.status-instock {
100
+		background: #C8E6C9;
101
+		color: #256029;
102
+	}
103
+
104
+	&.status-outofstock {
105
+		background: #FFCDD2;
106
+		color: #C63737;
107
+	}
108
+
109
+	&.status-lowstock {
110
+		background: #FEEDAF;
111
+		color: #8A5340;
112
+	}
113
+}
114
+
115
+@media screen and (max-width: 576px) {
116
+	:host ::ng-deep .product-list-item {
117
+		flex-direction: column;
118
+		align-items: center;
119
+
120
+		img {
121
+			width: 75%;
122
+			margin: 2rem 0;
123
+		}
124
+
125
+		.product-list-detail {
126
+			text-align: center;
127
+		}
128
+
129
+		.product-price {
130
+			align-self: center;
131
+		}
132
+
133
+		.product-list-action {
134
+			display: flex;
135
+			flex-direction: column;
136
+		}
137
+
138
+		.product-list-action {
139
+			margin-top: 2rem;
140
+			flex-direction: row;
141
+			justify-content: space-between;
142
+			align-items: center;
143
+			width: 100%;
144
+		}
145
+	}
146
+}

+ 54
- 0
Angular/src/app/demo/view/mediademo.component.html 查看文件

@@ -0,0 +1,54 @@
1
+<div class="grid p-fluid">
2
+    <div class="col-12">
3
+        <div class="card">
4
+            <h5>Carousel</h5>
5
+            <p-carousel [value]="products" [numVisible]="3" [numScroll]="3" [circular]="false" [responsiveOptions]="carouselResponsiveOptions">
6
+                <ng-template let-product pTemplate="item">
7
+                    <div class="product-item">
8
+                        <div class="product-item-content">
9
+                            <div class="mb-3">
10
+                                <img src="assets/demo/images/product/{{product.image}}" [alt]="product.name" class="product-image" />
11
+                            </div>
12
+                            <div>
13
+                                <h4 class="mb-1">{{product.name}}</h4>
14
+                                <h6 class="mt-0 mb-3">${{product.price}}</h6>
15
+                                <span [class]="'product-badge status-'+product.inventoryStatus.toLowerCase()">{{product.inventoryStatus}}</span>
16
+                                <div class="car-buttons mt-5">
17
+                                    <p-button type="button" styleClass="p-button p-button-rounded mr-2" icon="pi pi-search"></p-button>
18
+                                    <p-button type="button" styleClass="p-button-success p-button-rounded mr-2" icon="pi pi-star"></p-button>
19
+                                    <p-button type="button" styleClass="p-button-help p-button-rounded" icon="pi pi-cog"></p-button>
20
+                                </div>
21
+                            </div>
22
+                        </div>
23
+                    </div>
24
+                </ng-template>
25
+            </p-carousel>
26
+        </div>
27
+    </div>
28
+
29
+    <div class="col-12">
30
+        <div class="card">
31
+            <h5>Image</h5>
32
+            <div class="flex justify-content-center">
33
+                <p-image src="assets/demo/images/galleria/galleria10.jpg" alt="Image" width="250" [preview]="true"></p-image>
34
+            </div>
35
+        </div>
36
+    </div>
37
+
38
+    <div class="col-12">
39
+        <div class="card">
40
+            <h5>Galleria</h5>
41
+            <p-galleria [value]="images" [responsiveOptions]="galleriaResponsiveOptions"
42
+                        [containerStyle]="{'max-width': '800px', 'margin':'auto'}" [numVisible]="7" [circular]="true">
43
+                <ng-template pTemplate="item" let-item>
44
+                    <img [src]="item.itemImageSrc" style="width: 100%; display: block;"/>
45
+                </ng-template>
46
+                <ng-template pTemplate="thumbnail" let-item>
47
+                    <div class="grid grid-nogutter justify-content-center">
48
+                        <img [src]="item.thumbnailImageSrc" style="display: block;"/>
49
+                    </div>
50
+                </ng-template>
51
+            </p-galleria>
52
+        </div>
53
+    </div>
54
+</div>

+ 71
- 0
Angular/src/app/demo/view/mediademo.component.ts 查看文件

@@ -0,0 +1,71 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {ProductService} from '../service/productservice';
3
+import {PhotoService} from '../service/photoservice';
4
+import {Product} from '../domain/product';
5
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
6
+
7
+@Component({
8
+    templateUrl: './mediademo.component.html',
9
+    styleUrls: ['./mediademo.scss'],
10
+})
11
+export class MediaDemoComponent implements OnInit {
12
+
13
+    products: Product[];
14
+
15
+    images: any[];
16
+
17
+    galleriaResponsiveOptions: any[] = [
18
+        {
19
+            breakpoint: '1024px',
20
+            numVisible: 5
21
+        },
22
+        {
23
+            breakpoint: '960px',
24
+            numVisible: 4
25
+        },
26
+        {
27
+            breakpoint: '768px',
28
+            numVisible: 3
29
+        },
30
+        {
31
+            breakpoint: '560px',
32
+            numVisible: 1
33
+        }
34
+    ];
35
+
36
+    carouselResponsiveOptions: any[] = [
37
+        {
38
+            breakpoint: '1024px',
39
+            numVisible: 3,
40
+            numScroll: 3
41
+        },
42
+        {
43
+            breakpoint: '768px',
44
+            numVisible: 2,
45
+            numScroll: 2
46
+        },
47
+        {
48
+            breakpoint: '560px',
49
+            numVisible: 1,
50
+            numScroll: 1
51
+        }
52
+    ];
53
+
54
+    constructor(private productService: ProductService, private photoService: PhotoService,
55
+                private breadcrumbService: AppBreadcrumbService) {
56
+        this.breadcrumbService.setItems([
57
+            { label: 'UI Kit' },
58
+            { label: 'Media', routerLink: ['/uikit/media'] }
59
+        ]);
60
+    }
61
+
62
+    ngOnInit() {
63
+        this.productService.getProductsSmall().then(products => {
64
+            this.products = products;
65
+        });
66
+
67
+        this.photoService.getImages().then(images => {
68
+            this.images = images;
69
+        });
70
+    }
71
+}

+ 14
- 0
Angular/src/app/demo/view/mediademo.scss 查看文件

@@ -0,0 +1,14 @@
1
+.product-item {
2
+    .product-item-content {
3
+        border: 1px solid var(--surface-d);
4
+        border-radius: 3px;
5
+        margin: .3rem;
6
+        text-align: center;
7
+        padding: 2rem 0;
8
+    }
9
+
10
+    .product-image {
11
+        width: 50%;
12
+        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)
13
+    }
14
+}

+ 89
- 0
Angular/src/app/demo/view/menusdemo.component.html 查看文件

@@ -0,0 +1,89 @@
1
+<div class="grid p-fluid">
2
+    <div class="col-12">
3
+        <div class="card">
4
+            <h5>MenuBar</h5>
5
+            <p-menubar [model]="tieredItems">
6
+                <ng-template pTemplate="end">
7
+                    <span class="p-input-icon-right p-float-label">
8
+                        <input type="text" pInputText>
9
+                        <label>Search</label>
10
+                        <i class="pi pi-search"></i>
11
+                    </span>
12
+                </ng-template>
13
+            </p-menubar>
14
+        </div>
15
+    </div>
16
+
17
+    <div class="col-12">
18
+        <div class="card">
19
+            <h5>Breadcrumb</h5>
20
+            <p-breadcrumb [model]="breadcrumbItems" [home]="{icon: 'pi pi-home'}"></p-breadcrumb>
21
+        </div>
22
+    </div>
23
+
24
+    <div class="col-12 xl:col-6">
25
+        <div class="card">
26
+            <h5>Steps</h5>
27
+            <p-steps [model]="stepsItems" [activeIndex]="1"></p-steps>
28
+        </div>
29
+    </div>
30
+
31
+    <div class="col-12 xl:col-6">
32
+        <div class="card height-100">
33
+            <h5>TabMenu</h5>
34
+            <p-tabMenu [model]="tabMenuItems" [activeItem]="tabMenuItems[0]"></p-tabMenu>
35
+        </div>
36
+    </div>
37
+
38
+    <div class="col-12 md:col-4">
39
+        <div class="card">
40
+            <h5>TieredMenu</h5>
41
+            <p-tieredMenu [model]="tieredItems" [style]="{'width':'100%','margin-bottom':'20px'}"></p-tieredMenu>
42
+        </div>
43
+
44
+        <div class="card">
45
+            <h5>MenuButton</h5>
46
+            <p-menu #menu [popup]="true" [model]="menuItems" [style]="{'width':'250px'}"></p-menu>
47
+            <button pButton pRipple type="button" icon="pi pi-chevron-down" label="Options" (click)="menu.toggle($event)" style="width:auto"></button>
48
+        </div>
49
+    </div>
50
+
51
+    <div class="col-12 md:col-4">
52
+        <div class="card">
53
+            <h5>Plain Menu</h5>
54
+            <p-menu [model]="items" [style]="{'width':'100%'}"></p-menu>
55
+        </div>
56
+    </div>
57
+
58
+    <div class="col-12 md:col-4">
59
+        <div class="card">
60
+            <h5>ContextMenu</h5>
61
+            Right click to display.
62
+
63
+            <p-contextMenu [global]="true" [model]="menuItems"></p-contextMenu>
64
+        </div>
65
+
66
+        <div class="card">
67
+            <h5>SlideMenu</h5>
68
+            <p-slideMenu [model]="slideItems" [viewportHeight]="250" [menuWidth]="175"></p-slideMenu>
69
+        </div>
70
+    </div>
71
+
72
+    <div class="col-12 md:col-6">
73
+        <div class="card">
74
+            <h5>MegaMenu - Horizontal</h5>
75
+            <p-megaMenu [model]="megaMenuItems"></p-megaMenu>
76
+
77
+            <h5>MegaMenu - Vertical</h5>
78
+            <p-megaMenu [model]="megaMenuItems" orientation="vertical" [style]="{'width':'200px'}"></p-megaMenu>
79
+        </div>
80
+    </div>
81
+
82
+
83
+    <div class="col-12 md:col-6">
84
+        <div class="card">
85
+            <h5>PanelMenu</h5>
86
+            <p-panelMenu [model]="panelMenuItems"></p-panelMenu>
87
+        </div>
88
+    </div>
89
+</div>

+ 464
- 0
Angular/src/app/demo/view/menusdemo.component.ts 查看文件

@@ -0,0 +1,464 @@
1
+import {Component, OnInit, ViewEncapsulation} from '@angular/core';
2
+import {MegaMenuItem, MenuItem} from 'primeng/api';
3
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
4
+
5
+@Component({
6
+    templateUrl: './menusdemo.component.html',
7
+    styleUrls: ['./menusdemo.scss'],
8
+    encapsulation: ViewEncapsulation.None
9
+})
10
+export class MenusDemoComponent implements OnInit {
11
+
12
+    breadcrumbItems: MenuItem[];
13
+
14
+    tieredItems: MenuItem[];
15
+
16
+    items: MenuItem[];
17
+
18
+    tabMenuItems: MenuItem[];
19
+
20
+    megaMenuItems: MegaMenuItem[];
21
+
22
+    panelMenuItems: MenuItem[];
23
+
24
+    stepsItems: MenuItem[];
25
+
26
+    slideItems: MenuItem[];
27
+
28
+    menuItems: MenuItem[];
29
+
30
+    constructor(private breadcrumbService: AppBreadcrumbService) {
31
+        this.breadcrumbService.setItems([
32
+            { label: 'UI Kit' },
33
+            { label: 'Menu', routerLink: ['/uikit/menu'] }
34
+        ]);
35
+    }
36
+
37
+    ngOnInit() {
38
+
39
+        this.tieredItems = [
40
+            {
41
+                label: 'Customers',
42
+                icon: 'pi pi-fw pi-table',
43
+                items: [
44
+                    {
45
+                        label: 'New',
46
+                        icon: 'pi pi-fw pi-plus',
47
+                        items: [
48
+                            {
49
+                                label: 'Customer',
50
+                                icon: 'pi pi-fw pi-plus'
51
+                            },
52
+                            {
53
+                                label: 'Duplicate',
54
+                                icon: 'pi pi-fw pi-copy'
55
+                            },
56
+
57
+                        ]
58
+                    },
59
+                    {
60
+                        label: 'Edit',
61
+                        icon: 'pi pi-fw pi-user-edit'
62
+                    }
63
+                ]
64
+            },
65
+            {
66
+                label: 'Orders',
67
+                icon: 'pi pi-fw pi-shopping-cart',
68
+                items: [
69
+                    {
70
+                        label: 'View',
71
+                        icon: 'pi pi-fw pi-list'
72
+                    },
73
+                    {
74
+                        label: 'Search',
75
+                        icon: 'pi pi-fw pi-search'
76
+                    }
77
+
78
+                ]
79
+            },
80
+            {
81
+                label: 'Shipments',
82
+                icon: 'pi pi-fw pi-envelope',
83
+                items: [
84
+                    {
85
+                        label: 'Tracker',
86
+                        icon: 'pi pi-fw pi-compass',
87
+
88
+                    },
89
+                    {
90
+                        label: 'Map',
91
+                        icon: 'pi pi-fw pi-map-marker',
92
+
93
+                    },
94
+                    {
95
+                        label: 'Manage',
96
+                        icon: 'pi pi-fw pi-pencil'
97
+                    }
98
+                ]
99
+            },
100
+            {
101
+                label: 'Profile',
102
+                icon: 'pi pi-fw pi-user',
103
+                items: [
104
+                    {
105
+                        label: 'Settings',
106
+                        icon: 'pi pi-fw pi-cog'
107
+                    },
108
+                    {
109
+                        label: 'Billing',
110
+                        icon: 'pi pi-fw pi-file'
111
+                    }
112
+                ]
113
+            },
114
+            { separator: true },
115
+            {
116
+                label: 'Quit',
117
+                icon: 'pi pi-fw pi-sign-out'
118
+            }
119
+        ];
120
+
121
+        this.items = [
122
+            {
123
+                label: 'Customers',
124
+                items: [
125
+                    {
126
+                        label: 'New',
127
+                        icon: 'pi pi-fw pi-plus'
128
+                    },
129
+                    {
130
+                        label: 'Edit',
131
+                        icon: 'pi pi-fw pi-user-edit'
132
+                    }
133
+                ]
134
+            },
135
+            {
136
+                label: 'Orders',
137
+                items: [
138
+                    {
139
+                        label: 'View',
140
+                        icon: 'pi pi-fw pi-list'
141
+                    },
142
+                    {
143
+                        label: 'Search',
144
+                        icon: 'pi pi-fw pi-search'
145
+                    }
146
+
147
+                ]
148
+            },
149
+            {
150
+                label: 'Shipments',
151
+                items: [
152
+                    {
153
+                        label: 'Tracker',
154
+                        icon: 'pi pi-fw pi-compass',
155
+
156
+                    },
157
+                    {
158
+                        label: 'Map',
159
+                        icon: 'pi pi-fw pi-map-marker',
160
+
161
+                    },
162
+                    {
163
+                        label: 'Manage',
164
+                        icon: 'pi pi-fw pi-pencil'
165
+                    }
166
+                ]
167
+            }
168
+        ];
169
+
170
+        this.menuItems = [
171
+            {
172
+                label: 'Save', icon: 'pi pi-fw pi-check'
173
+            },
174
+            {
175
+                label: 'Update', icon: 'pi pi-fw pi-refresh'
176
+            },
177
+            {
178
+                label: 'Delete', icon: 'pi pi-fw pi-trash'
179
+            },
180
+            {
181
+                separator: true
182
+            },
183
+            {
184
+                label: 'Quit', icon: 'pi pi-fw pi-sign-out'
185
+            },
186
+        ];
187
+
188
+        this.slideItems = [
189
+            {
190
+                label: 'Customers',
191
+                icon: 'pi pi-fw pi-table',
192
+                items: [
193
+                    {
194
+                        label: 'New',
195
+                        icon: 'pi pi-fw pi-plus'
196
+                    },
197
+                    {
198
+                        label: 'Edit',
199
+                        icon: 'pi pi-fw pi-user-edit'
200
+                    }
201
+                ]
202
+            },
203
+            {
204
+                label: 'Orders',
205
+                icon: 'pi pi-fw pi-shopping-cart',
206
+                items: [
207
+                    {
208
+                        label: 'View',
209
+                        icon: 'pi pi-fw pi-list'
210
+                    },
211
+                    {
212
+                        label: 'Search',
213
+                        icon: 'pi pi-fw pi-search'
214
+                    }
215
+
216
+                ]
217
+            },
218
+            {
219
+                label: 'Shipments',
220
+                icon: 'pi pi-fw pi-envelope',
221
+                items: [
222
+                    {
223
+                        label: 'Tracker',
224
+                        icon: 'pi pi-fw pi-compass',
225
+
226
+                    },
227
+                    {
228
+                        label: 'Map',
229
+                        icon: 'pi pi-fw pi-map-marker',
230
+
231
+                    },
232
+                    {
233
+                        label: 'Manage',
234
+                        icon: 'pi pi-fw pi-pencil'
235
+                    }
236
+                ]
237
+            },
238
+            {
239
+                label: 'Profile',
240
+                icon: 'pi pi-fw pi-user',
241
+                items: [
242
+                    {
243
+                        label: 'Settings',
244
+                        icon: 'pi pi-fw pi-cog'
245
+                    },
246
+                    {
247
+                        label: 'Billing',
248
+                        icon: 'pi pi-fw pi-file'
249
+                    }
250
+                ]
251
+            }
252
+        ];
253
+
254
+        this.breadcrumbItems = [];
255
+        this.breadcrumbItems.push({ label: 'Electronics' });
256
+        this.breadcrumbItems.push({ label: 'Computer' });
257
+        this.breadcrumbItems.push({ label: 'Notebook' });
258
+        this.breadcrumbItems.push({ label: 'Accessories' });
259
+        this.breadcrumbItems.push({ label: 'Backpacks' });
260
+        this.breadcrumbItems.push({ label: 'Item' });
261
+
262
+        this.tabMenuItems = [
263
+            {label: 'Overview', icon: 'pi pi-fw pi-home'},
264
+            {label: 'Members', icon: 'pi pi-fw pi-users'},
265
+            {label: 'Sales', icon: 'pi pi-fw pi-shopping-cart'},
266
+            {label: 'Profile', icon: 'pi pi-fw pi-user'},
267
+            {label: 'Settings', icon: 'pi pi-fw pi-cog'}
268
+        ];
269
+
270
+        this.megaMenuItems = [
271
+            {
272
+                label: 'Fashion', icon: 'pi pi-fw pi-tag',
273
+                items: [
274
+                    [
275
+                        {
276
+                            label: 'Women',
277
+                            items: [{label: 'Women Item'}, {label: 'Women Item'}, {label: 'Women Item'}]
278
+                        },
279
+                        {
280
+                            label: 'Men',
281
+                            items: [{label: 'Men Item'}, {label: 'Men Item'}, {label: 'Men Item'}]
282
+                        }
283
+                    ],
284
+                    [
285
+                        {
286
+                            label: 'Kids',
287
+                            items: [{label: 'Kids Item'}, {label: 'Kids Item'}]
288
+                        },
289
+                        {
290
+                            label: 'Luggage',
291
+                            items: [{label: 'Luggage Item'}, {label: 'Luggage Item'}, {label: 'Luggage Item'}]
292
+                        }
293
+                    ]
294
+                ]
295
+            },
296
+            {
297
+                label: 'Electronics', icon: 'pi pi-fw pi-desktop',
298
+                items: [
299
+                    [
300
+                        {
301
+                            label: 'Computer',
302
+                            items: [{label: 'Computer Item'}, {label: 'Computer Item'}]
303
+                        },
304
+                        {
305
+                            label: 'Camcorder',
306
+                            items: [{label: 'Camcorder Item'}, {label: 'Camcorder Item'}, {label: 'Camcorder Item'}]
307
+                        }
308
+                    ],
309
+                    [
310
+                        {
311
+                            label: 'TV',
312
+                            items: [{label: 'TV Item'}, {label: 'TV Item'}]
313
+                        },
314
+                        {
315
+                            label: 'Audio',
316
+                            items: [{label: 'Audio Item'}, {label: 'Audio Item'}, {label: 'Audio Item'}]
317
+                        }
318
+                    ],
319
+                    [
320
+                        {
321
+                            label: 'Sports.7',
322
+                            items: [{label: 'Sports.7.1'}, {label: 'Sports.7.2'}]
323
+                        }
324
+                    ]
325
+                ]
326
+            },
327
+            {
328
+                label: 'Furniture', icon: 'pi pi-fw pi-image',
329
+                items: [
330
+                    [
331
+                        {
332
+                            label: 'Living Room',
333
+                            items: [{label: 'Living Room Item'}, {label: 'Living Room Item'}]
334
+                        },
335
+                        {
336
+                            label: 'Kitchen',
337
+                            items: [{label: 'Kitchen Item'}, {label: 'Kitchen Item'}, {label: 'Kitchen Item'}]
338
+                        }
339
+                    ],
340
+                    [
341
+                        {
342
+                            label: 'Bedroom',
343
+                            items: [{label: 'Bedroom Item'}, {label: 'Bedroom Item'}]
344
+                        },
345
+                        {
346
+                            label: 'Outdoor',
347
+                            items: [{label: 'Outdoor Item'}, {label: 'Outdoor Item'}, {label: 'Outdoor Item'}]
348
+                        }
349
+                    ]
350
+                ]
351
+            },
352
+            {
353
+                label: 'Sports', icon: 'pi pi-fw pi-star-o',
354
+                items: [
355
+                    [
356
+                        {
357
+                            label: 'Basketball',
358
+                            items: [{label: 'Basketball Item'}, {label: 'Basketball Item'}]
359
+                        },
360
+                        {
361
+                            label: 'Football',
362
+                            items: [{label: 'Football Item'}, {label: 'Football Item'}, {label: 'Football Item'}]
363
+                        }
364
+                    ],
365
+                    [
366
+                        {
367
+                            label: 'Tennis',
368
+                            items: [{label: 'Tennis Item'}, {label: 'Tennis Item'}]
369
+                        }
370
+                    ]
371
+                ]
372
+            },
373
+        ];
374
+
375
+        this.panelMenuItems = [
376
+            {
377
+                label: 'Customers',
378
+                items: [
379
+                    {
380
+                        label: 'New',
381
+                        icon: 'pi pi-fw pi-plus',
382
+                        items: [
383
+                            {
384
+                                label: 'Customer',
385
+                                icon: 'pi pi-fw pi-plus'
386
+                            },
387
+                            {
388
+                                label: 'Duplicate',
389
+                                icon: 'pi pi-fw pi-copy'
390
+                            },
391
+
392
+                        ]
393
+                    },
394
+                    {
395
+                        label: 'Edit',
396
+                        icon: 'pi pi-fw pi-user-edit'
397
+                    }
398
+                ]
399
+            },
400
+            {
401
+                label: 'Orders',
402
+                items: [
403
+                    {
404
+                        label: 'View',
405
+                        icon: 'pi pi-fw pi-list'
406
+                    },
407
+                    {
408
+                        label: 'Search',
409
+                        icon: 'pi pi-fw pi-search'
410
+                    }
411
+
412
+                ]
413
+            },
414
+            {
415
+                label: 'Shipments',
416
+                items: [
417
+                    {
418
+                        label: 'Tracker',
419
+                        icon: 'pi pi-fw pi-compass',
420
+
421
+                    },
422
+                    {
423
+                        label: 'Map',
424
+                        icon: 'pi pi-fw pi-map-marker',
425
+
426
+                    },
427
+                    {
428
+                        label: 'Manage',
429
+                        icon: 'pi pi-fw pi-pencil'
430
+                    }
431
+                ]
432
+            },
433
+            {
434
+                label: 'Profile',
435
+                items: [
436
+                    {
437
+                        label: 'Settings',
438
+                        icon: 'pi pi-fw pi-cog'
439
+                    },
440
+                    {
441
+                        label: 'Billing',
442
+                        icon: 'pi pi-fw pi-file'
443
+                    }
444
+                ]
445
+            }
446
+        ];
447
+
448
+        this.stepsItems = [
449
+            {
450
+                label: 'Personal'
451
+            },
452
+            {
453
+                label: 'Seat'
454
+            },
455
+            {
456
+                label: 'Payment'
457
+            },
458
+            {
459
+                label: 'Confirmation'
460
+            }
461
+        ];
462
+    }
463
+
464
+}

+ 28
- 0
Angular/src/app/demo/view/menusdemo.scss 查看文件

@@ -0,0 +1,28 @@
1
+@media screen and (max-width: 575px) {
2
+    .p-steps {
3
+        height: 300px;
4
+
5
+        > ul {
6
+            flex-direction: column;
7
+            height: 100%;
8
+
9
+            .p-steps-item {
10
+                flex-direction: column-reverse;
11
+                align-items: flex-start;
12
+                justify-content: center;
13
+
14
+                &:before {
15
+                    border-left: 1px solid var(--surface-d);
16
+                    border-top: 0 none;
17
+                    width: auto;
18
+                    height: 100%;
19
+                    margin-left: calc(1.714rem / 2);
20
+                }
21
+
22
+                .p-menuitem-link {
23
+                    padding: .5rem 0;
24
+                }
25
+            }
26
+        }
27
+    }
28
+}

+ 61
- 0
Angular/src/app/demo/view/messagesdemo.component.html 查看文件

@@ -0,0 +1,61 @@
1
+<div class="grid">
2
+    <div class="col-12 lg:col-6">
3
+        <div class="card">
4
+            <h5>Toast</h5>
5
+            <p-toast key="tst"></p-toast>
6
+
7
+            <button pButton pRipple type="button" (click)="showSuccessViaToast()" label="Success" class="p-button-success mr-2 mb-2"></button>
8
+            <button pButton pRipple type="button" (click)="showInfoViaToast()" label="Info" class="p-button-info mr-2 mb-2"></button>
9
+            <button pButton pRipple type="button" (click)="showWarnViaToast()" label="Warn" class="p-button-warning mr-2 mb-2"></button>
10
+            <button pButton pRipple type="button" (click)="showErrorViaToast()" label="Error" class="p-button-danger mb-2"></button>
11
+        </div>
12
+    </div>
13
+
14
+    <div class="col-12 lg:col-6">
15
+        <div class="card">
16
+            <h5>Messages</h5>
17
+            <button pButton pRipple type="button" (click)="showSuccessViaMessages()" label="Success" class="p-button-success mr-2 mb-2"></button>
18
+            <button pButton pRipple type="button" (click)="showInfoViaMessages()" label="Info" class="p-button-info mr-2 mb-2"></button>
19
+            <button pButton pRipple type="button" (click)="showWarnViaMessages()" label="Warn" class="p-button-warning mr-2 mb-2"></button>
20
+            <button pButton pRipple type="button" (click)="showErrorViaMessages()" label="Error" class="p-button-danger mb-2"></button>
21
+
22
+            <p-messages [value]="msgs"></p-messages>
23
+        </div>
24
+    </div>
25
+
26
+    <div class="col-12 lg:col-8">
27
+        <div class="card">
28
+            <h5>Inline Message</h5>
29
+            <div class="mt-4">
30
+                <span class="p-float-label inline-block">
31
+                    <input type="text" pInputText class="ng-dirty ng-invalid p-invalid mr-2">
32
+                    <label>Username*</label>
33
+                </span>
34
+                <p-message severity="error" text="Field is required"></p-message>
35
+            </div>
36
+
37
+            <div class="mt-4">
38
+                <span class="p-float-label inline-block">
39
+                    <input type="text" pInputText class="ng-dirty ng-invalid p-invalid mr-2">
40
+                    <label>Email*</label>
41
+                </span>
42
+                <p-message severity="error"></p-message>
43
+            </div>
44
+        </div>
45
+    </div>
46
+
47
+    <div class="col-12 lg:col-4">
48
+        <div class="card">
49
+            <h5>Help Text</h5>
50
+            <div class="field p-fluid">
51
+                <span class="p-float-label">
52
+                    <input id="username" type="username" aria-describedby="username-help" class="ng-invalid ng-dirty" pInputText />
53
+                    <label for="username">Username*</label>
54
+                </span>
55
+                <small id="username-help" class="p-error">Username is not available.</small>
56
+            </div>
57
+        </div>
58
+    </div>
59
+
60
+
61
+</div>

+ 64
- 0
Angular/src/app/demo/view/messagesdemo.component.ts 查看文件

@@ -0,0 +1,64 @@
1
+import {Component} from '@angular/core';
2
+import {Message, MessageService} from 'primeng/api';
3
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
4
+
5
+@Component({
6
+    templateUrl: './messagesdemo.component.html',
7
+    styles: [`
8
+        :host ::ng-deep .p-button {
9
+            min-width: 8em;
10
+        }
11
+
12
+		:host ::ng-deep .p-message {
13
+			margin-left: .25em;
14
+		}
15
+    `],
16
+    providers: [MessageService]
17
+})
18
+export class MessagesDemoComponent {
19
+
20
+    msgs: Message[] = [];
21
+
22
+    constructor(private service: MessageService, private breadcrumbService: AppBreadcrumbService) {
23
+        this.breadcrumbService.setItems([
24
+            { label: 'UI Kit' },
25
+            { label: 'Message', routerLink: ['/uikit/message'] }
26
+        ]);
27
+    }
28
+
29
+    showInfoViaToast() {
30
+        this.service.add({key: 'tst', severity: 'info', summary: 'Info Message', detail: 'PrimeNG rocks'});
31
+    }
32
+
33
+    showWarnViaToast() {
34
+        this.service.add({key: 'tst', severity: 'warn', summary: 'Warn Message', detail: 'There are unsaved changes'});
35
+    }
36
+
37
+    showErrorViaToast() {
38
+        this.service.add({ key: 'tst', severity: 'error', summary: 'Error Message', detail: 'Validation failed' });
39
+    }
40
+
41
+    showSuccessViaToast() {
42
+        this.service.add({ key: 'tst', severity: 'success', summary: 'Success Message', detail: 'Message sent' });
43
+    }
44
+
45
+    showInfoViaMessages() {
46
+        this.msgs = [];
47
+        this.msgs.push({ severity: 'info', summary: 'Info Message', detail: 'PrimeNG rocks' });
48
+    }
49
+
50
+    showWarnViaMessages() {
51
+        this.msgs = [];
52
+        this.msgs.push({ severity: 'warn', summary: 'Warn Message', detail: 'There are unsaved changes' });
53
+    }
54
+
55
+    showErrorViaMessages() {
56
+        this.msgs = [];
57
+        this.msgs.push({ severity: 'error', summary: 'Error Message', detail: 'Validation failed' });
58
+    }
59
+
60
+    showSuccessViaMessages() {
61
+        this.msgs = [];
62
+        this.msgs.push({ severity: 'success', summary: 'Success Message', detail: 'Message sent' });
63
+    }
64
+}

+ 165
- 0
Angular/src/app/demo/view/miscdemo.component.html 查看文件

@@ -0,0 +1,165 @@
1
+<div class="grid misc-demo">
2
+    <div class="col-12">
3
+        <div class="card">
4
+            <h5>ProgressBar</h5>
5
+            <div class="grid">
6
+                <div class="col">
7
+                    <p-progressBar [value]="value" [showValue]="false"></p-progressBar>
8
+                </div>
9
+                <div class="col">
10
+                    <p-progressBar [value]="50" [showValue]="false"></p-progressBar>
11
+                </div>
12
+            </div>
13
+        </div>
14
+    </div>
15
+    <div class="col-12 lg:col-6">
16
+        <div class="card">
17
+            <h4>Badge</h4>
18
+            <h5>Numbers</h5>
19
+            <div class="badges">
20
+                <p-badge [value]="2" styleClass="mr-2"></p-badge>
21
+                <p-badge [value]="8" severity="success" styleClass="mr-2"></p-badge>
22
+                <p-badge [value]="4" severity="info" styleClass="mr-2"></p-badge>
23
+                <p-badge [value]="12" severity="warning" styleClass="mr-2"></p-badge>
24
+                <p-badge [value]="3" severity="danger"></p-badge>
25
+            </div>
26
+
27
+            <h5>Positioned Badge</h5>
28
+            <i class="pi pi-bell mr-4 p-text-secondary" pBadge style="font-size: 2rem" value="2"></i>
29
+            <i class="pi pi-calendar mr-4 p-text-secondary" pBadge style="font-size: 2rem" [value]="'10+'" severity="danger"></i>
30
+            <i class="pi pi-envelope p-text-secondary" pBadge style="font-size: 2rem" severity="danger"></i>
31
+
32
+
33
+            <h5>Inline Button Badge</h5>
34
+            <p-button label="Emails" badge="8" styleClass="mr-2"></p-button>
35
+            <p-button label="Messages" icon="pi pi-users" styleClass="p-button-warning" badge="8" badgeClass="p-badge-danger"></p-button>
36
+
37
+            <h5>Sizes</h5>
38
+            <div class="badges">
39
+                <p-badge [value]="2" styleClass="mr-2"></p-badge>
40
+                <p-badge [value]="4" size="large" severity="warning" styleClass="mr-2"></p-badge>
41
+                <p-badge [value]="6" size="xlarge" severity="success" styleClass="mr-2"></p-badge>
42
+            </div>
43
+        </div>
44
+
45
+        <div class="card">
46
+            <h4>Avatar</h4>
47
+            <h5>Avatar Group</h5>
48
+            <p-avatarGroup styleClass="mb-3">
49
+                <p-avatar image="assets/demo/images/avatar/amyelsner.png" size="large" shape="circle"></p-avatar>
50
+                <p-avatar image="assets/demo/images/avatar/asiyajavayant.png" size="large" shape="circle"></p-avatar>
51
+                <p-avatar image="assets/demo/images/avatar/onyamalimba.png" size="large" shape="circle"></p-avatar>
52
+                <p-avatar image="assets/demo/images/avatar/ionibowcher.png" size="large" shape="circle"></p-avatar>
53
+                <p-avatar image="assets/demo/images/avatar/xuxuefeng.png" size="large"shape="circle"></p-avatar>
54
+                <p-avatar label="+2" shape="circle" size="large" [style]="{'background-color':'#9c27b0', 'color': '#ffffff'}"></p-avatar>
55
+            </p-avatarGroup>
56
+
57
+            <h5>Label - Circle</h5>
58
+            <p-avatar label="P" styleClass="mr-2" size="xlarge" shape="circle"></p-avatar>
59
+            <p-avatar label="V" styleClass="mr-2" size="large" [style]="{'background-color':'#2196F3', 'color': '#ffffff'}" shape="circle"></p-avatar>
60
+            <p-avatar label="U" styleClass="mr-2" [style]="{'background-color': '#9c27b0', 'color': '#ffffff'}" shape="circle"></p-avatar>
61
+
62
+            <h5>Icon - Badge</h5>
63
+            <p-avatar icon="pi pi-user" pBadge value="4" severity="success" styleClass="mr-2" size="xlarge"></p-avatar>
64
+        </div>
65
+
66
+        <div class="card">
67
+            <h4>ScrollTop</h4>
68
+            <p-scrollPanel [style]="{width: '250px', height: '200px'}">
69
+                <p>
70
+                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
71
+                    Vitae et leo duis ut diam.
72
+                    Ultricies mi quis hendrerit dolor magna eget est lorem. Amet consectetur adipiscing elit ut.
73
+                    Nam libero justo laoreet sit amet. Pharetra massa massa ultricies mi quis hendrerit dolor magna.
74
+                    Est ultricies integer quis auctor elit sed vulputate. Consequat ac felis donec et. Tellus orci ac auctor augue mauris.
75
+                    Semper feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Tincidunt arcu non sodales neque sodales.
76
+                    Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Sodales ut etiam sit amet nisl purus.
77
+                    Cursus sit amet dictum sit amet. Tristique senectus et netus et malesuada fames ac turpis egestas.
78
+                    Et tortor consequat id porta nibh venenatis cras sed. Diam maecenas ultricies mi eget mauris.
79
+                    Eget egestas purus viverra accumsan in nisl nisi. Suscipit adipiscing bibendum est ultricies integer.
80
+                    Mattis aliquam faucibus purus in massa tempor nec.
81
+                </p>
82
+                <p-scrollTop target="parent" styleClass="custom-scrolltop" [threshold]="100" icon="pi pi-arrow-up"></p-scrollTop>
83
+            </p-scrollPanel>
84
+        </div>
85
+    </div>
86
+    <div class="col-12 lg:col-6">
87
+        <div class="card">
88
+            <h4>Tag</h4>
89
+            <h5>Tags</h5>
90
+            <p-tag styleClass="mr-2" value="Primary"></p-tag>
91
+            <p-tag styleClass="mr-2" severity="success" value="Success"></p-tag>
92
+            <p-tag styleClass="mr-2" severity="info" value="Info"></p-tag>
93
+            <p-tag styleClass="mr-2" severity="warning" value="Warning"></p-tag>
94
+            <p-tag severity="danger" value="Danger"></p-tag>
95
+
96
+            <h5>Pills</h5>
97
+            <p-tag styleClass="mr-2" value="Primary" [rounded]="true"></p-tag>
98
+            <p-tag styleClass="mr-2" severity="success" value="Success" [rounded]="true"></p-tag>
99
+            <p-tag styleClass="mr-2" severity="info" value="Info" [rounded]="true"></p-tag>
100
+            <p-tag styleClass="mr-2" severity="warning" value="Warning" [rounded]="true"></p-tag>
101
+            <p-tag severity="danger" value="Danger" [rounded]="true"></p-tag>
102
+
103
+            <h5>Icons</h5>
104
+            <p-tag styleClass="mr-2" icon="pi pi-user" value="Primary"></p-tag>
105
+            <p-tag styleClass="mr-2" icon="pi pi-check" severity="success" value="Success"></p-tag>
106
+            <p-tag styleClass="mr-2" icon="pi pi-info-circle" severity="info" value="Info"></p-tag>
107
+            <p-tag styleClass="mr-2" con="pi pi-exclamation-triangle" severity="warning" value="Warning"></p-tag>
108
+            <p-tag icon="pi pi-times" severity="danger" value="Danger"></p-tag>
109
+        </div>
110
+
111
+        <div class="card">
112
+            <h4>Chip</h4>
113
+            <h5>Basic</h5>
114
+            <div class="flex align-items-center">
115
+                <p-chip label="Action" styleClass="mr-2"></p-chip>
116
+                <p-chip label="Comedy" styleClass="mr-2"></p-chip>
117
+                <p-chip label="Mystery" styleClass="mr-2"></p-chip>
118
+                <p-chip label="Thriller" [removable]="true"></p-chip>
119
+            </div>
120
+
121
+            <h5>Icon</h5>
122
+            <div class="flex align-items-center">
123
+                <p-chip label="Apple" icon="pi pi-apple" styleClass="mr-2"></p-chip>
124
+                <p-chip label="Facebook" icon="pi pi-facebook" styleClass="mr-2"></p-chip>
125
+                <p-chip label="Google" icon="pi pi-google" styleClass="mr-2"></p-chip>
126
+                <p-chip label="Microsoft" icon="pi pi-microsoft" [removable]="true"></p-chip>
127
+            </div>
128
+
129
+            <h5>Image</h5>
130
+            <div class="flex align-items-center">
131
+                <p-chip label="Amy Elsner" image="assets/demo/images/avatar/amyelsner.png" styleClass="mr-2"></p-chip>
132
+                <p-chip label="Asiya Javayant" image="assets/demo/images/avatar/asiyajavayant.png" styleClass="mr-2"></p-chip>
133
+                <p-chip label="Onyama Limba" image="assets/demo/images/avatar/onyamalimba.png" styleClass="mr-2"></p-chip>
134
+                <p-chip label="Xuxue Feng" image="assets/demo/images/avatar/xuxuefeng.png" [removable]="true"></p-chip>
135
+            </div>
136
+
137
+            <h5>Styling</h5>
138
+            <div class="flex align-items-center">
139
+                <p-chip label="Action" styleClass="mr-2 custom-chip"></p-chip>
140
+                <p-chip label="Comedy" styleClass="mr-2 custom-chip"></p-chip>
141
+                <p-chip label="Onyama Limba" image="assets/demo/images/avatar/onyamalimba.png" styleClass="mr-2 custom-chip"></p-chip>
142
+                <p-chip label="Xuxue Feng" image="assets/demo/images/avatar/xuxuefeng.png" [removable]="true" styleClass="custom-chip"></p-chip>
143
+            </div>
144
+        </div>
145
+
146
+        <div class="card">
147
+            <h4>Skeleton</h4>
148
+            <div class="custom-skeleton p-4">
149
+                <div class="flex mb-3">
150
+                    <p-skeleton shape="circle" size="4rem" styleClass="mr-2"></p-skeleton>
151
+                    <div>
152
+                        <p-skeleton width="10rem" styleClass="mb-2"></p-skeleton>
153
+                        <p-skeleton width="5rem" styleClass="mb-2"></p-skeleton>
154
+                        <p-skeleton height=".5rem"></p-skeleton>
155
+                    </div>
156
+                </div>
157
+                <p-skeleton width="100%" height="150px"></p-skeleton>
158
+                <div class="flex justify-content-between mt-3">
159
+                    <p-skeleton width="4rem" height="2rem"></p-skeleton>
160
+                    <p-skeleton width="4rem" height="2rem"></p-skeleton>
161
+                </div>
162
+            </div>
163
+        </div>
164
+    </div>
165
+</div>

+ 40
- 0
Angular/src/app/demo/view/miscdemo.component.ts 查看文件

@@ -0,0 +1,40 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
3
+
4
+@Component({
5
+    templateUrl: './miscdemo.component.html',
6
+    styles: [`
7
+		:host ::ng-deep .misc-demo .p-button.p-widget {
8
+		    min-width: 6rem;
9
+	    }
10
+
11
+		:host ::ng-deep .misc-demo .badges .p-badge {
12
+		    margin-right: .5rem;
13
+		}
14
+
15
+		:host ::ng-deep .misc-demo .badges .p-tag {
16
+			margin-right: .5rem;
17
+		}
18
+    `]
19
+})
20
+export class MiscDemoComponent implements OnInit {
21
+
22
+    value = 0;
23
+
24
+    constructor(private breadcrumbService: AppBreadcrumbService) {
25
+        this.breadcrumbService.setItems([
26
+            { label: 'UI Kit' },
27
+            { label: 'Misc', routerLink: ['/uikit/misc'] }
28
+        ]);
29
+    }
30
+
31
+    ngOnInit() {
32
+        const interval = setInterval(() => {
33
+            this.value = this.value + Math.floor(Math.random() * 10) + 1;
34
+            if (this.value >= 100) {
35
+                this.value = 100;
36
+                clearInterval(interval);
37
+            }
38
+        }, 2000);
39
+    }
40
+}

+ 119
- 0
Angular/src/app/demo/view/overlaysdemo.component.html 查看文件

@@ -0,0 +1,119 @@
1
+<div class="grid">
2
+    <div class="col-12 lg:col-6">
3
+        <div class="card">
4
+            <h5>Dialog</h5>
5
+            <p-dialog header="Dialog" [(visible)]="display" modal="modal" showEffect="fade" [style]="{width: '400px'}">
6
+                <div style="line-height: 1.5">
7
+                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
8
+                    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
9
+                    in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
10
+                    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
11
+                </div>
12
+                <p-footer>
13
+                    <button pButton pRipple type="button" icon="pi pi-check" (click)="display=false" label="Yes" class="p-button-text"></button>
14
+                    <button pButton pRipple type="button" icon="pi pi-times" (click)="display=false" label="No" class="p-button-text"></button>
15
+                </p-footer>
16
+            </p-dialog>
17
+
18
+            <button pButton pRipple type="button" (click)="display=true" icon="pi pi-external-link" label="Show" style="width: auto"></button>
19
+        </div>
20
+
21
+        <div class="card p-fluid">
22
+            <h5>Overlay Panel</h5>
23
+            <div class="grid">
24
+                <div class="col-6">
25
+                    <button pButton pRipple type="button" label="Image" (click)="op1.toggle($event)" class="p-button-success"></button>
26
+                    <p-overlayPanel #op1>
27
+                        <img src="assets/demo/images/product/bamboo-watch.jpg" alt="Bamboo Watch" />
28
+                    </p-overlayPanel>
29
+                </div>
30
+                <div class="col-6">
31
+                    <button pButton pRipple type="button" label="DataTable" (click)="op2.toggle($event)" class="p-button-success"></button>
32
+                    <p-overlayPanel #op2 [showCloseIcon]="true" [style]="{width: '450px'}">
33
+                        <ng-template pTemplate>
34
+                            <p-table [value]="products" selectionMode="single" [(selection)]="selectedProduct" [paginator]="true" [rows]="5" (onRowSelect)="op2.hide()">
35
+                                <ng-template pTemplate="header">
36
+                                    <tr>
37
+                                        <th pSortableColumn="name">Name<p-sortIcon field="name"></p-sortIcon></th>
38
+                                        <th>Image</th>
39
+                                        <th pSortableColumn="price">Price <p-sortIcon field="price"></p-sortIcon></th>
40
+                                    </tr>
41
+                                </ng-template>
42
+                                <ng-template pTemplate="body" let-rowData let-product>
43
+                                    <tr [pSelectableRow]="rowData">
44
+                                        <td>{{product.name}}</td>
45
+                                        <td><img src="assets/demo/images/product/{{product.image}}" [alt]="product.image" class="product-image" /></td>
46
+                                        <td>{{product.price}}</td>
47
+                                    </tr>
48
+                                </ng-template>
49
+                            </p-table>
50
+                        </ng-template>
51
+                    </p-overlayPanel>
52
+                </div>
53
+            </div>
54
+        </div>
55
+    </div>
56
+
57
+    <div class="col-12 lg:col-6">
58
+
59
+        <div class="card">
60
+            <h5>Confirmation</h5>
61
+            <p-confirmDialog header="Confirmation" key="confirm1" icon="pi pi-exclamation-triangle" message="Are you sure you want to proceed?"
62
+                             [style]="{width: '425px'}" acceptButtonStyleClass="p-button-text" rejectButtonStyleClass="p-button-text"></p-confirmDialog>
63
+
64
+            <button pButton pRipple type="button" (click)="confirm1()" icon="pi pi-trash" label="Delete" class="p-button-danger" style="width: auto"></button>
65
+        </div>
66
+
67
+        <div class="card">
68
+            <h5>Sidebar</h5>
69
+            <p-sidebar [(visible)]="visibleSidebar1" [baseZIndex]="10000">
70
+                <h3 style="font-weight:normal">Left Sidebar</h3>
71
+            </p-sidebar>
72
+
73
+            <p-sidebar [(visible)]="visibleSidebar2" position="right" [baseZIndex]="10000">
74
+                <h3 style="font-weight:normal">Right Sidebar</h3>
75
+            </p-sidebar>
76
+
77
+            <p-sidebar [(visible)]="visibleSidebar3" position="top" [baseZIndex]="10000">
78
+                <h3 style="font-weight:normal">Top Sidebar</h3>
79
+            </p-sidebar>
80
+
81
+            <p-sidebar [(visible)]="visibleSidebar4" position="bottom" [baseZIndex]="10000">
82
+                <h3 style="font-weight:normal">Bottom Sidebar</h3>
83
+            </p-sidebar>
84
+
85
+            <p-sidebar [(visible)]="visibleSidebar5" [fullScreen]="true" [baseZIndex]="10000">
86
+                <h3 style="font-weight:normal">Full Screen Sidebar</h3>
87
+            </p-sidebar>
88
+
89
+            <button pButton pRipple type="button" (click)="visibleSidebar1 = true" icon="pi pi-arrow-right" class="p-button-warning"></button>
90
+            <button pButton pRipple type="button" (click)="visibleSidebar2 = true" icon="pi pi-arrow-left" class="p-button-warning"></button>
91
+            <button pButton pRipple type="button" (click)="visibleSidebar3 = true" icon="pi pi-arrow-down" class="p-button-warning"></button>
92
+            <button pButton pRipple type="button" (click)="visibleSidebar4 = true" icon="pi pi-arrow-up" class="p-button-warning"></button>
93
+            <button pButton pRipple type="button" (click)="visibleSidebar5 = true" icon="pi pi-th-large" class="p-button-warning"></button>
94
+        </div>
95
+    </div>
96
+
97
+    <div class="col-12 lg:col-6">
98
+        <div class="card">
99
+            <h5>Tooltip</h5>
100
+            <div class="formgroup-inline">
101
+                <div class="field">
102
+                    <label for="firstname5" class="p-sr-only">Username</label>
103
+                    <input id="firstname5" type="text" pInputText placeholder="Username" pTooltip="Enter your username">
104
+                </div>
105
+                <button pButton pRipple type="button" label="Submit" pTooltip="Click to proceed"></button>
106
+            </div>
107
+        </div>
108
+    </div>
109
+
110
+    <div class="col-12 lg:col-6">
111
+        <div class="card">
112
+            <h5>ConfirmPopup</h5>
113
+
114
+            <p-toast></p-toast>
115
+            <button (click)="confirm2($event)" pButton icon="pi pi-check" label="Confirm"></button>
116
+            <p-confirmPopup key="confirm2"></p-confirmPopup>
117
+        </div>
118
+    </div>
119
+</div>

+ 83
- 0
Angular/src/app/demo/view/overlaysdemo.component.ts 查看文件

@@ -0,0 +1,83 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {ConfirmationService, MessageService} from 'primeng/api';
3
+import {Product} from '../domain/product';
4
+import {ProductService} from '../service/productservice';
5
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
6
+
7
+@Component({
8
+    templateUrl: './overlaysdemo.component.html',
9
+    styleUrls: ['./overlaysdemo.scss'],
10
+    providers: [ConfirmationService, MessageService]
11
+})
12
+export class OverlaysDemoComponent implements OnInit {
13
+
14
+    images: any[];
15
+
16
+    display: boolean;
17
+
18
+    products: Product[];
19
+
20
+    selectedProduct: Product;
21
+
22
+    visibleSidebar1;
23
+
24
+    visibleSidebar2;
25
+
26
+    visibleSidebar3;
27
+
28
+    visibleSidebar4;
29
+
30
+    visibleSidebar5;
31
+
32
+    constructor(private productService: ProductService, private confirmationService: ConfirmationService,
33
+                private messageService: MessageService, private breadcrumbService: AppBreadcrumbService) {
34
+        this.breadcrumbService.setItems([
35
+            { label: 'UI Kit' },
36
+            { label: 'Overlay', routerLink: ['/uikit/overlay'] }
37
+        ]);
38
+    }
39
+
40
+    ngOnInit() {
41
+        this.productService.getProductsSmall().then(products => this.products = products);
42
+
43
+        this.images = [];
44
+        this.images.push({
45
+            source: 'assets/demo/images/sopranos/sopranos1.jpg',
46
+            thumbnail: 'assets/demo/images/sopranos/sopranos1_small.jpg', title: 'Sopranos 1'
47
+        });
48
+        this.images.push({
49
+            source: 'assets/demo/images/sopranos/sopranos2.jpg',
50
+            thumbnail: 'assets/demo/images/sopranos/sopranos2_small.jpg', title: 'Sopranos 2'
51
+        });
52
+        this.images.push({
53
+            source: 'assets/demo/images/sopranos/sopranos3.jpg',
54
+            thumbnail: 'assets/demo/images/sopranos/sopranos3_small.jpg', title: 'Sopranos 3'
55
+        });
56
+        this.images.push({
57
+            source: 'assets/demo/images/sopranos/sopranos4.jpg',
58
+            thumbnail: 'assets/demo/images/sopranos/sopranos4_small.jpg', title: 'Sopranos 4'
59
+        });
60
+    }
61
+
62
+    confirm1() {
63
+        this.confirmationService.confirm({
64
+            key: 'confirm1',
65
+            message: 'Are you sure to perform this action?'
66
+        });
67
+    }
68
+
69
+    confirm2(event: Event) {
70
+        this.confirmationService.confirm({
71
+            key: 'confirm2',
72
+            target: event.target,
73
+            message: 'Are you sure that you want to proceed?',
74
+            icon: 'pi pi-exclamation-triangle',
75
+            accept: () => {
76
+                this.messageService.add({severity: 'info', summary: 'Confirmed', detail: 'You have accepted'});
77
+            },
78
+            reject: () => {
79
+                this.messageService.add({severity: 'error', summary: 'Rejected', detail: 'You have rejected'});
80
+            }
81
+        });
82
+    }
83
+}

+ 8
- 0
Angular/src/app/demo/view/overlaysdemo.scss 查看文件

@@ -0,0 +1,8 @@
1
+.product-image {
2
+	width: 50px;
3
+	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)
4
+}
5
+
6
+:host ::ng-deep button {
7
+	margin-right: .25em;
8
+}

+ 261
- 0
Angular/src/app/demo/view/panelsdemo.component.html 查看文件

@@ -0,0 +1,261 @@
1
+<div class="grid">
2
+    <div class="col-12">
3
+        <div class="card toolbar-demo">
4
+            <h5>Toolbar</h5>
5
+            <p-toolbar>
6
+                <div class="p-toolbar-group-left">
7
+                    <button pButton type="button" label="New" icon="pi pi-plus"></button>
8
+                    <button pButton type="button" label="Update" class="p-button-secondary"
9
+                            icon="pi pi-refresh"></button>
10
+
11
+                    <i class="pi pi-bars p-toolbar-separator"></i>
12
+
13
+                    <button pButton type="button" class="p-button-success" icon="pi pi-check"></button>
14
+                    <button pButton type="button" class="p-button-help" icon="pi pi-print"></button>
15
+                    <button pButton type="button" class="p-button-danger" icon="pi pi-trash"></button>
16
+                </div>
17
+
18
+                <div class="p-toolbar-group-right">
19
+                    <p-splitButton label="Save" icon="pi pi-check" [model]="items"></p-splitButton>
20
+                </div>
21
+            </p-toolbar>
22
+        </div>
23
+    </div>
24
+
25
+    <div class="col-12 md:col-6">
26
+        <div class="card">
27
+            <h5>AccordionPanel</h5>
28
+            <p-accordion>
29
+                <p-accordionTab header="Header I" [selected]="true">
30
+                    <p>
31
+                        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
32
+                        labore et dolore magna aliqua.
33
+                        Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
34
+                        consequat.
35
+                        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
36
+                        pariatur.
37
+                        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
38
+                        id est laborum.
39
+                    </p>
40
+                </p-accordionTab>
41
+                <p-accordionTab header="Header II">
42
+                    <p>
43
+                        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
44
+                        laudantium, totam rem aperiam, eaque
45
+                        ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
46
+                        Nemo enim ipsam voluptatem quia
47
+                        voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione
48
+                        voluptatem sequi nesciunt.
49
+                        Consectetur, adipisci velit, sed quia non numquam eius modi.
50
+                    </p>
51
+                </p-accordionTab>
52
+                <p-accordionTab header="Header III">
53
+                    <p>
54
+                        At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum
55
+                        deleniti atque corrupti quos dolores
56
+                        et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui
57
+                        officia deserunt mollitia animi, id est laborum et dolorum fuga.
58
+                        Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis
59
+                        est eligendi optio cumque nihil impedit
60
+                        quo minus.
61
+                    </p>
62
+                </p-accordionTab>
63
+            </p-accordion>
64
+        </div>
65
+
66
+        <div class="card">
67
+            <h5>TabView</h5>
68
+            <p-tabView orientation="left">
69
+                <p-tabPanel header="Header I" leftIcon="pi pi-check">
70
+                    <p>
71
+                        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
72
+                        labore et dolore magna aliqua.
73
+                        Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
74
+                        consequat.
75
+                        Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
76
+                        pariatur.
77
+                        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
78
+                        id est laborum.
79
+                    </p>
80
+                </p-tabPanel>
81
+                <p-tabPanel header="Header II" leftIcon="pi pi-user">
82
+                    <p>
83
+                        Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
84
+                        laudantium, totam rem aperiam, eaque
85
+                        ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
86
+                        Nemo enim ipsam voluptatem quia
87
+                        voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione
88
+                        voluptatem sequi nesciunt.
89
+                        Consectetur, adipisci velit, sed quia non numquam eius modi.
90
+                    </p>
91
+                </p-tabPanel>
92
+                <p-tabPanel header="Header III" leftIcon="pi pi-mobile">
93
+                    <p>
94
+                        At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum
95
+                        deleniti atque corrupti quos dolores
96
+                        et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui
97
+                        officia deserunt mollitia animi, id est laborum et dolorum fuga.
98
+                        Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis
99
+                        est eligendi optio cumque nihil impedit
100
+                        quo minus.
101
+                    </p>
102
+                </p-tabPanel>
103
+            </p-tabView>
104
+        </div>
105
+    </div>
106
+
107
+    <div class="col-12 md:col-6">
108
+        <div class="card">
109
+            <h5>Panel</h5>
110
+            <p-panel header="Header" [toggleable]="true">
111
+                <p>
112
+                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
113
+                    et dolore magna aliqua.
114
+                    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
115
+                    consequat.
116
+                    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
117
+                    pariatur.
118
+                    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
119
+                    est laborum.
120
+                </p>
121
+            </p-panel>
122
+        </div>
123
+
124
+        <div class="card">
125
+            <h5>Fieldset</h5>
126
+            <p-fieldset legend="Toggleable" toggleable="true">
127
+                <p>
128
+                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
129
+                    et dolore magna aliqua.
130
+                    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
131
+                    consequat.
132
+                    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
133
+                    pariatur.
134
+                    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id
135
+                    est laborum.
136
+                </p>
137
+            </p-fieldset>
138
+        </div>
139
+
140
+        <div class="card">
141
+            <div class="card-header">
142
+                <h5>Card</h5>
143
+                <p-menu #menu [popup]="true" [model]="cardMenu"></p-menu>
144
+                <button pButton type="button" icon="pi pi-plus" class="p-button-rounded p-button-plain p-button-text"
145
+                        (click)="menu.toggle($event)"></button>
146
+            </div>
147
+
148
+            <p class="card-subtitle">Subtitle</p>
149
+            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
150
+                dolore magna aliqua.
151
+                Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
152
+                consequat.
153
+                Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
154
+                Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est
155
+                laborum.</p>
156
+        </div>
157
+    </div>
158
+
159
+    <div class="col-12">
160
+        <div class="card">
161
+            <h5>Divider</h5>
162
+            <div class="grid">
163
+                <div class="col-5 flex align-items-center justify-content-center">
164
+                    <div class="p-fluid">
165
+                        <div class="field">
166
+                            <span class="p-float-label">
167
+                                <input pInputText id="username" type="text"/>
168
+                                <label for="username">Username</label>
169
+                            </span>
170
+                        </div>
171
+                        <div class="field">
172
+                            <span class="p-float-label">
173
+                                <input pInputText id="password" type="password"/>
174
+                                <label for="password">Password</label>
175
+                            </span>
176
+                        </div>
177
+                        <p-button label="Login" styleClass="m-0"></p-button>
178
+                    </div>
179
+                </div>
180
+                <div class="col-1">
181
+                    <p-divider layout="vertical">
182
+                        <b>OR</b>
183
+                    </p-divider>
184
+                </div>
185
+                <div class="col-5 align-items-center justify-content-center">
186
+                    <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium,
187
+                        totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi
188
+                        architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit
189
+                        aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione
190
+                        voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi.</p>
191
+
192
+                    <p-divider layout="horizontal" align="center">
193
+                        <span class="p-tag">Badge</span>
194
+                    </p-divider>
195
+
196
+                    <p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum
197
+                        deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati
198
+                        cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est
199
+                        laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio.
200
+                        Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus.</p>
201
+
202
+                    <p-divider align="right">
203
+                        <p-button label="Button" icon="pi pi-search" styleClass="p-button-outlined"></p-button>
204
+                    </p-divider>
205
+
206
+                    <p>Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et
207
+                        voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur
208
+                        a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis
209
+                        doloribus asperiores repellat.
210
+                        Donec vel volutpat ipsum. Integer nunc magna, posuere ut tincidunt eget, egestas vitae sapien.
211
+                        Morbi dapibus luctus odio.</p>
212
+                </div>
213
+            </div>
214
+        </div>
215
+    </div>
216
+
217
+    <div class="col-12">
218
+        <div class="card">
219
+            <h5>Splitter</h5>
220
+            <p-splitter [style]="{'height': '300px'}" [panelSizes]="[20,80]" [minSizes]="[10,0]" styleClass="mb-5">
221
+                <ng-template pTemplate="panel">
222
+                    <div class="col flex align-items-center justify-content-center p-2" style="overflow: auto">
223
+                        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
224
+                        labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
225
+                        ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
226
+                        in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
227
+                        Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim
228
+                        id est laborum.
229
+                    </div>
230
+                </ng-template>
231
+                <ng-template pTemplate="panel">
232
+                    <p-splitter layout="vertical" [panelSizes]="[30,70]" [minSizes]="[10,10]" panelStyleClass="splitter-overflow">
233
+                        <ng-template pTemplate="panel">
234
+                            <div class="flex align-items-center justify-content-center p-2">
235
+                                Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
236
+                                doloremque
237
+                                laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi
238
+                                architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia
239
+                                voluptas
240
+                                sit
241
+                                aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione
242
+                                voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius
243
+                                modi.
244
+                            </div>
245
+                        </ng-template>
246
+                        <ng-template pTemplate="panel">
247
+                            <div class="flex align-items-center justify-content-center p-2">
248
+                                At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis
249
+                                praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias
250
+                                excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui
251
+                                officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem
252
+                                rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est
253
+                                eligendi optio cumque nihil impedit quo minus.
254
+                            </div>
255
+                        </ng-template>
256
+                    </p-splitter>
257
+                </ng-template>
258
+            </p-splitter>
259
+        </div>
260
+    </div>
261
+</div>

+ 60
- 0
Angular/src/app/demo/view/panelsdemo.component.ts 查看文件

@@ -0,0 +1,60 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {MenuItem} from 'primeng/api';
3
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
4
+
5
+@Component({
6
+    templateUrl: './panelsdemo.component.html',
7
+    styles: [`
8
+        :host ::ng-deep button {
9
+            margin-right: .25em;
10
+            margin-left: .25em;
11
+        }
12
+
13
+        :host ::ng-deep .p-splitbutton button {
14
+            margin-right: 0;
15
+            margin-left: 0;
16
+        }
17
+
18
+        :host ::ng-deep .p-splitter-panel-nested {
19
+            overflow: auto;
20
+        }
21
+
22
+        @media screen and (max-width: 960px) {
23
+            .card.toolbar-demo {
24
+                overflow: auto;
25
+            }
26
+        }
27
+    `]
28
+})
29
+export class PanelsDemoComponent implements OnInit {
30
+
31
+    items: MenuItem[];
32
+
33
+    cardMenu: MenuItem[];
34
+
35
+    constructor(private breadcrumbService: AppBreadcrumbService) {
36
+        this.breadcrumbService.setItems([
37
+            { label: 'UI Kit' },
38
+            { label: 'Panel', routerLink: ['/uikit/panel'] }
39
+        ]);
40
+    }
41
+
42
+    ngOnInit() {
43
+        this.items = [
44
+            {label: 'Angular.io', icon: 'pi pi-external-link', url: 'http://angular.io'},
45
+            {label: 'Theming', icon: 'pi pi-bookmark', routerLink: ['/theming']}
46
+        ];
47
+
48
+        this.cardMenu = [
49
+            {
50
+                label: 'Save', icon: 'pi pi-fw pi-check'
51
+            },
52
+            {
53
+                label: 'Update', icon: 'pi pi-fw pi-refresh'
54
+            },
55
+            {
56
+                label: 'Delete', icon: 'pi pi-fw pi-trash'
57
+            },
58
+        ];
59
+    }
60
+}

+ 352
- 0
Angular/src/app/demo/view/tabledemo.component.html 查看文件

@@ -0,0 +1,352 @@
1
+<div class="grid table-demo">
2
+	<div class="col-12">
3
+		<div class="card">
4
+			<h5>Default</h5>
5
+			<p>Pagination, sorting, filtering and checkbox selection.</p>
6
+            <p-table #dt [value]="customers1" [(selection)]="selectedCustomers1" dataKey="id"
7
+                     styleClass="p-datatable-customers" [rowHover]="true" [rows]="10" [paginator]="true"
8
+                     [filterDelay]="0" [globalFilterFields]="['name','country.name','representative.name','status']">
9
+                <ng-template pTemplate="caption">
10
+                    <div class="flex flex-column md:flex-row md:justify-content-between table-header">
11
+                        Customers
12
+                        <span class="p-input-icon-left">
13
+                    <i class="pi pi-search"></i>
14
+                    <input pInputText type="text" (input)="dt.filterGlobal($event.target.value, 'contains')"
15
+                           placeholder="Global Search"/>
16
+                </span>
17
+                    </div>
18
+                </ng-template>
19
+                <ng-template pTemplate="header">
20
+                    <tr>
21
+                        <th style="width: 3rem">
22
+                            <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
23
+                        </th>
24
+                        <th pSortableColumn="name">
25
+                            <div class="flex justify-content-between align-items-center">
26
+                                Name
27
+                                <p-sortIcon field="name"></p-sortIcon>
28
+                                <p-columnFilter type="text" field="name" display="menu" class="ml-auto"></p-columnFilter>
29
+                            </div>
30
+                        </th>
31
+                        <th pSortableColumn="country.name">
32
+                            <div class="flex justify-content-between align-items-center">
33
+                                Country
34
+                                <p-sortIcon field="country.name"></p-sortIcon>
35
+                                <p-columnFilter type="text" field="country.name" display="menu" class="ml-auto"></p-columnFilter>
36
+                            </div>
37
+                        </th>
38
+                        <th pSortableColumn="representative.name">
39
+                            <div class="flex justify-content-between align-items-center">
40
+                                Agent
41
+                                <p-sortIcon field="representative.name"></p-sortIcon>
42
+                                <p-columnFilter field="representative" matchMode="in" display="menu" [showMatchModes]="false" [showOperator]="false" [showAddButton]="false">
43
+                                    <ng-template pTemplate="header">
44
+                                        <div class="px-3 pt-3 pb-0">
45
+                                            <span class="font-bold">Agent Picker</span>
46
+                                        </div>
47
+                                    </ng-template>
48
+                                    <ng-template pTemplate="filter" let-value let-filter="filterCallback">
49
+                                        <p-multiSelect [ngModel]="value" [options]="representatives" placeholder="Any" (onChange)="filter($event.value)" optionLabel="name">
50
+                                            <ng-template let-option pTemplate="item">
51
+                                                <div class="p-multiselect-representative-option">
52
+                                                    <img [alt]="option.label" src="assets/demo/images/avatar/{{option.image}}" width="32" style="vertical-align: middle" />
53
+                                                    <span class="ml-1">{{option.name}}</span>
54
+                                                </div>
55
+                                            </ng-template>
56
+                                        </p-multiSelect>
57
+                                    </ng-template>
58
+                                </p-columnFilter>
59
+                            </div>
60
+                        </th>
61
+                        <th pSortableColumn="date">
62
+                            <div class="flex justify-content-between align-items-center">
63
+                                Date
64
+                                <p-sortIcon field="date"></p-sortIcon>
65
+                                <p-columnFilter type="date" field="date" display="menu" class="ml-auto"></p-columnFilter>
66
+                            </div>
67
+                        </th>
68
+                        <th pSortableColumn="balance">
69
+                            <div class="flex justify-content-between align-items-center">
70
+                                Balance
71
+                                <p-sortIcon field="balance"></p-sortIcon>
72
+                                <p-columnFilter type="numeric" field="balance" display="menu" currency="USD" class="ml-auto"></p-columnFilter>
73
+                            </div>
74
+                        </th>
75
+                        <th pSortableColumn="status">
76
+                            <div class="flex justify-content-between align-items-center">
77
+                                Status
78
+                                <p-sortIcon field="status"></p-sortIcon>
79
+                                <p-columnFilter field="status" matchMode="equals" display="menu">
80
+                                    <ng-template pTemplate="filter" let-value let-filter="filterCallback">
81
+                                        <p-dropdown [ngModel]="value" [options]="statuses" (onChange)="filter($event.value)" placeholder="Any">
82
+                                            <ng-template let-option pTemplate="item">
83
+                                                <span [class]="'customer-badge status-' + option.value">{{option.label}}</span>
84
+                                            </ng-template>
85
+                                        </p-dropdown>
86
+                                    </ng-template>
87
+                                </p-columnFilter>
88
+                            </div>
89
+                        </th>
90
+                        <th pSortableColumn="activity">
91
+                            <div class="flex justify-content-between align-items-center">
92
+                                Activity
93
+                                <p-sortIcon field="activity"></p-sortIcon>
94
+                                <p-columnFilter field="activity" matchMode="between" display="menu" [showMatchModes]="false" [showOperator]="false" [showAddButton]="false">
95
+                                    <ng-template pTemplate="filter" let-filter="filterCallback">
96
+                                        <p-slider [ngModel]="activityValues" [range]="true" (onSlideEnd)="filter($event.values)" styleClass="m-3"></p-slider>
97
+                                        <div class="flex align-items-center justify-content-between px-2">
98
+                                            <span>{{activityValues[0]}}</span>
99
+                                            <span>{{activityValues[1]}}</span>
100
+                                        </div>
101
+                                    </ng-template>
102
+                                </p-columnFilter>
103
+                            </div>
104
+                        </th>
105
+                        <th style="width: 8rem"></th>
106
+                    </tr>
107
+                </ng-template>
108
+                <ng-template pTemplate="body" let-customer>
109
+                    <tr class="p-selectable-row">
110
+                        <td>
111
+                            <p-tableCheckbox [value]="customer"></p-tableCheckbox>
112
+                        </td>
113
+                        <td>
114
+                            <span class="p-column-title">Name</span>
115
+                            {{customer.name}}
116
+                        </td>
117
+                        <td>
118
+                            <span class="p-column-title">Country</span>
119
+                            <img src="assets/demo/flags/flag_placeholder.png"
120
+                                 [class]="'flag flag-' + customer.country.code" width="30">
121
+                            <span class="image-text" style="margin-left: .5em;vertical-align: middle">{{customer.country.name}}</span>
122
+                        </td>
123
+                        <td>
124
+                            <span class="p-column-title">Representative</span>
125
+                            <img [alt]="customer.representative.name"
126
+                                 src="assets/demo/images/avatar/{{customer.representative.image}}" width="32"
127
+                                 style="vertical-align: middle"/>
128
+                            <span class="image-text" style="margin-left: .5em;vertical-align: middle">{{customer.representative.name}}</span>
129
+                        </td>
130
+                        <td>
131
+                            <span class="p-column-title">Date</span>
132
+                            {{customer.date | date: 'MM/dd/yyyy'}}
133
+                        </td>
134
+                        <td>
135
+                            <span class="p-column-title">Balance</span>
136
+                            {{customer.balance | currency:'USD':'symbol'}}
137
+                        </td>
138
+                        <td>
139
+                            <span class="p-column-title">Status</span>
140
+                            <span [class]="'customer-badge status-' + customer.status">{{customer.status}}</span>
141
+                        </td>
142
+                        <td>
143
+                            <span class="p-column-title">Activity</span>
144
+                            <p-progressBar [value]="customer.activity" [showValue]="false"></p-progressBar>
145
+                        </td>
146
+                        <td style="text-align: center">
147
+                            <button pButton type="button" class="p-button-secondary" icon="pi pi-cog"></button>
148
+                        </td>
149
+                    </tr>
150
+                </ng-template>
151
+                <ng-template pTemplate="emptymessage">
152
+                    <tr>
153
+                        <td colspan="8">No customers found.</td>
154
+                    </tr>
155
+                </ng-template>
156
+            </p-table>
157
+		</div>
158
+	</div>
159
+
160
+	<div class="col-12">
161
+		<div class="card">
162
+			<h5>Customized</h5>
163
+			<p>Scrollable table with gridlines (<mark>.p-datatable-gridlines</mark>), striped rows (<mark>.p-datatable-striped</mark>) and smaller paddings (<mark>p-datatable-sm</mark>).</p>
164
+
165
+			<p-table #dtc [value]="customers2" [(selection)]="selectedCustomer" dataKey="id" selectionMode="single"
166
+					 styleClass="p-datatable-customers p-datatable-gridlines p-datatable-striped p-datatable-sm"
167
+					 [scrollable]="true" scrollHeight="600px" [filterDelay]="0" [globalFilterFields]="['name','country.name','representative.name','status']">
168
+				<ng-template pTemplate="caption">
169
+					<div class="flex flex-column md:flex-row md:justify-content-between table-header">
170
+						Customers
171
+						<span class="p-input-icon-left p-float-label">
172
+                            <i class="pi pi-search"></i>
173
+                            <input pInputText type="text" (input)="dtc.filterGlobal($event.target.value, 'contains')" />
174
+                            <label class="global-filter-label">Global Search</label>
175
+                        </span>
176
+					</div>
177
+				</ng-template>
178
+				<ng-template pTemplate="header">
179
+					<tr>
180
+						<th pSortableColumn="name">Name
181
+							<p-sortIcon field="name"></p-sortIcon>
182
+						</th>
183
+						<th pSortableColumn="country.name">Country
184
+							<p-sortIcon field="country.name"></p-sortIcon>
185
+						</th>
186
+						<th pSortableColumn="representative.name">Representative
187
+							<p-sortIcon field="representative.name"></p-sortIcon>
188
+						</th>
189
+						<th pSortableColumn="date">Date
190
+							<p-sortIcon field="date"></p-sortIcon>
191
+						</th>
192
+						<th pSortableColumn="status">Status
193
+							<p-sortIcon field="status"></p-sortIcon>
194
+						</th>
195
+						<th pSortableColumn="activity">Activity
196
+							<p-sortIcon field="activity"></p-sortIcon>
197
+						</th>
198
+					</tr>
199
+				</ng-template>
200
+				<ng-template pTemplate="body" let-customer>
201
+					<tr [pSelectableRow]="customer">
202
+						<td>
203
+							<span class="p-column-title">Name</span>
204
+							{{customer.name}}
205
+						</td>
206
+						<td>
207
+							<span class="p-column-title">Country</span>
208
+							<img src="assets/demo/flags/flag_placeholder.png"
209
+								 [class]="'flag flag-' + customer.country.code" width="30">
210
+							<span class="image-text" style="margin-left: .5em;vertical-align: middle">{{customer.country.name}}</span>
211
+						</td>
212
+						<td>
213
+							<span class="p-column-title">Representative</span>
214
+							<img [alt]="customer.representative.name"
215
+								 src="assets/demo/images/avatar/{{customer.representative.image}}" width="32"
216
+								 style="vertical-align: middle"/>
217
+							<span class="image-text" style="margin-left: .5em;vertical-align: middle">{{customer.representative.name}}</span>
218
+						</td>
219
+						<td>
220
+							<span class="p-column-title">Date</span>
221
+							{{customer.date}}
222
+						</td>
223
+						<td>
224
+							<span class="p-column-title">Status</span>
225
+							<span [class]="'customer-badge status-' + customer.status">{{customer.status}}</span>
226
+						</td>
227
+						<td>
228
+							<span class="p-column-title">Activity</span>
229
+                            <p-progressBar [value]="customer.activity" class="w-full" [showValue]="false"></p-progressBar>
230
+						</td>
231
+					</tr>
232
+				</ng-template>
233
+				<ng-template pTemplate="emptymessage">
234
+					<tr>
235
+						<td colspan="8">No customers found.</td>
236
+					</tr>
237
+				</ng-template>
238
+			</p-table>
239
+		</div>
240
+	</div>
241
+
242
+	<div class="col-12">
243
+		<div class="card">
244
+			<h5>Row Expand</h5>
245
+			<p-table [value]="products" dataKey="name" styleClass="p-datatable-customers rowexpand-table">
246
+				<ng-template pTemplate="header">
247
+					<tr>
248
+						<th style="width: 3rem"></th>
249
+						<th pSortableColumn="name">Name <p-sortIcon field="name"></p-sortIcon></th>
250
+						<th>Image</th>
251
+						<th pSortableColumn="price">Price <p-sortIcon field="price"></p-sortIcon></th>
252
+						<th pSortableColumn="category">Category <p-sortIcon field="category"></p-sortIcon></th>
253
+						<th pSortableColumn="rating">Reviews <p-sortIcon field="rating"></p-sortIcon></th>
254
+						<th pSortableColumn="inventoryStatus">Status <p-sortIcon field="inventoryStatus"></p-sortIcon></th>
255
+					</tr>
256
+				</ng-template>
257
+				<ng-template pTemplate="body" let-product let-expanded="expanded">
258
+                    <tr>
259
+                        <td>
260
+                            <button pButton pRipple type="button" [pRowToggler]="product" class="p-button-text p-button-rounded p-button-plain" [icon]="expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'"></button>
261
+                        </td>
262
+                        <td><span class="p-column-title">Name</span>{{product.name}}</td>
263
+                        <td><span class="p-column-title">Image</span><img [src]="'assets/demo/images/product/' + product.image" [alt]="product.name" width="100" class="shadow-4" /></td>
264
+                        <td><span class="p-column-title">Price</span>{{product.price | currency:'USD'}}</td>
265
+                        <td><span class="p-column-title">Category</span>{{product.category}}</td>
266
+                        <td><span class="p-column-title">Reviews</span><p-rating [ngModel]="product.rating" [readonly]="true" [cancel]="false"></p-rating></td>
267
+                        <td><span class="p-column-title">Status</span><span [class]="'product-badge status-' + product.inventoryStatus.toLowerCase()">{{product.inventoryStatus}}</span></td>
268
+                    </tr>
269
+				</ng-template>
270
+				<ng-template pTemplate="rowexpansion" let-product>
271
+					<tr>
272
+						<td colspan="7">
273
+							<div class="p-3">
274
+								<p-table [value]="product.orders" dataKey="id">
275
+									<ng-template pTemplate="header">
276
+										<tr>
277
+											<th pSortableColumn="id">Id <p-sortIcon field="price"></p-sortIcon></th>
278
+											<th pSortableColumn="customer">Customer <p-sortIcon field="customer"></p-sortIcon></th>
279
+											<th pSortableColumn="date">Date <p-sortIcon field="date"></p-sortIcon></th>
280
+											<th pSortableColumn="amount">Amount <p-sortIcon field="amount"></p-sortIcon></th>
281
+											<th pSortableColumn="stats">Status <p-sortIcon field="status"></p-sortIcon></th>
282
+											<th style="width: 4rem"></th>
283
+										</tr>
284
+									</ng-template>
285
+									<ng-template pTemplate="body" let-order>
286
+                                        <tr>
287
+                                            <td><span class="p-column-title">Id</span>{{order.id}}</td>
288
+                                            <td><span class="p-column-title">Customer</span>{{order.customer}}</td>
289
+                                            <td><span class="p-column-title">Date</span>{{order.date}}</td>
290
+                                            <td><span class="p-column-title">Amount</span>{{order.amount | currency:'USD'}}</td>
291
+                                            <td><span class="p-column-title">Status</span><span [class]="'order-badge order-' + order.status.toLowerCase()">{{order.status}}</span></td>
292
+                                            <td><p-button type="button" icon="pi pi-search"></p-button></td>
293
+                                        </tr>
294
+									</ng-template>
295
+									<ng-template pTemplate="emptymessage">
296
+										<tr>
297
+											<td colspan="6">There are no order for this product yet.</td>
298
+										</tr>
299
+									</ng-template>
300
+								</p-table>
301
+							</div>
302
+						</td>
303
+					</tr>
304
+				</ng-template>
305
+			</p-table>
306
+		</div>
307
+	</div>
308
+
309
+	<div class="col-12">
310
+		<div class="card">
311
+			<h5>Row Group and Scrolling</h5>
312
+			<p-table [value]="customers3" sortField="representative.name" sortMode="single" (onSort)="onSort()" [scrollable]="true" scrollHeight="600px"
313
+                     styleClass="p-datatable-customers">
314
+				<ng-template pTemplate="header">
315
+					<tr>
316
+						<th>Name</th>
317
+						<th>Country</th>
318
+						<th>Company</th>
319
+						<th>Status</th>
320
+						<th>Date</th>
321
+					</tr>
322
+				</ng-template>
323
+				<ng-template pTemplate="body" let-customer let-rowIndex="rowIndex">
324
+					<tr *ngIf="rowGroupMetadata[customer.representative.name].index === rowIndex">
325
+						<td colspan="5">
326
+							<img [alt]="customer.representative.name" src="assets/demo/images/avatar/{{customer.representative.image}}" width="32" style="vertical-align: middle" />
327
+							<span class="font-bold ml-2">{{customer.representative.name}}</span>
328
+						</td>
329
+					</tr>
330
+                    <tr>
331
+                        <td><span class="p-column-title">Name</span>
332
+                            {{customer.name}}
333
+                        </td>
334
+                        <td><span class="p-column-title">Country</span>
335
+                            <img src="assets/demo/flags/flag_placeholder.png" [class]="'flag flag-' + customer.country.code" width="30">
336
+                            <span class="image-text" style="margin-left: .5em">{{customer.country.name}}</span>
337
+                        </td>
338
+                        <td><span class="p-column-title">Company</span>
339
+                            {{customer.company}}
340
+                        </td>
341
+                        <td><span class="p-column-title">Status</span>
342
+                            <span [class]="'customer-badge status-' + customer.status">{{customer.status}}</span>
343
+                        </td>
344
+                        <td><span class="p-column-title">Date</span>
345
+                            {{customer.date}}
346
+                        </td>
347
+                    </tr>
348
+				</ng-template>
349
+			</p-table>
350
+		</div>
351
+	</div>
352
+</div>

+ 114
- 0
Angular/src/app/demo/view/tabledemo.component.ts 查看文件

@@ -0,0 +1,114 @@
1
+import {Component, OnInit, ViewChild} from '@angular/core';
2
+import {Customer, Representative} from '../domain/customer';
3
+import {CustomerService} from '../service/customerservice';
4
+import {Product} from '../domain/product';
5
+import {ProductService} from '../service/productservice';
6
+import {Table} from 'primeng/table';
7
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
8
+
9
+@Component({
10
+    templateUrl: './tabledemo.component.html',
11
+    styleUrls: ['./tabledemo.scss'],
12
+    styles: [`
13
+        @media screen and (max-width: 960px) {
14
+            :host ::ng-deep .p-datatable.p-datatable-customers.rowexpand-table .p-datatable-tbody > tr > td:nth-child(6) {
15
+                display: flex;
16
+            }
17
+        }
18
+
19
+    `],
20
+})
21
+export class TableDemoComponent implements OnInit {
22
+
23
+    customers1: Customer[];
24
+
25
+    customers2: Customer[];
26
+
27
+    customers3: Customer[];
28
+
29
+    selectedCustomers1: Customer[];
30
+
31
+    selectedCustomer: Customer;
32
+
33
+    representatives: Representative[];
34
+
35
+    statuses: any[];
36
+
37
+    products: Product[];
38
+
39
+    rowGroupMetadata: any;
40
+
41
+    @ViewChild('dt') table: Table;
42
+
43
+    activityValues: number[] = [0, 100];
44
+
45
+    constructor(private customerService: CustomerService, private productService: ProductService,
46
+                private breadcrumbService: AppBreadcrumbService) {
47
+        this.breadcrumbService.setItems([
48
+            { label: 'UI Kit' },
49
+            { label: 'Table', routerLink: ['/uikit/table'] }
50
+        ]);
51
+    }
52
+
53
+    ngOnInit() {
54
+        this.customerService.getCustomersLarge().then(customers => {
55
+            this.customers1 = customers;
56
+            // @ts-ignore
57
+            this.customers1.forEach(customer => customer.date = new Date(customer.date));
58
+        });
59
+        this.customerService.getCustomersMedium().then(customers => this.customers2 = customers);
60
+        this.customerService.getCustomersMedium().then(customers => this.customers3 = customers);
61
+        this.productService.getProductsWithOrdersSmall().then(data => this.products = data);
62
+
63
+        this.representatives = [
64
+            {name: 'Amy Elsner', image: 'amyelsner.png'},
65
+            {name: 'Anna Fali', image: 'annafali.png'},
66
+            {name: 'Asiya Javayant', image: 'asiyajavayant.png'},
67
+            {name: 'Bernardo Dominic', image: 'bernardodominic.png'},
68
+            {name: 'Elwin Sharvill', image: 'elwinsharvill.png'},
69
+            {name: 'Ioni Bowcher', image: 'ionibowcher.png'},
70
+            {name: 'Ivan Magalhaes', image: 'ivanmagalhaes.png'},
71
+            {name: 'Onyama Limba', image: 'onyamalimba.png'},
72
+            {name: 'Stephen Shaw', image: 'stephenshaw.png'},
73
+            {name: 'XuXue Feng', image: 'xuxuefeng.png'}
74
+        ];
75
+
76
+        this.statuses = [
77
+            {label: 'Unqualified', value: 'unqualified'},
78
+            {label: 'Qualified', value: 'qualified'},
79
+            {label: 'New', value: 'new'},
80
+            {label: 'Negotiation', value: 'negotiation'},
81
+            {label: 'Renewal', value: 'renewal'},
82
+            {label: 'Proposal', value: 'proposal'}
83
+        ];
84
+    }
85
+
86
+    onSort() {
87
+        this.updateRowGroupMetaData();
88
+    }
89
+
90
+    updateRowGroupMetaData() {
91
+        this.rowGroupMetadata = {};
92
+
93
+        if (this.customers3) {
94
+            for (let i = 0; i < this.customers3.length; i++) {
95
+                const rowData = this.customers3[i];
96
+                const representativeName = rowData.representative.name;
97
+
98
+                if (i === 0) {
99
+                    this.rowGroupMetadata[representativeName] = { index: 0, size: 1 };
100
+                }
101
+                else {
102
+                    const previousRowData = this.customers3[i - 1];
103
+                    const previousRowGroup = previousRowData.representative.name;
104
+                    if (representativeName === previousRowGroup) {
105
+                        this.rowGroupMetadata[representativeName].size++;
106
+                    }
107
+                    else {
108
+                        this.rowGroupMetadata[representativeName] = { index: i, size: 1 };
109
+                    }
110
+                }
111
+            }
112
+        }
113
+    }
114
+}

+ 201
- 0
Angular/src/app/demo/view/tabledemo.scss 查看文件

@@ -0,0 +1,201 @@
1
+:host ::ng-deep {
2
+    .p-paginator {
3
+        .p-paginator-current {
4
+            margin-left: auto;
5
+        }
6
+    }
7
+
8
+    .p-progressbar {
9
+        height: .5rem;
10
+        background-color: #D8DADC;
11
+
12
+        .p-progressbar-value {
13
+            background-color: #607D8B;
14
+        }
15
+    }
16
+
17
+    .table-header {
18
+        display: flex;
19
+        justify-content: space-between;
20
+    }
21
+
22
+    .p-calendar .p-datepicker {
23
+        min-width: 25rem;
24
+
25
+        td {
26
+            font-weight: 400;
27
+        }
28
+    }
29
+
30
+    .p-datatable.p-datatable-customers {
31
+        .p-datatable-header {
32
+            padding: 1rem;
33
+            text-align: left;
34
+            font-size: 1.5rem;
35
+        }
36
+
37
+        .p-paginator {
38
+            padding: 1rem;
39
+        }
40
+
41
+        .p-datatable-thead > tr > th {
42
+            text-align: left;
43
+        }
44
+
45
+        .p-dropdown-label:not(.p-placeholder) {
46
+            text-transform: uppercase;
47
+        }
48
+    }
49
+
50
+    .p-datatable.p-datatable-customers:not(.p-datatable-gridlines) {
51
+        .p-datatable-tbody > tr > td {
52
+            cursor: auto;
53
+        }
54
+    }
55
+
56
+    /* Responsive */
57
+    .p-datatable-customers .p-datatable-tbody > tr > td .p-column-title {
58
+        display: none;
59
+    }
60
+}
61
+
62
+.customer-badge {
63
+    border-radius: 2px;
64
+    padding: .25em .5rem;
65
+    text-transform: uppercase;
66
+    font-weight: 700;
67
+    font-size: 12px;
68
+    letter-spacing: .3px;
69
+
70
+    &.status-qualified {
71
+        background: #C8E6C9;
72
+        color: #256029;
73
+    }
74
+
75
+    &.status-unqualified {
76
+        background: #FFCDD2;
77
+        color: #C63737;
78
+    }
79
+
80
+    &.status-negotiation {
81
+        background: #FEEDAF;
82
+        color: #8A5340;
83
+    }
84
+
85
+    &.status-new {
86
+        background: #B3E5FC;
87
+        color: #23547B;
88
+    }
89
+
90
+    &.status-renewal {
91
+        background: #ECCFFF;
92
+        color: #694382;
93
+    }
94
+
95
+    &.status-proposal {
96
+        background: #FFD8B2;
97
+        color: #805B36;
98
+    }
99
+}
100
+
101
+.product-badge {
102
+    border-radius: 2px;
103
+    padding: .25em .5rem;
104
+    text-transform: uppercase;
105
+    font-weight: 700;
106
+    font-size: 12px;
107
+    letter-spacing: .3px;
108
+
109
+    &.status-instock {
110
+        background: #C8E6C9;
111
+        color: #256029;
112
+    }
113
+
114
+    &.status-outofstock {
115
+        background: #FFCDD2;
116
+        color: #C63737;
117
+    }
118
+
119
+    &.status-lowstock {
120
+        background: #FEEDAF;
121
+        color: #8A5340;
122
+    }
123
+}
124
+
125
+.order-badge {
126
+    border-radius: 2px;
127
+    padding: .25em .5rem;
128
+    text-transform: uppercase;
129
+    font-weight: 700;
130
+    font-size: 12px;
131
+    letter-spacing: .3px;
132
+
133
+    &.order-delivered {
134
+        background: #C8E6C9;
135
+        color: #256029;
136
+    }
137
+
138
+    &.order-cancelled {
139
+        background: #FFCDD2;
140
+        color: #C63737;
141
+    }
142
+
143
+    &.order-pending {
144
+        background: #FEEDAF;
145
+        color: #8A5340;
146
+    }
147
+
148
+    &.order-returned {
149
+        background: #ECCFFF;
150
+        color: #694382;
151
+    }
152
+}
153
+
154
+.global-filter-label {
155
+    font-size: 1rem;
156
+    font-weight: normal;
157
+
158
+    .p-float-label input:focus ~ label {
159
+        font-size: 12px;
160
+    }
161
+}
162
+
163
+@media screen and (max-width: 960px) {
164
+    :host ::ng-deep {
165
+        .p-datatable {
166
+            &.p-datatable-customers {
167
+                .p-datatable-thead > tr > th,
168
+                .p-datatable-tfoot > tr > td {
169
+                    display: none !important;
170
+                }
171
+
172
+                .p-datatable-tbody > tr {
173
+                    border-bottom: 1px solid var(--surface-d);
174
+
175
+                    > td {
176
+                        text-align: left;
177
+                        display: block;
178
+                        border: 0 none !important;
179
+                        width: 100% !important;
180
+                        float: left;
181
+                        clear: left;
182
+                        border: 0 none;
183
+
184
+                        .p-column-title {
185
+                            padding: .4rem;
186
+                            min-width: 30%;
187
+                            display: inline-block;
188
+                            margin: -.4rem 1rem -.4rem -.4rem;
189
+                            font-weight: bold;
190
+                        }
191
+
192
+                        .p-progressbar {
193
+                            margin-top: .5rem;
194
+                        }
195
+                    }
196
+                }
197
+            }
198
+        }
199
+    }
200
+
201
+}

+ 37
- 0
Angular/src/app/demo/view/treedemo.component.html 查看文件

@@ -0,0 +1,37 @@
1
+<div class="grid">
2
+	<div class="col-12">
3
+		<div class="card">
4
+			<h5>Tree</h5>
5
+			<p-tree [value]="files1" selectionMode="checkbox" [(selection)]="selectedFiles1"></p-tree>
6
+		</div>
7
+	</div>
8
+	<div class="col-12">
9
+		<div class="card">
10
+			<h5>TreeTable</h5>
11
+			<p-treeTable [value]="files2" [columns]="cols" selectionMode="checkbox" [(selection)]="selectedFiles2">
12
+				<ng-template pTemplate="header" let-columns>
13
+					<tr>
14
+						<th *ngFor="let col of columns">
15
+							{{col.header}}
16
+						</th>
17
+					</tr>
18
+				</ng-template>
19
+				<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
20
+					<tr>
21
+						<td *ngFor="let col of columns; let i = index">
22
+							<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
23
+							<p-treeTableCheckbox [value]="rowNode" *ngIf="i == 0"></p-treeTableCheckbox>
24
+							{{rowData[col.field]}}
25
+						</td>
26
+					</tr>
27
+				</ng-template>
28
+			</p-treeTable>
29
+		</div>
30
+	</div>
31
+	<div class="col-12">
32
+		<div class="card">
33
+			<h5>Horizontal Tree</h5>
34
+			<p-tree [value]="files3" layout="horizontal" selectionMode="single" [(selection)]="selectedFiles3"></p-tree>
35
+		</div>
36
+	</div>
37
+</div>

+ 49
- 0
Angular/src/app/demo/view/treedemo.component.ts 查看文件

@@ -0,0 +1,49 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {NodeService} from '../service/nodeservice';
3
+import {TreeNode} from 'primeng/api';
4
+import {AppBreadcrumbService} from '../../app.breadcrumb.service';
5
+
6
+@Component({
7
+    templateUrl: './treedemo.component.html'
8
+})
9
+export class TreeDemoComponent implements OnInit {
10
+
11
+
12
+    files1: TreeNode[];
13
+
14
+    files2: TreeNode[];
15
+
16
+    files3: TreeNode[];
17
+
18
+    selectedFiles1: TreeNode;
19
+
20
+    selectedFiles2: TreeNode[];
21
+
22
+    selectedFiles3: TreeNode;
23
+
24
+    cols: any[];
25
+
26
+    constructor(private nodeService: NodeService, private breadcrumbService: AppBreadcrumbService) {
27
+        this.breadcrumbService.setItems([
28
+            { label: 'UI Kit' },
29
+            { label: 'Tree', routerLink: ['/uikit/tree'] }
30
+        ]);
31
+    }
32
+
33
+    ngOnInit() {
34
+        this.nodeService.getFiles().then(files => this.files1 = files);
35
+        this.nodeService.getFilesystem().then(files => this.files2 = files);
36
+        this.nodeService.getFiles().then(files => {
37
+            this.files3 = [{
38
+                label: 'Root',
39
+                children: files
40
+            }];
41
+        });
42
+
43
+        this.cols = [
44
+            { field: 'name', header: 'Name' },
45
+            { field: 'size', header: 'Size' },
46
+            { field: 'type', header: 'Type' }
47
+        ];
48
+    }
49
+}

+ 26
- 0
Angular/src/app/pages/app.accessdenied.component.html 查看文件

@@ -0,0 +1,26 @@
1
+<div class="pages-body accessdenied-page flex flex-column">
2
+    <div class="topbar p-3 flex justify-content-between flex-row align-items-center">
3
+        <div class="topbar-left ml-3 flex" routerLink="/">
4
+            <div class="logo">
5
+                <img src="assets/layout/images/logo2x.png" alt=""/>
6
+            </div>
7
+        </div>
8
+        <div class="topbar-right mr-3 flex">
9
+            <button pButton pRipple type="button" label="DASHBOARD" [routerLink]="['/']"
10
+                    class="p-button-text p-button-plain topbar-button"></button>
11
+        </div>
12
+    </div>
13
+
14
+    <div class="align-self-center mt-auto mb-auto">
15
+        <div class="pages-panel card flex flex-column">
16
+            <div class="pages-header px-3 py-1">
17
+                <h2>ACCESS DENIED</h2>
18
+            </div>
19
+            <div class="card mt-3 px-6">
20
+                <img src="assets/layout/images/pages/error.png" alt=""/>
21
+            </div>
22
+            <div class="pages-detail pb-6">Requested resource is not available.</div>
23
+            <button pButton pRipple type="button" label="GO BACK TO DASHBOARD" [routerLink]="['/']" class="p-button-text"></button>
24
+        </div>
25
+    </div>
26
+</div>

+ 9
- 0
Angular/src/app/pages/app.accessdenied.component.ts 查看文件

@@ -0,0 +1,9 @@
1
+import { Component } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-accessdenied',
5
+  templateUrl: './app.accessdenied.component.html',
6
+})
7
+export class AppAccessdeniedComponent {
8
+
9
+}

+ 36
- 0
Angular/src/app/pages/app.calendar.component.html 查看文件

@@ -0,0 +1,36 @@
1
+<div class="grid">
2
+    <div class="col-12">
3
+        <div class="card">
4
+            <h5>Calendar</h5>
5
+            <full-calendar [options]="options"></full-calendar>
6
+
7
+            <p-dialog [(visible)]="eventDialog" [style]="{width: '450px'}" header="Event Details" [modal]="true" [closable]="true">
8
+                <ng-template pTemplate="content">
9
+                    <div class="p-fluid">
10
+                        <div class="field">
11
+                            <label for="title">Title</label>
12
+                            <input id="title" type="text" pInputText *ngIf="clickedEvent" [(ngModel)]="changedEvent.title" [required]="true">
13
+                        </div>
14
+                        <div class="field">
15
+                            <label for="start">From</label>
16
+                            <p-calendar id="start" *ngIf="clickedEvent" [(ngModel)]="changedEvent.start" [showTime]="true" appendTo="body"></p-calendar>
17
+                        </div>
18
+                        <div class="field">
19
+                            <label for="end">To</label>
20
+                            <p-calendar id="end" *ngIf="clickedEvent" [(ngModel)]="changedEvent.end" [showTime]="true" appendTo="body"></p-calendar>
21
+                        </div>
22
+                        <div class="field-checkbox">
23
+                            <p-checkbox id="allday" *ngIf="clickedEvent" [(ngModel)]="changedEvent.allday"></p-checkbox>
24
+                            <label for="allday">All Day</label>
25
+                        </div>
26
+                    </div>
27
+                </ng-template>
28
+
29
+                <ng-template pTemplate="footer">
30
+                    <button pButton label="Save" icon="pi pi-check" class="p-button-text" (click)="save()"></button>
31
+                    <button pButton label="Reset" icon="pi pi-refresh" class="p-button-text" (click)="reset()"></button>
32
+                </ng-template>
33
+            </p-dialog>
34
+        </div>
35
+    </div>
36
+</div>

+ 79
- 0
Angular/src/app/pages/app.calendar.component.ts 查看文件

@@ -0,0 +1,79 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {EventService} from '../demo/service/eventservice';
3
+
4
+@Component({
5
+    templateUrl: './app.calendar.component.html',
6
+    styles: [`
7
+        @media screen and (max-width: 960px) {
8
+            :host ::ng-deep .fc-header-toolbar {
9
+                display: flex;
10
+                flex-wrap: wrap;
11
+            }
12
+        }
13
+    `]
14
+})
15
+export class AppCalendarComponent implements OnInit {
16
+
17
+    events: any[];
18
+
19
+    options: any;
20
+
21
+    header: any;
22
+
23
+    eventDialog: boolean;
24
+
25
+    changedEvent: any;
26
+
27
+    clickedEvent = null;
28
+
29
+    constructor(private eventService: EventService) {
30
+    }
31
+
32
+    ngOnInit() {
33
+        this.eventService.getEvents().then(events => {
34
+            this.events = events;
35
+            this.options = {...this.options, ...{events: events}};
36
+        });
37
+
38
+        this.options = {
39
+            initialDate: '2021-02-01',
40
+            headerToolbar: {
41
+                left: 'prev,next today',
42
+                center: 'title',
43
+                right: 'dayGridMonth,timeGridWeek,timeGridDay'
44
+            },
45
+            editable: true,
46
+            selectable: true,
47
+            selectMirror: true,
48
+            dayMaxEvents: true,
49
+            eventClick: (e) => {
50
+                this.eventDialog = true;
51
+
52
+                this.clickedEvent = e.event;
53
+
54
+                this.changedEvent.title = this.clickedEvent.title;
55
+                this.changedEvent.start = this.clickedEvent.start;
56
+                this.changedEvent.end = this.clickedEvent.end;
57
+            }
58
+        };
59
+
60
+        this.changedEvent = {title: '', start: null, end: '', allDay: null};
61
+    }
62
+
63
+    save() {
64
+        this.eventDialog = false;
65
+
66
+        this.clickedEvent.setProp('title', this.changedEvent.title);
67
+        this.clickedEvent.setStart(this.changedEvent.start);
68
+        this.clickedEvent.setEnd(this.changedEvent.end);
69
+        this.clickedEvent.setAllDay(this.changedEvent.allDay);
70
+
71
+        this.changedEvent = {title: '', start: null, end: '', allDay: null};
72
+    }
73
+
74
+    reset() {
75
+        this.changedEvent.title = this.clickedEvent.title;
76
+        this.changedEvent.start = this.clickedEvent.start;
77
+        this.changedEvent.end = this.clickedEvent.end;
78
+    }
79
+}

+ 47
- 0
Angular/src/app/pages/app.contactus.component.html 查看文件

@@ -0,0 +1,47 @@
1
+<div class="pages-body contact-page flex flex-column">
2
+    <div class="topbar p-3 flex justify-content-between flex-row align-items-center">
3
+        <div class="topbar-left ml-3 flex" routerLink="/">
4
+            <div class="logo">
5
+                <img src="assets/layout/images/logo2x.png" alt=""/>
6
+            </div>
7
+        </div>
8
+        <div class="topbar-right mr-3 flex">
9
+            <button pButton pRipple type="button" label="DASHBOARD" [routerLink]="['/']"
10
+                    class="p-button-text p-button-plain topbar-button"></button>
11
+        </div>
12
+    </div>
13
+
14
+    <div class="map">
15
+        <iframe
16
+            src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d9746.74079475134!2d4.8686484347131325!3d52.35799458335991!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47c609e2c5b47ccf%3A0x6cd478550520ca35!2sVondelpark!5e0!3m2!1str!2str!4v1606820468794!5m2!1str!2str"
17
+            aria-hidden="false" tabindex="0" allowtransparency="true"></iframe>
18
+        <span></span>
19
+    </div>
20
+
21
+    <div class="pages-panel">
22
+        <div class="card grid">
23
+            <div class="left-panel lg:col-6 md:col-6 sm:col-12">
24
+                <h4 class="mb-3">Contact Us</h4>
25
+                <p class="mb-6">Subheader of contact us will come here...</p>
26
+                <input type="text" class="contact-input mb-3" pInputText placeholder="Your Name">
27
+                <input type="text" class="contact-input mb-3" pInputText placeholder="Your E-mail">
28
+                <textarea class="contact-input contact-message mb-6" rows="8" pInputTextarea
29
+                          placeholder="Your Message"></textarea>
30
+                <p-button class="mb-3" label="SEND MESSAGE"></p-button>
31
+            </div>
32
+            <div class="right-panel lg:col-6 md:col-6 sm:col-12 mx-auto">
33
+                <div class="grid">
34
+                    <div class="md:col-offset-3 md:col-6 md:col-offset-3 sm:col-offset-2 sm:col-8 sm:col-offset-2">
35
+                        <i class="pi pi-home mb-2 mt-5"></i>
36
+                        <p class="title my-3">Headquarters</p>
37
+                        <p>Van Beekweg 79-93 7825VC Eexterzandvoort</p>
38
+
39
+                        <i class="pi pi-briefcase mb-2 mt-5"></i>
40
+                        <p class="title my-3">Sales Office</p>
41
+                        <p>De Roodreef 89k 8502CA Oosternijkerk</p>
42
+                    </div>
43
+                </div>
44
+            </div>
45
+        </div>
46
+    </div>
47
+</div>

+ 9
- 0
Angular/src/app/pages/app.contactus.component.ts 查看文件

@@ -0,0 +1,9 @@
1
+import {Component} from '@angular/core';
2
+
3
+@Component({
4
+    selector: 'app-contactus',
5
+    templateUrl: './app.contactus.component.html',
6
+})
7
+export class AppContactusComponent{
8
+
9
+}

+ 138
- 0
Angular/src/app/pages/app.crud.component.html 查看文件

@@ -0,0 +1,138 @@
1
+<div class="grid">
2
+    <div class="col-12">
3
+
4
+        <p-toast></p-toast>
5
+
6
+        <div class="card">
7
+            <p-toolbar styleClass="mb-4">
8
+                <ng-template pTemplate="left">
9
+                    <button pButton pRipple label="New" icon="pi pi-plus" class="p-button-success mr-2 mb-2" (click)="openNew()"></button>
10
+                    <button pButton pRipple label="Delete" icon="pi pi-trash" class="p-button-danger mb-2" (click)="deleteSelectedProducts()" [disabled]="!selectedProducts || !selectedProducts.length"></button>
11
+                </ng-template>
12
+
13
+                <ng-template pTemplate="right">
14
+                    <p-fileUpload mode="basic" accept="image/*" [maxFileSize]="1000000" label="Import" chooseLabel="Import" class="mr-2 mb-2 inline-block"></p-fileUpload>
15
+                    <button pButton pRipple label="Export" icon="pi pi-upload" class="p-button-help mb-2" (click)="dt.exportCSV()"></button>
16
+                </ng-template>
17
+            </p-toolbar>
18
+
19
+            <p-table #dt [value]="products" [columns]="cols" [rows]="10" [paginator]="true" [globalFilterFields]="['name','country.name','representative.name','status']"
20
+                     [(selection)]="selectedProducts" [rowHover]="true" dataKey="id"
21
+                     styleClass="p-datatable-customers"
22
+                     currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries" [showCurrentPageReport]="true">
23
+                <ng-template pTemplate="caption">
24
+                    <div class="flex flex-column md:flex-row md:justify-content-between table-header">
25
+                        <h5 class="m-0">Manage Products</h5>
26
+                        <span class="p-input-icon-left">
27
+                        <i class="pi pi-search"></i>
28
+                        <input pInputText type="text" (input)="dt.filterGlobal($event.target.value, 'contains')" placeholder="Search..." />
29
+                    </span>
30
+                    </div>
31
+                </ng-template>
32
+                <ng-template pTemplate="header">
33
+                    <tr>
34
+                        <th style="width: 3rem">
35
+                            <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
36
+                        </th>
37
+                        <th pSortableColumn="name">Name <p-sortIcon field="name"></p-sortIcon></th>
38
+                        <th>Image</th>
39
+                        <th pSortableColumn="price">Price <p-sortIcon field="price"></p-sortIcon></th>
40
+                        <th pSortableColumn="category">Category <p-sortIcon field="category"></p-sortIcon></th>
41
+                        <th pSortableColumn="rating">Reviews <p-sortIcon field="rating"></p-sortIcon></th>
42
+                        <th pSortableColumn="inventoryStatus">Status <p-sortIcon field="inventoryStatus"></p-sortIcon></th>
43
+                        <th></th>
44
+                    </tr>
45
+                </ng-template>
46
+                <ng-template pTemplate="body" let-product>
47
+                    <tr>
48
+                        <td>
49
+                            <p-tableCheckbox [value]="product"></p-tableCheckbox>
50
+                        </td>
51
+                        <td><span class="p-column-title">Name</span>
52
+                            {{product.name}}
53
+                        </td>
54
+                        <td><span class="p-column-title">Image</span>
55
+                            <img [src]="'assets/demo/images/product/' + product.image" [alt]="product.name" width="100" class="shadow-4" />
56
+                        </td>
57
+                        <td><span class="p-column-title">Price</span>
58
+                            {{product.price | currency:'USD'}}
59
+                        </td>
60
+                        <td><span class="p-column-title">Category</span>
61
+                            {{product.category}}
62
+                        </td>
63
+                        <td><span class="p-column-title">Reviews</span>
64
+                            <p-rating [ngModel]="product.rating" [readonly]="true" [cancel]="false"></p-rating>
65
+                        </td>
66
+                        <td><span class="p-column-title">Status</span>
67
+                            <span [class]="'product-badge status-' + (product.inventoryStatus ? product.inventoryStatus.toLowerCase() : '')">{{product.inventoryStatus}}</span>
68
+                        </td>
69
+                        <td>
70
+                            <button pButton pRipple icon="pi pi-pencil" class="p-button-rounded p-button-success mr-2" (click)="editProduct(product)"></button>
71
+                            <button pButton pRipple icon="pi pi-trash" class="p-button-rounded p-button-warning" (click)="deleteProduct(product)"></button>
72
+                        </td>
73
+                    </tr>
74
+                </ng-template>
75
+                <ng-template pTemplate="summary">
76
+                    <div class="flex align-items-center justify-content-between">
77
+                        In total there are {{products ? products.length : 0 }} products.
78
+                    </div>
79
+                </ng-template>
80
+            </p-table>
81
+        </div>
82
+
83
+        <p-dialog [(visible)]="productDialog" [style]="{width: '450px'}" header="Product Details" [modal]="true" styleClass="p-fluid">
84
+            <ng-template pTemplate="content">
85
+                <img [src]="'assets/demo/images/product/' + product.image" [alt]="product.image" class="product-image" *ngIf="product.image">
86
+                <div class="field">
87
+                    <label for="name">Name</label>
88
+                    <input type="text" pInputText id="name" [(ngModel)]="product.name" required autofocus />
89
+                    <small class="p-invalid" *ngIf="submitted && !product.name">Name is required.</small>
90
+                </div>
91
+                <div class="field">
92
+                    <label for="description">Description</label>
93
+                    <textarea id="description" pInputTextarea [(ngModel)]="product.description" required rows="3" cols="20"></textarea>
94
+                </div>
95
+
96
+                <div class="field">
97
+                    <label class="mb-3">Category</label>
98
+                    <div class="formgrid grid">
99
+                        <div class="field-radiobutton col-6">
100
+                            <p-radioButton id="category1" name="category" value="Accessories" [(ngModel)]="product.category"></p-radioButton>
101
+                            <label for="category1">Accessories</label>
102
+                        </div>
103
+                        <div class="field-radiobutton col-6">
104
+                            <p-radioButton id="category2" name="category" value="Clothing" [(ngModel)]="product.category"></p-radioButton>
105
+                            <label for="category2">Clothing</label>
106
+                        </div>
107
+                        <div class="field-radiobutton col-6">
108
+                            <p-radioButton id="category3" name="category" value="Electronics" [(ngModel)]="product.category"></p-radioButton>
109
+                            <label for="category3">Electronics</label>
110
+                        </div>
111
+                        <div class="field-radiobutton col-6">
112
+                            <p-radioButton id="category4" name="category" value="Fitness" [(ngModel)]="product.category"></p-radioButton>
113
+                            <label for="category4">Fitness</label>
114
+                        </div>
115
+                    </div>
116
+                </div>
117
+
118
+                <div class="formgrid grid">
119
+                    <div class="field col">
120
+                        <label for="price">Price</label>
121
+                        <p-inputNumber id="price" [(ngModel)]="product.price" mode="currency" currency="USD" locale="en-US"></p-inputNumber>
122
+                    </div>
123
+                    <div class="field col">
124
+                        <label for="quantity">Quantity</label>
125
+                        <p-inputNumber id="quantity" [(ngModel)]="product.quantity"></p-inputNumber>
126
+                    </div>
127
+                </div>
128
+            </ng-template>
129
+
130
+            <ng-template pTemplate="footer">
131
+                <button pButton pRipple label="Cancel" icon="pi pi-times" class="p-button-text" (click)="hideDialog()"></button>
132
+                <button pButton pRipple label="Save" icon="pi pi-check" class="p-button-text" (click)="saveProduct()"></button>
133
+            </ng-template>
134
+        </p-dialog>
135
+
136
+        <p-confirmDialog [style]="{width: '450px'}"></p-confirmDialog>
137
+    </div>
138
+</div>

+ 148
- 0
Angular/src/app/pages/app.crud.component.ts 查看文件

@@ -0,0 +1,148 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import { Product } from '../demo/domain/product';
3
+import { ProductService } from '../demo/service/productservice';
4
+import { ConfirmationService } from 'primeng/api';
5
+import { MessageService } from 'primeng/api';
6
+import {AppBreadcrumbService} from '../app.breadcrumb.service';
7
+
8
+@Component({
9
+    templateUrl: './app.crud.component.html',
10
+    styleUrls: ['../demo/view/tabledemo.scss'],
11
+    styles: [`
12
+        :host ::ng-deep .p-dialog .product-image {
13
+            width: 150px;
14
+            margin: 0 auto 2rem auto;
15
+            display: block;
16
+        }
17
+
18
+        @media screen and (max-width: 960px) {
19
+            :host ::ng-deep .p-datatable.p-datatable-customers .p-datatable-tbody > tr > td:last-child {
20
+                text-align: center;
21
+            }
22
+
23
+            :host ::ng-deep .p-datatable.p-datatable-customers .p-datatable-tbody > tr > td:nth-child(6) {
24
+                display: flex;
25
+            }
26
+        }
27
+
28
+    `],
29
+    providers: [MessageService, ConfirmationService]
30
+})
31
+export class AppCrudComponent implements OnInit {
32
+
33
+    productDialog: boolean;
34
+
35
+    products: Product[];
36
+
37
+    product: Product;
38
+
39
+    selectedProducts: Product[];
40
+
41
+    submitted: boolean;
42
+
43
+    cols: any[];
44
+
45
+    constructor(private productService: ProductService, private messageService: MessageService,
46
+                private confirmationService: ConfirmationService, private breadcrumbService: AppBreadcrumbService) {
47
+        this.breadcrumbService.setItems([
48
+            { label: 'Pages' },
49
+            { label: 'Crud', routerLink: ['/pages/crud'] }
50
+        ]);
51
+    }
52
+
53
+    ngOnInit() {
54
+        this.productService.getProducts().then(data => this.products = data);
55
+
56
+        this.cols = [
57
+            { field: 'name', header: 'Name' },
58
+            { field: 'price', header: 'Price' },
59
+            { field: 'category', header: 'Category' },
60
+            { field: 'rating', header: 'Reviews' },
61
+            { field: 'inventoryStatus', header: 'Status' }
62
+        ];
63
+    }
64
+
65
+    openNew() {
66
+        this.product = {};
67
+        this.submitted = false;
68
+        this.productDialog = true;
69
+    }
70
+
71
+    deleteSelectedProducts() {
72
+        this.confirmationService.confirm({
73
+            message: 'Are you sure you want to delete the selected products?',
74
+            header: 'Confirm',
75
+            icon: 'pi pi-exclamation-triangle',
76
+            accept: () => {
77
+                this.products = this.products.filter(val => !this.selectedProducts.includes(val));
78
+                this.selectedProducts = null;
79
+                this.messageService.add({severity: 'success', summary: 'Successful', detail: 'Products Deleted', life: 3000});
80
+            }
81
+        });
82
+    }
83
+
84
+    editProduct(product: Product) {
85
+        this.product = {...product};
86
+        this.productDialog = true;
87
+    }
88
+
89
+    deleteProduct(product: Product) {
90
+        this.confirmationService.confirm({
91
+            message: 'Are you sure you want to delete ' + product.name + '?',
92
+            header: 'Confirm',
93
+            icon: 'pi pi-exclamation-triangle',
94
+            accept: () => {
95
+                this.products = this.products.filter(val => val.id !== product.id);
96
+                this.product = {};
97
+                this.messageService.add({severity: 'success', summary: 'Successful', detail: 'Product Deleted', life: 3000});
98
+            }
99
+        });
100
+    }
101
+
102
+    hideDialog() {
103
+        this.productDialog = false;
104
+        this.submitted = false;
105
+    }
106
+
107
+    saveProduct() {
108
+        this.submitted = true;
109
+
110
+        if (this.product.name.trim()) {
111
+            if (this.product.id) {
112
+                this.products[this.findIndexById(this.product.id)] = this.product;
113
+                this.messageService.add({severity: 'success', summary: 'Successful', detail: 'Product Updated', life: 3000});
114
+            }
115
+            else {
116
+                this.product.id = this.createId();
117
+                this.product.image = 'product-placeholder.svg';
118
+                this.products.push(this.product);
119
+                this.messageService.add({severity: 'success', summary: 'Successful', detail: 'Product Created', life: 3000});
120
+            }
121
+
122
+            this.products = [...this.products];
123
+            this.productDialog = false;
124
+            this.product = {};
125
+        }
126
+    }
127
+
128
+    findIndexById(id: string): number {
129
+        let index = -1;
130
+        for (let i = 0; i < this.products.length; i++) {
131
+            if (this.products[i].id === id) {
132
+                index = i;
133
+                break;
134
+            }
135
+        }
136
+
137
+        return index;
138
+    }
139
+
140
+    createId(): string {
141
+        let id = '';
142
+        const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
143
+        for ( let i = 0; i < 5; i++ ) {
144
+            id += chars.charAt(Math.floor(Math.random() * chars.length));
145
+        }
146
+        return id;
147
+    }
148
+}

+ 26
- 0
Angular/src/app/pages/app.error.component.html 查看文件

@@ -0,0 +1,26 @@
1
+<div class="pages-body error-page flex flex-column">
2
+    <div class="topbar p-3 flex justify-content-between flex-row align-items-center">
3
+        <div class="topbar-left ml-3 flex" routerLink="/">
4
+            <div class="logo">
5
+                <img src="assets/layout/images/logo2x.png" alt=""/>
6
+            </div>
7
+        </div>
8
+        <div class="topbar-right mr-3 flex">
9
+            <button pButton pRipple type="button" label="DASHBOARD" [routerLink]="['/']"
10
+                    class="p-button-text p-button-plain topbar-button"></button>
11
+        </div>
12
+    </div>
13
+
14
+    <div class="align-self-center mt-auto mb-auto">
15
+        <div class="pages-panel card flex flex-column">
16
+            <div class="pages-header px-3 py-1">
17
+                <h2>ERROR</h2>
18
+            </div>
19
+            <div class="card mt-3 px-6">
20
+                <img src="assets/layout/images/pages/error.png" alt=""/>
21
+            </div>
22
+            <div class="pages-detail pb-6">Requested resource is not available.</div>
23
+            <button pButton pRipple type="button" label="GO BACK TO DASHBOARD" [routerLink]="['/']" class="p-button-text"></button>
24
+        </div>
25
+    </div>
26
+</div>

+ 9
- 0
Angular/src/app/pages/app.error.component.ts 查看文件

@@ -0,0 +1,9 @@
1
+import { Component } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-error',
5
+  templateUrl: './app.error.component.html',
6
+})
7
+export class AppErrorComponent {
8
+
9
+}

+ 107
- 0
Angular/src/app/pages/app.help.component.html 查看文件

@@ -0,0 +1,107 @@
1
+<div class="grid layout-help-page">
2
+    <div class="col-12">
3
+        <div class="card p-0">
4
+            <div class="grid grid-nogutter">
5
+                <div class="col-12 layout-help-page-header">
6
+                    <img src="assets/layout/images/extensions/help-header@2x.jpg" alt="help-header" style="width: 100%" />
7
+                    <h1 class="layout-help-page-header-text">Frequently Asked Questions</h1>
8
+                    <div class="layout-help-page-search p-input-icon-left p-fluid shadow-2">
9
+                        <i class="pi pi-search"></i>
10
+                        <input type="text" pInputText placeholder="Search">
11
+                    </div>
12
+                </div>
13
+                <div class="col-12 p-5">
14
+                    <p-accordion>
15
+                        <p-accordionTab>
16
+                            <p-header>
17
+                                <div class="flex align-items-center">
18
+                                    <i class="pi pi-bookmark fs-xlarge mr-3 pink-color"></i>
19
+                                    <div class="flex flex-column">
20
+                                        <h5 class="mb-0">The Basics</h5>
21
+                                        <p>4 articles in this collection</p>
22
+                                    </div>
23
+                                </div>
24
+                            </p-header>
25
+
26
+                            <p-accordion styleClass="questions">
27
+                                <p-accordionTab header="Which do I need to develop a SaaS application?">
28
+                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent pellentesque ligula dolor, pretium tincidunt libero sodales in. Integer at eros posuere, elementum felis a, laoreet libero. In sed nunc accumsan, dapibus nibh sit amet, aliquet ipsum.
29
+                                </p-accordionTab>
30
+                                <p-accordionTab header="I’m a freelancer/agency. Can I use the item for an end product I’m doing for a client?">
31
+                                    Aliquam erat volutpat. Nulla hendrerit, arcu non lobortis fringilla, ipsum orci condimentum risus, ac hendrerit mauris justo eget lectus.
32
+                                </p-accordionTab>
33
+                                <p-accordionTab header="We’re a reseller, are we able to purchase a license on behalf of our client? ">
34
+                                    Ut leo tellus, imperdiet tristique turpis eu, eleifend rhoncus dolor. Fusce eu feugiat urna. Nullam venenatis nisi varius justo ultrices, non aliquam nisi dapibus. Duis viverra nulla ipsum, ac laoreet mauris dapibus eu.
35
+                                </p-accordionTab>
36
+                                <p-accordionTab header="Is there a recurring fee or is it perpetual? ">
37
+                                    Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur eu consequat libero. Donec euismod facilisis pulvinar.
38
+                                </p-accordionTab>
39
+                            </p-accordion>
40
+                        </p-accordionTab>
41
+                    </p-accordion>
42
+
43
+                    <p-accordion styleClass="mt-3">
44
+                        <p-accordionTab>
45
+                            <p-header>
46
+                                <div class="flex align-items-center">
47
+                                    <i class="pi pi-bookmark fs-xlarge mr-3 pink-color"></i>
48
+                                    <div class="flex flex-column">
49
+                                        <h5 class="mb-0">Questions About Licenses</h5>
50
+                                        <p>3 articles in this collection</p>
51
+                                    </div>
52
+                                </div>
53
+                            </p-header>
54
+
55
+                            <p-accordion styleClass="questions">
56
+                                <p-accordionTab header="Pellentesque faucibus convallis dolor ?">
57
+                                    Donec facilisis, magna aliquam venenatis lobortis, nulla diam euismod orci, ac pharetra risus mi eget mauris. Praesent eleifend.
58
+                                </p-accordionTab>
59
+                                <p-accordionTab header="Sed rhoncus, lacus a volutpat elementum ?">
60
+                                    Cras vel ullamcorper metus, vel faucibus ex. Nullam finibus ligula quis dolor aliquet, quis tempor lectus posuere. In sed mattis dui. Interdum et malesuada fames ac ante ipsum primis in faucibus.
61
+                                </p-accordionTab>
62
+                                <p-accordionTab header="Fusce porttitor augue turpis, vitae malesuada elit condimentum ?">
63
+                                    Proin dapibus ipsum eget libero elementum, a consectetur tortor tristique. Suspendisse potenti. Aenean dictum blandit mauris, a sollicitudin ex sagittis sit amet.
64
+                                </p-accordionTab>
65
+                            </p-accordion>
66
+                        </p-accordionTab>
67
+                    </p-accordion>
68
+
69
+                    <p-accordion styleClass="mt-3">
70
+                        <p-accordionTab>
71
+                            <p-header>
72
+                                <div class="flex align-items-center">
73
+                                    <i class="pi pi-bookmark fs-xlarge mr-3 pink-color"></i>
74
+                                    <div class="flex flex-column">
75
+                                        <h5 class="mb-0">Questions About Frameworks</h5>
76
+                                        <p>6 articles in this collection</p>
77
+                                    </div>
78
+                                </div>
79
+                            </p-header>
80
+
81
+                            <p-accordion styleClass="questions">
82
+                                <p-accordionTab header="Lorem ipsum dolor sit amet, consectetur adipiscing elit ?">
83
+                                    Vivamus in tortor arcu. Morbi ornare ex mi, sit amet pretium nibh sollicitudin eu.
84
+                                </p-accordionTab>
85
+                                <p-accordionTab header="Sed ut massa accumsan, consequat ligula sit amet, dignissim diam ?">
86
+                                    Curabitur elit enim, scelerisque at eros ac, sagittis volutpat ante. Mauris ac accumsan lorem, in viverra turpis.
87
+                                </p-accordionTab>
88
+                                <p-accordionTab header=" Vivamus lobortis lacinia eros vel viverra. Vestibulum molestie tortor metus, ac dapibus massa sodales eget ?">
89
+                                    Donec ut justo sit amet erat eleifend vulputate ut at mi.
90
+                                </p-accordionTab>
91
+                                <p-accordionTab header="Donec finibus tristique leo, consectetur tincidunt velit ?">
92
+                                    Maecenas mattis malesuada lobortis. Praesent hendrerit eros quam. Praesent volutpat mauris ut dignissim maximus.
93
+                                </p-accordionTab>
94
+                                <p-accordionTab header="Praesent suscipit, magna at lacinia tempor ?">
95
+                                    Velit leo commodo magna, at pharetra risus libero vitae urna.
96
+                                </p-accordionTab>
97
+                                <p-accordionTab header="Nulla auctor urna eget purus placerat maximus. Interdum ?">
98
+                                    Et malesuada fames ac ante ipsum primis in faucibus.
99
+                                </p-accordionTab>
100
+                            </p-accordion>
101
+                        </p-accordionTab>
102
+                    </p-accordion>
103
+                </div>
104
+            </div>
105
+        </div>
106
+    </div>
107
+</div>

+ 16
- 0
Angular/src/app/pages/app.help.component.ts 查看文件

@@ -0,0 +1,16 @@
1
+import { Component } from '@angular/core';
2
+import {AppBreadcrumbService} from '../app.breadcrumb.service';
3
+
4
+@Component({
5
+    selector: 'app-help',
6
+    templateUrl: './app.help.component.html',
7
+})
8
+export class AppHelpComponent {
9
+
10
+    constructor(private breadcrumbService: AppBreadcrumbService) {
11
+        this.breadcrumbService.setItems([
12
+            { label: 'Pages' },
13
+            { label: 'Help', routerLink: ['/pages/help'] }
14
+        ]);
15
+    }
16
+}

+ 104
- 0
Angular/src/app/pages/app.invoice.component.html 查看文件

@@ -0,0 +1,104 @@
1
+<div class="layout-invoice-page">
2
+    <button pButton pRipple type="button" label="Print" icon="pi pi-print" (click)="print()" class="mb-3"></button>
3
+
4
+    <div class="grid layout-invoice-content">
5
+        <div class="col-12">
6
+            <div class="card">
7
+                <div class="flex justify-content-between">
8
+                    <h5>INVOICE</h5>
9
+                    <div class="flex flex-column align-items-end">
10
+                        <img src="assets/layout/images/extensions/prime-logo.svg" alt="invoice-logo"/>
11
+                        <p class="mt-1">9137 3rd Lane California City, CA 93504.</p>
12
+                    </div>
13
+                </div>
14
+
15
+                <div class="p-3">
16
+                    <p-table [columns]="billCols" [value]="billData" styleClass="p-invoice-datatable-responsive pb-3">
17
+                        <ng-template pTemplate="header" let-columns>
18
+                            <tr>
19
+                                <th *ngFor="let col of columns">
20
+                                    {{col.header}}
21
+                                </th>
22
+                            </tr>
23
+                        </ng-template>
24
+                        <ng-template pTemplate="body" let-rowData let-columns="columns">
25
+                            <tr>
26
+                                <td *ngFor="let col of columns">
27
+                                    <span class="p-column-title">{{col.header}}</span>
28
+                                    {{rowData[col.field]}}
29
+                                </td>
30
+                            </tr>
31
+                        </ng-template>
32
+                    </p-table>
33
+
34
+                    <p-table [columns]="productCols" [value]="productData" styleClass="p-invoice-datatable-responsive p-datatable-sm py-6">
35
+                        <ng-template pTemplate="header" let-columns>
36
+                            <tr>
37
+                                <th *ngFor="let col of columns">
38
+                                    {{col.header}}
39
+                                </th>
40
+                            </tr>
41
+                        </ng-template>
42
+                        <ng-template pTemplate="body" let-rowData let-columns="columns">
43
+                            <tr>
44
+                                <td *ngFor="let col of columns">
45
+                                    <span class="p-column-title">{{col.header}}</span>
46
+                                    {{rowData[col.field]}}
47
+                                </td>
48
+                            </tr>
49
+                        </ng-template>
50
+                    </p-table>
51
+
52
+                    <div class="grid">
53
+                        <div class="col-12 md:col-6">
54
+                            <p-panel header="BANK">
55
+                                <div class="flex align-items-center justify-content-between py-2">
56
+                                    <span>Bank</span>
57
+                                    <span class="font-bold">BestBank</span>
58
+                                </div>
59
+                                <div class="flex align-items-center justify-content-between pt-2 py-2">
60
+                                    <span>ACCOUNT BENEFICIARY</span>
61
+                                    <span class="font-bold">Edward Williams</span>
62
+                                </div>
63
+                                <div class="flex align-items-center justify-content-between pt-2 py-2">
64
+                                    <span>SWIFT</span>
65
+                                    <span class="font-bold">PJNWBXND</span>
66
+                                </div>
67
+                                <div class="flex align-items-center justify-content-between pt-2 py-2">
68
+                                    <span>IBAN</span>
69
+                                    <span class="font-bold">GB04420235692263866724650931</span>
70
+                                </div>
71
+                            </p-panel>
72
+                        </div>
73
+                        <div class="col-12 md:col-6">
74
+                            <p-panel header="TOTAL">
75
+                                <div class="grid text-right">
76
+                                    <div class="col-10">
77
+                                        SUBTOTAL
78
+                                    </div>
79
+                                    <div class="col-2">
80
+                                        <span class="pink-color">$1304.00</span>
81
+                                    </div>
82
+
83
+                                    <div class="col-10">
84
+                                        <span>VAT</span>
85
+                                    </div>
86
+                                    <div class="col-2">
87
+                                        <span class="pink-color">$234.72</span>
88
+                                    </div>
89
+
90
+                                    <div class="col-10">
91
+                                        <span>TOTAL</span>
92
+                                    </div>
93
+                                    <div class="col-2">
94
+                                        <span class="pink-color">$1538.72</span>
95
+                                    </div>
96
+                                </div>
97
+                            </p-panel>
98
+                        </div>
99
+                    </div>
100
+                </div>
101
+            </div>
102
+        </div>
103
+    </div>
104
+</div>

+ 74
- 0
Angular/src/app/pages/app.invoice.component.ts 查看文件

@@ -0,0 +1,74 @@
1
+import { Component, OnInit } from '@angular/core';
2
+import {AppBreadcrumbService} from '../app.breadcrumb.service';
3
+
4
+@Component({
5
+    selector: 'app-invoice',
6
+    templateUrl: './app.invoice.component.html',
7
+})
8
+export class AppInvoiceComponent implements OnInit {
9
+
10
+    billData: any[];
11
+
12
+    billCols: any[];
13
+
14
+    productData: any[];
15
+
16
+    productCols: any[];
17
+
18
+    constructor(private breadcrumbService: AppBreadcrumbService) {
19
+        this.breadcrumbService.setItems([
20
+            { label: 'Pages' },
21
+            { label: 'Invoice', routerLink: ['/pages/invoice'] }
22
+        ]);
23
+    }
24
+
25
+    ngOnInit() {
26
+        this.billData = [
27
+            {
28
+                'billTo': 'TOYOKSU SYSCOM CORPORATION 11-27, MEIEKI 4-CHROME NAKAMURA-KU, NAGOYA 450-0002 JAPAN',
29
+                'date': '30/08/2021',
30
+                'no': 'A/3100',
31
+                'notes': 'N/A'
32
+            }
33
+        ];
34
+
35
+        this.billCols = [
36
+            { field: 'billTo', header: 'BILL TO' },
37
+            { field: 'date', header: 'DATE' },
38
+            { field: 'no', header: 'INVOICE NO' },
39
+            { field: 'notes', header: 'NOTES' }
40
+        ];
41
+
42
+        this.productData = [
43
+            {
44
+                'description': 'License A',
45
+                'quantity': '4',
46
+                'price': '$99.00',
47
+                'total': '$396.00'
48
+            },
49
+            {
50
+                'description': 'License B',
51
+                'quantity': '1',
52
+                'price': '$790.00',
53
+                'total': '$790.00'
54
+            },
55
+            {
56
+                'description': 'License C',
57
+                'quantity': '2',
58
+                'price': '$59.00',
59
+                'total': '$118.00'
60
+            }
61
+        ];
62
+
63
+        this.productCols = [
64
+            { field: 'description', header: 'DESCRIPTION' },
65
+            { field: 'quantity', header: 'QUANTITY' },
66
+            { field: 'price', header: 'UNIT PRICE' },
67
+            { field: 'total', header: 'LINE TOTAL' }
68
+        ];
69
+    }
70
+
71
+    print() {
72
+        window.print();
73
+    }
74
+}

+ 187
- 0
Angular/src/app/pages/app.landing.component.html 查看文件

@@ -0,0 +1,187 @@
1
+<div class="landing-container">
2
+    <div id="header" class="section flex flex-column">
3
+        <div class="header-menu-container flex align-items-center justify-content-between">
4
+            <a class="layout-topbar-logo" routerLink="/">
5
+                <img src="assets/layout/images/logo2x.png" alt="ultima-layout" style="height: 24px">
6
+            </a>
7
+
8
+            <a id="menu-button" href="#" class="lg:hidden" (click)="onMenuButtonClick($event)">
9
+                <i class="pi pi-bars fs-xlarge"></i>
10
+            </a>
11
+            <ul #menu id="menu" (animationend)="onMenuAnimationEnd()">
12
+                <li><a class="flex p-3">Home</a></li>
13
+                <li><a (click)="smoothScroll('#header')" class="flex p-3">Introduction</a></li>
14
+                <li><a (click)="smoothScroll('#features')" class="flex p-3">Features</a></li>
15
+                <li><a (click)="smoothScroll('#promotion')" class="flex p-3">Promotion</a></li>
16
+                <li><a (click)="smoothScroll('#pricing')" class="flex p-3">Pricing</a></li>
17
+                <li><a (click)="smoothScroll('#video')" class="flex pl-3 py-3">Video</a></li>
18
+            </ul>
19
+        </div>
20
+
21
+        <div class="header-text flex flex-column align-items-center justify-content-center">
22
+            <h1 class="mb-6 white-color">Your application slogan comes here</h1>
23
+            <button pButton pRipple type="button" label="Sign Up Now" class="p-button-secondary"></button>
24
+        </div>
25
+    </div>
26
+
27
+    <div id="features" class="section flex flex-column align-items-center">
28
+        <h2>The Ultimate Material Application Template for PrimeNG</h2>
29
+        <p class="text-center">PrimeNG is a collection of rich UI components for Angular. PrimeNG is developed by PrimeTek Informatics, a vendor with years of expertise in developing open source UI solutions.
30
+            Allocate your valuable time on business logic rather than dealing with the complex user interface requirements.
31
+        </p>
32
+
33
+        <div class="grid mt-3 mx-0">
34
+            <div class="col-12 md:col-4 text-center">
35
+                <h3>Creative</h3>
36
+                <button pButton pRipple type="button" class="feature-button p-button-rounded p-button-plain p-button-text p-button p-component p-button-icon-only">
37
+                    <span class="p-button-icon pi pi-pencil fs-xlarge" aria-hidden="true"></span>
38
+                    <span aria-hidden="true" class="p-button-label">&amp;nbsp;</span>
39
+                </button>
40
+            </div>
41
+            <div class="col-12 md:col-4 text-center">
42
+                <h3>Responsive</h3>
43
+                <button pButton pRipple type="button" class="feature-button p-button-rounded p-button-plain p-button-text p-button p-component p-button-icon-only">
44
+                    <span class="p-button-icon pi pi-mobile fs-xlarge" aria-hidden="true"></span>
45
+                    <span aria-hidden="true" class="p-button-label">&amp;nbsp;</span>
46
+                </button>
47
+            </div>
48
+            <div class="col-12 md:col-4 text-center">
49
+                <h3>Cross Browser</h3>
50
+                <button pButton pRipple type="button" class="feature-button p-button-rounded p-button-plain p-button-text p-button p-component p-button-icon-only">
51
+                    <span class="p-button-icon pi pi-upload fs-xlarge" aria-hidden="true"></span>
52
+                    <span aria-hidden="true" class="p-button-label">&amp;nbsp;</span>
53
+                </button>
54
+            </div>
55
+
56
+            <div class="col-12 md:col-4 text-center">
57
+                <button pButton pRipple type="button" class="feature-button p-button-rounded p-button-plain p-button-text p-button p-component p-button-icon-only">
58
+                    <span class="p-button-icon pi pi-tag fs-xlarge" aria-hidden="true"></span>
59
+                    <span aria-hidden="true" class="p-button-label">&amp;nbsp;</span>
60
+                </button>
61
+                <h3>Well Organized</h3>
62
+            </div>
63
+            <div class="col-12 md:col-4 text-center">
64
+                <button pButton pRipple type="button" class="feature-button p-button-rounded p-button-plain p-button-text p-button p-component p-button-icon-only">
65
+                    <span class="p-button-icon pi pi-palette fs-xlarge" aria-hidden="true"></span>
66
+                    <span aria-hidden="true" class="p-button-label">&amp;nbsp;</span>
67
+                </button>
68
+                <h3>Beautiful</h3>
69
+            </div>
70
+            <div class="col-12 md:col-4 text-center">
71
+                <button pButton pRipple type="button" class="feature-button p-button-rounded p-button-plain p-button-text p-button p-component p-button-icon-only">
72
+                    <span class="p-button-icon pi pi-check-circle fs-xlarge" aria-hidden="true"></span>
73
+                    <span aria-hidden="true" class="p-button-label">&amp;nbsp;</span>
74
+                </button>
75
+                <h3>Just For you</h3>
76
+            </div>
77
+        </div>
78
+    </div>
79
+
80
+    <div id="promotion" class="flex flex-column align-items-center">
81
+        <div class="grid m-0 py-3 pl-xl-6">
82
+            <div class="col-12 lg:col-8 flex flex-column justify-content-center align-items-center lg:align-items-start pl-6">
83
+                <h1 class="white-color">Boost Your Productivity.</h1>
84
+                <button pButton pRipple type="button" class="p-button-raised p-button p-component">
85
+                    <span class="p-button-label">Sign Up Now</span>
86
+                </button>
87
+            </div>
88
+            <div class="col-12 lg:col-4">
89
+                <div class="card mt-3 mb-0">
90
+                    <h3>Just</h3>
91
+                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab perferendis nesciunt ad reiciendis
92
+                        explicabo consequatur sapiente odit ipsa harum illum</p>
93
+                </div>
94
+
95
+                <div class="card mt-3 mb-0">
96
+                    <h3>Like</h3>
97
+                    <p>Ab perferendis nesciunt ad reiciendis explicabo consequatur sapiente odit ipsa harum illum</p>
98
+                </div>
99
+
100
+                <div class="card my-3">
101
+                    <h3>That</h3>
102
+                    <p>Necessitatibus quaerat voluptates aspernatur iure, aperiam possimus sint sit mollitia! </p>
103
+                </div>
104
+            </div>
105
+        </div>
106
+    </div>
107
+
108
+    <div id="pricing" class="section flex flex-column align-items-center">
109
+        <h2>Pricing</h2>
110
+        <p>Esse delectus sit velit, aspernatur voluptates molestiae, enim recusandae. Odit dicta, maiores quas ad
111
+            nesciunt, illum expedita veritatis illo quam odio id!</p>
112
+
113
+        <div class="grid m-0 pricing-content">
114
+            <div class="col-12 xl:col-4">
115
+                <div class="card p-0">
116
+                    <div class="flex flex-column align-items-center indigo-bgcolor white-color p-6 fs-large">
117
+                        <span>BASIC</span>
118
+                        <h1 class="font-bold">$5</h1>
119
+                        <span>Monthly</span>
120
+                    </div>
121
+                    <ul class="options">
122
+                        <li><i class="pi pi-check"></i><span>Responsive</span></li>
123
+                        <li><i class="pi pi-check"></i><span>Push Messages</span></li>
124
+                    </ul>
125
+                </div>
126
+            </div>
127
+            <div class="col-12 xl:col-4">
128
+                <div class="card p-0">
129
+                    <div class="flex flex-column align-items-center pink-bgcolor white-color p-6 fs-large">
130
+                        <span>STANDARD</span>
131
+                        <h1 class="font-bold">$25</h1>
132
+                        <span>Monthly</span>
133
+                    </div>
134
+                    <ul class="options">
135
+                        <li><i class="pi pi-check"></i><span>Responsive</span></li>
136
+                        <li><i class="pi pi-check"></i><span>Push Messages</span></li>
137
+                        <li><i class="pi pi-check"></i><span>7/24 Support</span></li>
138
+                        <li><i class="pi pi-check"></i><span>Free Shipping</span></li>
139
+                    </ul>
140
+                </div>
141
+            </div>
142
+            <div class="col-12 xl:col-4 pricing-box pricing-professional">
143
+                <div class="card p-0">
144
+                    <div class="flex flex-column align-items-center cyan-bgcolor white-color p-6 fs-large">
145
+                        <span>PROFESSIONAL</span>
146
+                        <h1 class="font-bold">$50</h1>
147
+                        <span>Monthly</span>
148
+                    </div>
149
+                    <ul class="options">
150
+                        <li><i class="pi pi-check"></i><span>Responsive</span></li>
151
+                        <li><i class="pi pi-check"></i><span>Push Messages</span></li>
152
+                        <li><i class="pi pi-check"></i><span>7/24 Support</span></li>
153
+                        <li><i class="pi pi-check"></i><span>Free Shipping</span></li>
154
+                        <li><i class="pi pi-check"></i><span>Unlimited Bandwidth</span></li>
155
+                        <li><i class="pi pi-check"></i><span>Unlimited Storage</span></li>
156
+                        <li><i class="pi pi-check"></i><span>Gift Cards</span></li>
157
+                    </ul>
158
+                </div>
159
+            </div>
160
+        </div>
161
+    </div>
162
+
163
+    <div id="video" class="section flex flex-column align-items-center justify-content-center">
164
+        <h2>Video</h2>
165
+        <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque.</p>
166
+        <div class="m-3">
167
+            <iframe src="https://www.youtube.com/embed/B_lYGUtCd0g" frameborder="0" width="560" height="330" class="videoFrame"></iframe>
168
+        </div>
169
+    </div>
170
+
171
+    <div id="footer" class="section flex align-items-center justify-content-between flex-column lg:flex-row">
172
+        <p>PrimeNG ULTIMA</p>
173
+
174
+        <div class="py-3 flex align-items-center">
175
+            <ul class="my-3 mx-6">
176
+                <li><a href="#mobile">Promotion</a></li>
177
+                <li><a href="#pricing">Pricing</a></li>
178
+                <li><a href="#video">Video</a></li>
179
+            </ul>
180
+            <ul class="my-3 ml-3">
181
+                <li><a href="#">Home</a></li>
182
+                <li><a href="#introduction">Introduction</a></li>
183
+                <li><a href="#features">Features</a></li>
184
+            </ul>
185
+        </div>
186
+    </div>
187
+</div>

+ 78
- 0
Angular/src/app/pages/app.landing.component.ts 查看文件

@@ -0,0 +1,78 @@
1
+import { Component, ElementRef, ViewChild } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-login',
5
+  templateUrl: './app.landing.component.html',
6
+    styles: [`
7
+        .videoFrame{
8
+            width: 560px;
9
+            height: 300px;
10
+        }
11
+
12
+        @media screen and (max-width: 960px) {
13
+            .videoFrame{
14
+                width: 300px;
15
+            }
16
+        }
17
+
18
+    `]
19
+})
20
+export class AppLandingComponent {
21
+
22
+    isMenuActive = false;
23
+
24
+    @ViewChild('menu') menuViewChild: ElementRef;
25
+
26
+    smoothScroll(id){
27
+        document.querySelector(id).scrollIntoView({
28
+            behavior: 'smooth'
29
+        });
30
+    }
31
+
32
+    onMenuButtonClick(e) {
33
+        let menu = this.menuViewChild.nativeElement;
34
+
35
+        if (this.isMenuActive) {
36
+            this.addClass(menu, 'fadeOutUp');
37
+            this.isMenuActive = false;
38
+        }
39
+        else {
40
+            this.addClass(menu, 'menu-active fadeInDown');
41
+            this.isMenuActive = true;
42
+        }
43
+        e.preventDefault();
44
+    }
45
+
46
+    onMenuAnimationEnd() {
47
+        let menu = this.menuViewChild.nativeElement;
48
+
49
+        if (this.isMenuActive) {
50
+            this.removeClass(menu, 'fadeInDown');
51
+        }
52
+        else {
53
+            this.removeClass(menu, 'menu-active fadeOutUp');
54
+        }
55
+    }
56
+
57
+    addClass(element, classNames) {
58
+        let classNamesArr = classNames.split(' ');
59
+        for (var i = 0; i < classNamesArr.length; i++) {
60
+            let className = classNamesArr[i];
61
+            if (element.classList)
62
+                element.classList.add(className);
63
+            else
64
+                element.className += ' ' + className;
65
+        }
66
+    }
67
+
68
+    removeClass(element, classNames) {
69
+        let classNamesArr = classNames.split(' ');
70
+        for (var i = 0; i < classNamesArr.length; i++) {
71
+            let className = classNamesArr[i];
72
+            if (element.classList)
73
+                element.classList.remove(className);
74
+            else
75
+                element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
76
+        }
77
+    }
78
+}

+ 51
- 0
Angular/src/app/pages/app.login.component.html 查看文件

@@ -0,0 +1,51 @@
1
+<div class="pages-body login-page flex flex-column">
2
+    <div class="topbar p-3 flex justify-content-between flex-row align-items-center">
3
+        <div class="topbar-left ml-3 flex" routerLink="/">
4
+            <div class="logo">
5
+                <img src="assets/layout/images/logo2x.png" alt=""/>
6
+            </div>
7
+        </div>
8
+        <div class="topbar-right mr-3 flex">
9
+            <button pButton pRipple type="button" label="DASHBOARD" [routerLink]="['/']"
10
+                    class="p-button-text p-button-plain topbar-button"></button>
11
+        </div>
12
+    </div>
13
+
14
+    <div class="align-self-center mt-auto mb-auto">
15
+        <div class="pages-panel card flex flex-column">
16
+            <div class="pages-header px-3 py-1">
17
+                <h2>LOGIN</h2>
18
+            </div>
19
+
20
+            <h4>Welcome</h4>
21
+
22
+            <div class="pages-detail mb-6 px-6">Please use the form to sign-in Ultima network</div>
23
+
24
+            <div class="input-panel flex flex-column px-3">
25
+                <div class="p-inputgroup">
26
+                    <span class="p-inputgroup-addon">
27
+                        <i class="pi pi-envelope"></i>
28
+                    </span>
29
+                    <span class="p-float-label">
30
+                        <input type="text" id="email" pInputText>
31
+                        <label for="email">Email</label>
32
+                    </span>
33
+                </div>
34
+
35
+                <div class="p-inputgroup mt-3 mb-6">
36
+                    <span class="p-inputgroup-addon">
37
+                        <i class="pi pi-lock"></i>
38
+                    </span>
39
+                    <span class="p-float-label">
40
+                        <input type="password" id="password" pInputText>
41
+                        <label for="password">Password</label>
42
+                    </span>
43
+                </div>
44
+
45
+            </div>
46
+
47
+            <p-button class="login-button mb-6 px-3" label="LOGIN"></p-button>
48
+
49
+        </div>
50
+    </div>
51
+</div>

+ 9
- 0
Angular/src/app/pages/app.login.component.ts 查看文件

@@ -0,0 +1,9 @@
1
+import { Component } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-login',
5
+  templateUrl: './app.login.component.html',
6
+})
7
+export class AppLoginComponent {
8
+
9
+}

+ 26
- 0
Angular/src/app/pages/app.notfound.component.html 查看文件

@@ -0,0 +1,26 @@
1
+<div class="pages-body notfound-page flex flex-column">
2
+    <div class="topbar p-3 flex justify-content-between flex-row align-items-center">
3
+        <div class="topbar-left ml-3 flex" routerLink="/">
4
+            <div class="logo">
5
+                <img src="assets/layout/images/logo2x.png" alt=""/>
6
+            </div>
7
+        </div>
8
+        <div class="topbar-right mr-3 flex">
9
+            <button pButton pRipple type="button" label="DASHBOARD" [routerLink]="['/']"
10
+                    class="p-button-text p-button-plain topbar-button"></button>
11
+        </div>
12
+    </div>
13
+
14
+    <div class="align-self-center mt-auto mb-auto">
15
+        <div class="pages-panel card flex flex-column">
16
+            <div class="pages-header px-3 py-1">
17
+                <h2>NOT FOUND</h2>
18
+            </div>
19
+            <div class="card mt-3 px-6">
20
+                <img src="assets/layout/images/pages/404.png" alt=""/>
21
+            </div>
22
+            <div class="pages-detail pb-6">Requested resource is not available.</div>
23
+            <button pButton pRipple type="button" label="GO BACK TO DASHBOARD" [routerLink]="['/']" class="p-button-text"></button>
24
+        </div>
25
+    </div>
26
+</div>

+ 9
- 0
Angular/src/app/pages/app.notfound.component.ts 查看文件

@@ -0,0 +1,9 @@
1
+import { Component } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-notfound',
5
+  templateUrl: './app.notfound.component.html',
6
+})
7
+export class AppNotfoundComponent {
8
+
9
+}

+ 34
- 0
Angular/src/app/pages/app.timelinedemo.component.html 查看文件

@@ -0,0 +1,34 @@
1
+<div class="grid">
2
+    <div class="col-12">
3
+        <div class="card">
4
+            <h4>Timeline</h4>
5
+
6
+            <h5>Custom Timeline</h5>
7
+            <p-timeline [value]="customEvents" align="alternate" styleClass="customized-timeline">
8
+                <ng-template pTemplate="marker" let-event>
9
+                <span class="custom-marker shadow-2" [style.backgroundColor]="event.color">
10
+                    <i [ngClass]="event.icon"></i>
11
+                </span>
12
+                </ng-template>
13
+                <ng-template pTemplate="content" let-event>
14
+                    <p-card [header]="event.status" [subheader]="event.date">
15
+                        <img *ngIf="event.image" [src]="'assets/demo/images/product/' + event.image" [alt]="event.name" width="200" class="shadow-2" />
16
+                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt
17
+                            quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque quas!</p>
18
+                        <button pButton label="Read more" class="p-button-text"></button>
19
+                    </p-card>
20
+                </ng-template>
21
+            </p-timeline>
22
+
23
+            <h5 style="margin-top: 5em">Horizontal - Alternate Align</h5>
24
+            <p-timeline [value]="horizontalEvents" layout="horizontal" align="alternate">
25
+                <ng-template pTemplate="content" let-event>
26
+                    {{event}}
27
+                </ng-template>
28
+                <ng-template pTemplate="opposite" let-event>
29
+                    &nbsp;
30
+                </ng-template>
31
+            </p-timeline>
32
+        </div>
33
+    </div>
34
+</div>

+ 40
- 0
Angular/src/app/pages/app.timelinedemo.component.ts 查看文件

@@ -0,0 +1,40 @@
1
+import {Component, OnInit} from '@angular/core';
2
+import {PrimeIcons} from 'primeng/api';
3
+import {AppBreadcrumbService} from '../app.breadcrumb.service';
4
+
5
+@Component({
6
+    templateUrl: './app.timelinedemo.component.html',
7
+    styleUrls: ['./app.timelinedemo.scss']
8
+})
9
+export class AppTimelineDemoComponent implements OnInit{
10
+
11
+    customEvents: any[];
12
+
13
+    horizontalEvents: any[];
14
+
15
+    constructor(private breadcrumbService: AppBreadcrumbService) {
16
+        this.breadcrumbService.setItems([
17
+            { label: 'Pages' },
18
+            { label: 'Timeline', routerLink: ['/pages/timeline'] }
19
+        ]);
20
+    }
21
+
22
+    ngOnInit() {
23
+        this.customEvents = [
24
+            {
25
+                status: 'Ordered',
26
+                date: '15/10/2020 10:30',
27
+                icon: PrimeIcons.SHOPPING_CART,
28
+                color: '#9C27B0',
29
+                image: 'game-controller.jpg'
30
+            },
31
+            {status: 'Processing', date: '15/10/2020 14:00', icon: PrimeIcons.COG, color: '#673AB7'},
32
+            {status: 'Shipped', date: '15/10/2020 16:15', icon: PrimeIcons.ENVELOPE, color: '#FF9800'},
33
+            {status: 'Delivered', date: '16/10/2020 10:00', icon: PrimeIcons.CHECK, color: '#607D8B'}
34
+        ];
35
+
36
+        this.horizontalEvents = [
37
+            '2020', '2021', '2022', '2023'
38
+        ];
39
+    }
40
+}

+ 40
- 0
Angular/src/app/pages/app.timelinedemo.scss 查看文件

@@ -0,0 +1,40 @@
1
+//timeline
2
+.custom-marker {
3
+    display: flex;
4
+    width: 2rem;
5
+    height: 2rem;
6
+    align-items: center;
7
+    justify-content: center;
8
+    color: #ffffff;
9
+    border-radius: 50%;
10
+    z-index: 1;
11
+}
12
+
13
+::ng-deep {
14
+    .p-timeline-event-content,
15
+    .p-timeline-event-opposite {
16
+        line-height: 1;
17
+    }
18
+}
19
+
20
+@media screen and (max-width: 960px) {
21
+    ::ng-deep {
22
+        .customized-timeline {
23
+            .p-timeline-event:nth-child(even) {
24
+                flex-direction: row !important;
25
+
26
+                .p-timeline-event-content {
27
+                    text-align: left !important;
28
+                }
29
+            }
30
+
31
+            .p-timeline-event-opposite {
32
+                flex: 0;
33
+            }
34
+
35
+            .p-card {
36
+                margin-top: 1rem;
37
+            }
38
+        }
39
+    }
40
+}

+ 359
- 0
Angular/src/app/pages/app.wizard.component.html 查看文件

@@ -0,0 +1,359 @@
1
+<body class="wizard-body">
2
+    <div class="wizard-wrapper">
3
+        <div class="wizard-topbar">
4
+            <div class="logo" [routerLink]="['/']"></div>
5
+            <div class="profile">
6
+                <div class="profile-text">
7
+                    <h1>Welcome to Ultima</h1>
8
+                    <p>Please complete steps to register</p>
9
+                </div>
10
+                <img class="profile-image" src="assets/layout/images/extensions/flag-us@2x.png" alt="ultima-layout" />
11
+            </div>
12
+        </div>
13
+
14
+        <div class="wizard-content">
15
+            <div class="wizard-card">
16
+                <div class="wizard-card-header">
17
+                    <div class="grid col">
18
+                        <div class="col-4 tab register-tab" [ngClass]="{'selected-tab': activeTab == 'register'}" (click)="clickNext('register')">
19
+                            <div class="icon">
20
+                                <i class="pi pi-sign-in"></i>
21
+                            </div>
22
+                            <div class="title">REGISTER</div>
23
+                        </div>
24
+                        <div class="col-4 tab tier-tab" [ngClass]="{'selected-tab': activeTab === 'tier'}" (click)="clickNext('tier')">
25
+                            <div class="icon">
26
+                                <i class="pi pi-clone"></i>
27
+                            </div>
28
+                            <div class="title">CHOOSE TIER</div>
29
+                        </div>
30
+                        <div class="col-4 tab payment-tab" [ngClass]="{'selected-tab': activeTab === 'payment'}" (click)="clickNext('payment')">
31
+                            <div class="icon">
32
+                                <i class="pi pi-shopping-cart"></i>
33
+                            </div>
34
+                            <div class="title">PAYMENT</div>
35
+                        </div>
36
+                        <div class="tab-bar" [@tabBar]="activeTab==='register'?'register':activeTab==='tier'?'tier':'payment'"></div>
37
+                    </div>
38
+                </div>
39
+                <div class="wizard-card-content register" [ngClass]="{'active-content': activeTab === 'register'}">
40
+                    <div class="grid ">
41
+                        <div class="col-12  lg:col-6">
42
+                            <h1>ESSENTIAL INFORMATION</h1>
43
+                            <div class="forms">
44
+                                <div class="p-inputgroup">
45
+                                        <span class="p-inputgroup-addon">
46
+											<i class="pi pi-user"></i>
47
+                                        </span>
48
+                                    <span class="p-float-label">
49
+                                <input id="name" type="text" pInputText/>
50
+                                <label for="name">Username</label>
51
+                                    </span>
52
+                                </div>
53
+                                <div class="p-inputgroup">
54
+                                        <span class="p-inputgroup-addon">
55
+											<i class="pi pi-user"></i>
56
+                                        </span>
57
+                                    <span class="p-float-label">
58
+                                <input id="email" type="text" pInputText/>
59
+                                <label for="email">Email</label>
60
+                                    </span>
61
+                                </div>
62
+                                <div class="p-inputgroup">
63
+                                        <span class="p-inputgroup-addon">
64
+											<i class="pi pi-sign-in"></i>
65
+                                        </span>
66
+                                    <span class="p-float-label">
67
+                                <input id="password" type="password" pInputText/>
68
+                                <label for="password">Password</label>
69
+                                    </span>
70
+                                </div>
71
+
72
+                            </div>
73
+                        </div>
74
+                        <div class="col-12 lg:col-6">
75
+                            <h1>OPTIONAL</h1>
76
+                            <div class="forms">
77
+                                <p-dropdown id="timezone" [style]="{'margin-bottom':'10px'}" [options]="dropdownOptions1" [(ngModel)]="selectDropdownOptions1"></p-dropdown>
78
+
79
+                                <div class="calendar">
80
+                                    <p-calendar id="button" [(ngModel)]="birthdate" placeholder="Birthdate" [showIcon]="true" appendTo="body"></p-calendar>
81
+                                </div>
82
+
83
+                                <p-dropdown id="ultima" [options]="dropdownOptions2" [(ngModel)]="selectDropdownOptions2" appendTo="body" [style]="{'margin-bottom':'10px'}"></p-dropdown>
84
+                            </div>
85
+                        </div>
86
+                        <div class="col-12">
87
+                            <button pButton pRipple class="continue-button" type="button" label="CONTINUE" (click)="clickNext('tier')"></button>
88
+                        </div>
89
+                    </div>
90
+                </div>
91
+
92
+                <div class="wizard-card-content tier" [ngClass]="{'active-content': activeTab === 'tier'}">
93
+                    <div class="grid ">
94
+                        <div class="col-12 md:col-6 lg:col-4">
95
+                            <div class="card basic">
96
+                                <div class="card-header">
97
+                                    <div class="grid">
98
+                                        <div class="col-8">
99
+                                            <h1>BASIC</h1>
100
+                                        </div>
101
+                                        <div class="col-4">
102
+                                            <h1>$5</h1>
103
+                                            <span>/m</span>
104
+                                        </div>
105
+                                    </div>
106
+                                </div>
107
+                                <div class="card-content">
108
+                                        <div class="card-row grid">
109
+                                            <div class="col-3">
110
+                                                <i class="pi pi-fw pi-check"></i>
111
+                                            </div>
112
+                                            <div class="col-9">Responsive</div>
113
+                                        </div>
114
+                                        <div class="card-row grid">
115
+                                            <div class="col-3">
116
+                                                <i class="pi pi-fw pi-check"></i>
117
+                                            </div>
118
+                                            <div class="col-9">Push Messages</div>
119
+                                        </div>
120
+                                    <div class="col-12 tier-button-wrapper">
121
+                                        <button pButton pRipple class="tier-button basic" type="button" label="BASIC" (click)="selectTier('basic')"></button>
122
+                                    </div>
123
+                                </div>
124
+                            </div>
125
+                        </div>
126
+                        <div class="col-12 md:col-6 lg:col-4">
127
+                            <div class="card pro">
128
+                                <div class="card-header">
129
+                                    <div class="grid">
130
+                                        <div class="col-7">
131
+                                            <h1>PRO</h1>
132
+                                        </div>
133
+                                        <div class="col-5">
134
+                                            <h1>$25</h1>
135
+                                            <span>/m</span>
136
+                                        </div>
137
+                                    </div>
138
+                                </div>
139
+                                <div class="card-content">
140
+                                    <div class="card-row grid">
141
+                                        <div class="col-3">
142
+                                            <i class="pi pi-fw pi-check"></i>
143
+                                        </div>
144
+                                        <div class="col-9">Responsive</div>
145
+                                    </div>
146
+                                    <div class="card-row grid">
147
+                                        <div class="col-3">
148
+                                            <i class="pi pi-fw pi-check"></i>
149
+                                        </div>
150
+                                        <div class="col-9">Push Messages</div>
151
+                                    </div>
152
+                                    <div class="card-row grid">
153
+                                        <div class="col-3">
154
+                                            <i class="pi pi-fw pi-check"></i>
155
+                                        </div>
156
+                                        <div class="col-9">7/24 Support</div>
157
+                                    </div>
158
+                                    <div class="card-row grid">
159
+                                        <div class="col-3">
160
+                                            <i class="pi pi-fw pi-check"></i>
161
+                                        </div>
162
+                                        <div class="col-9">Free Shipping</div>
163
+                                    </div>
164
+                                    <div class="col-12 tier-button-wrapper">
165
+                                        <button pButton pRipple class="tier-button pro" type="button" label="SELECT PRO" (click)="selectTier('pro')"></button>
166
+                                    </div>
167
+                                </div>
168
+                            </div>
169
+                        </div>
170
+
171
+                        <div class="col-12 md:col-6 lg:col-4">
172
+                            <div class="card pro-plus">
173
+                                <div class="card-header">
174
+                                    <div class="grid">
175
+                                        <div class="col-7">
176
+                                            <h1>PRO+</h1>
177
+                                        </div>
178
+                                        <div class="col-5">
179
+                                            <h1>$50</h1>
180
+                                            <span>/m</span>
181
+                                        </div>
182
+                                    </div>
183
+                                </div>
184
+                                <div class="card-content">
185
+                                    <div class="card-row grid">
186
+                                        <div class="col-3">
187
+                                            <i class="pi pi-fw pi-check"></i>
188
+                                        </div>
189
+                                        <div class="col-9">Responsive</div>
190
+                                    </div>
191
+                                    <div class="card-row grid">
192
+                                        <div class="col-3">
193
+                                            <i class="pi pi-fw pi-check"></i>
194
+                                        </div>
195
+                                        <div class="col-9">Push Messages</div>
196
+                                    </div>
197
+                                    <div class="card-row grid">
198
+                                        <div class="col-3">
199
+                                            <i class="pi pi-fw pi-check"></i>
200
+                                        </div>
201
+                                        <div class="col-9">7/24 Support</div>
202
+                                    </div>
203
+                                    <div class="card-row grid">
204
+                                        <div class="col-3">
205
+                                            <i class="pi pi-fw pi-check"></i>
206
+                                        </div>
207
+                                        <div class="col-9">Free Shipping</div>
208
+                                    </div>
209
+                                    <div class="card-row grid">
210
+                                        <div class="col-3">
211
+                                            <i class="pi pi-fw pi-check"></i>
212
+                                        </div>
213
+                                        <div class="col-9">Unlimited BW</div>
214
+                                    </div>
215
+                                    <div class="card-row grid">
216
+                                        <div class="col-3">
217
+                                            <i class="pi pi-fw pi-check"></i>
218
+                                        </div>
219
+                                        <div class="col-9">Special Gift Cards</div>
220
+                                    </div>
221
+                                    <div class="col-12 tier-button-wrapper">
222
+                                        <button pButton pRipple class="tier-button pro-plus" type="button" label="SELECT PRO+" (click)="selectTier('pro-plus')"></button>
223
+                                    </div>
224
+                                </div>
225
+                            </div>
226
+                        </div>
227
+                    </div>
228
+                </div>
229
+
230
+                <div class="wizard-card-content payment" [ngClass]="{'active-content': activeTab === 'payment'}">
231
+                    <div class="grid grid-nogutter">
232
+                        <div class="lg:col-8 col-12 payment-info">
233
+                            <div class="grid col" id="customPanel">
234
+                                    <div class="col-1 lg:col-1 md:col-1" style="line-height: 2em">
235
+                                        <p-radioButton name="group1" value="Credit" [(ngModel)]="radioButton1" inputId="credit"></p-radioButton>
236
+                                    </div>
237
+                                    <div class="col-11 lg:col-5 md:col-5">
238
+                                        <div class="credits">
239
+                                            <img src="assets/layout/images/extensions/asset-mastercard.svg" alt="ultima-layout" />
240
+                                            <img src="assets/layout/images/extensions/asset-visa.svg" alt="ultima-layout" />
241
+                                            <img src="assets/layout/images/extensions/asset-amex.svg" alt="ultima-layout" />
242
+                                        </div>
243
+                                    </div>
244
+                                    <div class="col-1 lg:col-1 md:col-1" style="line-height: 2em">
245
+                                        <p-radioButton name="group1" value="Paypal" [(ngModel)]="radioButton1" inputId="paypal"></p-radioButton>
246
+                                    </div>
247
+                                    <div class="col-11 lg:col-5 md:col-5">
248
+                                        <div class="paypal">
249
+                                            <img src="assets/layout/images/extensions/asset-paypal.svg" alt="ultima-layout" />
250
+                                        </div>
251
+                                    </div>
252
+                            </div>
253
+                            <div class="grid col">
254
+                                <div class="col-12">
255
+                                    <span class="p-float-label">
256
+                                        <input pInputText type="text"/>
257
+                                        <label>Card Holder Name </label>
258
+                                    </span>
259
+                                </div>
260
+                            </div>
261
+                            <div class="grid col">
262
+                                <div class="col-6">
263
+                                    <span class="p-float-label">
264
+                                        <input pInputText type="text"/>
265
+                                        <label>Card No</label>
266
+                                    </span>
267
+                                </div>
268
+                                <div class="col-3">
269
+                                    <span class="p-float-label">
270
+                                        <input pInputText type="text"/>
271
+                                        <label>Date</label>
272
+                                    </span>
273
+                                </div>
274
+                                <div class="col-3">
275
+                                    <span class="p-float-label">
276
+                                        <input pInputText type="text"/>
277
+                                        <label>CCV</label>
278
+                                    </span>
279
+                                </div>
280
+                            </div>
281
+                            <div class="grid col check-info">
282
+                                <p-checkbox [(ngModel)]="checked" binary="true" label="Save credit card information for future usage"></p-checkbox>
283
+                            </div>
284
+                        </div>
285
+                        <div class="lg:col-4 col-12 order-info">
286
+                            <div class="grid col">
287
+                                <div class="col-12">
288
+                                    <h1>ORDER SUMMARY</h1>
289
+                                </div>
290
+                            </div>
291
+                            <div class="order order-default" [ngClass]="{'selected-order': activeCard === ''}">
292
+                                <div class="grid col">
293
+                                    <div class="col-8">Tier - </div>
294
+                                    <div class="col-4 price">$0.00</div>
295
+                                    <div class="col-8">VAT (%18)</div>
296
+                                    <div class="col-4 price">$0.00</div>
297
+                                </div>
298
+                                <div class="grid col total">
299
+                                    <div class="col-8">Total</div>
300
+                                    <div class="col-4 price">$0.00</div>
301
+                                    <div class="col-12">
302
+                                        Please select one tier.
303
+                                    </div>
304
+                                </div>
305
+                            </div>
306
+                            <div class="order order-basic" [ngClass]="{'selected-order': activeCard === 'basic'}">
307
+                                <div class="grid col">
308
+                                    <div class="col-8">Tier - Basic</div>
309
+                                    <div class="col-4 price">$5.00</div>
310
+                                    <div class="col-8">VAT (%18)</div>
311
+                                    <div class="col-4 price">$0.90</div>
312
+                                </div>
313
+                                <div class="grid col total">
314
+                                    <div class="col-8">Total</div>
315
+                                    <div class="col-4 price">$5.90</div>
316
+                                    <div class="col-12">
317
+                                        <p-button type="button" label="CONFIRM ORDER" styleClass="buy-button" ></p-button>
318
+                                    </div>
319
+                                </div>
320
+                            </div>
321
+                            <div class="order order-pro" [ngClass]="{'selected-order': activeCard === 'pro'}">
322
+                                <div class="grid col">
323
+                                    <div class="col-8">Tier - Pro</div>
324
+                                    <div class="col-4 price">$25.00</div>
325
+                                    <div class="col-8">VAT (%18)</div>
326
+                                    <div class="col-4 price">$4.50</div>
327
+                                </div>
328
+                                <div class="grid col total">
329
+                                    <div class="col-8">Total</div>
330
+                                    <div class="col-4 price">$29.50</div>
331
+                                    <div class="col-12">
332
+                                        <p-button type="button" label="CONFIRM ORDER" styleClass="buy-button" ></p-button>
333
+                                    </div>
334
+                                </div>
335
+                            </div>
336
+                            <div class="order order-pro-plus" [ngClass]="{'selected-order': activeCard === 'pro-plus'}">
337
+                                <div class="grid col">
338
+                                    <div class="col-8">Tier - Pro+</div>
339
+                                    <div class="col-4 price">$50.00</div>
340
+                                    <div class="col-8">VAT (%18)</div>
341
+                                    <div class="col-4 price">$9.00</div>
342
+                                </div>
343
+                                <div class="grid col total">
344
+                                    <div class="col-8">Total</div>
345
+                                    <div class="col-4 price">$59.00</div>
346
+                                    <div class="col-12">
347
+                                        <p-button type="button" label="CONFIRM ORDER" styleClass="buy-button" ></p-button>
348
+                                    </div>
349
+                                </div>
350
+                            </div>
351
+                        </div>
352
+                    </div>
353
+                </div>
354
+
355
+
356
+            </div>
357
+        </div>
358
+    </div>
359
+</body>

+ 109
- 0
Angular/src/app/pages/app.wizard.component.ts 查看文件

@@ -0,0 +1,109 @@
1
+import {Component} from '@angular/core';
2
+import {SelectItem} from 'primeng/api';
3
+import {state, style, trigger} from '@angular/animations';
4
+
5
+@Component({
6
+    selector: 'app-wizard',
7
+    templateUrl: './app.wizard.component.html',
8
+    animations: [
9
+        trigger('tabBar', [
10
+            state('register', style({
11
+                width: '33.3333%',
12
+                left: '0'
13
+            })),
14
+            state('tier', style({
15
+                width: '33.3333%',
16
+                left: '33.3333%'
17
+            })),
18
+            state('payment', style({
19
+                width: '33.3333%',
20
+                left: '66.6667%'
21
+            }))
22
+        ])
23
+    ]
24
+})
25
+export class AppWizardComponent {
26
+
27
+    activeTab = 'register';
28
+
29
+    activeCard = '';
30
+
31
+    dropdownOptions1: SelectItem[];
32
+
33
+    dropdownOptions2: SelectItem[];
34
+
35
+    selectDropdownOptions1: any;
36
+
37
+    selectDropdownOptions2: any;
38
+
39
+    birthdate: Date;
40
+
41
+    checked = false;
42
+
43
+    radioButton1: string;
44
+
45
+    constructor() {
46
+        this.dropdownOptions1 = [
47
+            {label: 'Select Time Zone', value: null},
48
+            {label: 'UTC-12.00', value: {id: 1, name: 'UTC-12.00', code: '-12'}},
49
+            {label: 'UTC-11.00', value: {id: 2, name: 'UTC-11.00', code: '-11'}},
50
+            {label: 'UTC-10.00', value: {id: 3, name: 'UTC-10.00', code: '-10'}},
51
+            {label: 'UTC-09.30', value: {id: 4, name: 'UTC-09.30', code: '-93'}},
52
+            {label: 'UTC-09.00', value: {id: 5, name: 'UTC-09.00', code: '-09'}},
53
+            {label: 'UTC-08.00', value: {id: 6, name: 'UTC-08.00', code: '-08'}},
54
+            {label: 'UTC-07.00', value: {id: 7, name: 'UTC-07.00', code: '-07'}},
55
+            {label: 'UTC-06.00', value: {id: 8, name: 'UTC-06.00', code: '-06'}},
56
+            {label: 'UTC-05.00', value: {id: 9, name: 'UTC-05.00', code: '-05'}},
57
+            {label: 'UTC-04.00', value: {id: 10, name: 'UTC-04.00', code: '-04'}},
58
+            {label: 'UTC-03.30', value: {id: 11, name: 'UTC-03.30', code: '-33'}},
59
+            {label: 'UTC-03.00', value: {id: 12, name: 'UTC-03.00', code: '-03'}},
60
+            {label: 'UTC-02.00', value: {id: 13, name: 'UTC-02.00', code: '-02'}},
61
+            {label: 'UTC-01.00', value: {id: 14, name: 'UTC-01.00', code: '-01'}},
62
+            {label: 'UTC-+00.00', value: {id: 15, name: 'UTC-+00.00', code: '-00'}},
63
+            {label: 'UTC+01.00', value: {id: 16, name: 'UTC+01.00', code: '+01'}},
64
+            {label: 'UTC+02.00', value: {id: 17, name: 'UTC+02.00', code: '+02'}},
65
+            {label: 'UTC+03.00', value: {id: 18, name: 'UTC+03.00', code: '+03'}},
66
+            {label: 'UTC+03.30', value: {id: 19, name: 'UTC+03.30', code: '+33'}},
67
+            {label: 'UTC+04.00', value: {id: 20, name: 'UTC+04.00', code: '+04'}},
68
+            {label: 'UTC+04.30', value: {id: 21, name: 'UTC+04.30', code: '+43'}},
69
+            {label: 'UTC+05.00', value: {id: 22, name: 'UTC+05.00', code: '+05'}},
70
+            {label: 'UTC+05.30', value: {id: 23, name: 'UTC+05.30', code: '+53'}},
71
+            {label: 'UTC+05.45', value: {id: 24, name: 'UTC+05.45', code: '+54'}},
72
+            {label: 'UTC+06.00', value: {id: 25, name: 'UTC+06.00', code: '+06'}},
73
+            {label: 'UTC+06.30', value: {id: 26, name: 'UTC+06.30', code: '+63'}},
74
+            {label: 'UTC+07.00', value: {id: 27, name: 'UTC+07.00', code: '+07'}},
75
+            {label: 'UTC+08.00', value: {id: 28, name: 'UTC+08.00', code: '+08'}},
76
+            {label: 'UTC+08.45', value: {id: 29, name: 'UTC+08.45', code: '+84'}},
77
+            {label: 'UTC+09.00', value: {id: 30, name: 'UTC+09.00', code: '+09'}},
78
+            {label: 'UTC+09.30', value: {id: 31, name: 'UTC+09.30', code: '+93'}},
79
+            {label: 'UTC+10.00', value: {id: 32, name: 'UTC+10.00', code: '+10'}},
80
+            {label: 'UTC+10.30', value: {id: 33, name: 'UTC+10.30', code: '+13'}},
81
+            {label: 'UTC+11.00', value: {id: 34, name: 'UTC+01.00', code: '+11'}},
82
+            {label: 'UTC+12.00', value: {id: 35, name: 'UTC+01.00', code: '+12'}},
83
+            {label: 'UTC+12.45', value: {id: 36, name: 'UTC+01.00', code: '+24'}},
84
+            {label: 'UTC+13.00', value: {id: 37, name: 'UTC+01.00', code: '+13'}},
85
+            {label: 'UTC+14.00', value: {id: 38, name: 'UTC+01.00', code: '+14'}},
86
+        ];
87
+
88
+        this.dropdownOptions2 = [
89
+            {label: 'Where did you hear Ultima', value: null},
90
+            {label: 'Blogs', value: 'Blogs'},
91
+            {label: 'Google Ads', value: 'google'},
92
+            {label: 'Your Forum', value: 'prime-forum'},
93
+            {label: 'Youtube', value: 'Youtube'},
94
+            {label: 'Reddit', value: 'Reddit'},
95
+            {label: 'Events', value: 'Events'},
96
+            {label: 'Other', value: 'Other'}
97
+        ];
98
+    }
99
+
100
+    clickNext(step) {
101
+        this.activeTab = step;
102
+    }
103
+
104
+    selectTier(card) {
105
+        this.activeCard = card;
106
+        this.activeTab = 'payment';
107
+    }
108
+
109
+}

+ 1
- 0
Angular/src/app/pages/candidate/candidate-detail/candidate-detail.component.html 查看文件

@@ -0,0 +1 @@
1
+<p>candidate-detail works!</p>

+ 0
- 0
Angular/src/app/pages/candidate/candidate-detail/candidate-detail.component.scss 查看文件


+ 25
- 0
Angular/src/app/pages/candidate/candidate-detail/candidate-detail.component.spec.ts 查看文件

@@ -0,0 +1,25 @@
1
+import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { CandidateDetailComponent } from './candidate-detail.component';
4
+
5
+describe('CandidateDetailComponent', () => {
6
+  let component: CandidateDetailComponent;
7
+  let fixture: ComponentFixture<CandidateDetailComponent>;
8
+
9
+  beforeEach(async () => {
10
+    await TestBed.configureTestingModule({
11
+      declarations: [ CandidateDetailComponent ]
12
+    })
13
+    .compileComponents();
14
+  });
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(CandidateDetailComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 15
- 0
Angular/src/app/pages/candidate/candidate-detail/candidate-detail.component.ts 查看文件

@@ -0,0 +1,15 @@
1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-candidate-detail',
5
+  templateUrl: './candidate-detail.component.html',
6
+  styleUrls: ['./candidate-detail.component.scss']
7
+})
8
+export class CandidateDetailComponent implements OnInit {
9
+
10
+  constructor() { }
11
+
12
+  ngOnInit(): void {
13
+  }
14
+
15
+}

+ 38
- 0
Angular/src/app/pages/candidate/candidate-list/candidate-list.component.html 查看文件

@@ -0,0 +1,38 @@
1
+<div class="card">
2
+  <h5>Candidates List</h5>
3
+  <button [routerLink]="'/candidate/candidate-sidebar'" pButton pRipple type="button" label="Add" class="mr-2 mb-2"></button>
4
+  <p-table #dt  [value]="theCandidates" [paginator]="true" [rows]="5" [showCurrentPageReport]="true" responsiveLayout="scroll"
5
+      currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries" [rowsPerPageOptions]="[5,10,25,50]">
6
+      <ng-template pTemplate="header">
7
+          <tr>
8
+              <th>Id</th>
9
+              <th>First Name</th>
10
+              <th>Last Name</th>
11
+              <th>Emails</th>
12
+          </tr>
13
+      </ng-template>
14
+      <ng-template pTemplate="body" let-candidate>
15
+          <tr>
16
+              <td>{{candidate.id}}</td>
17
+              <td>{{candidate.firstname}}</td>
18
+              <td>{{candidate.lastname}}</td>
19
+              <td>
20
+                  <tr *ngFor="let ml of candidate.emails">
21
+                    <span>{{ml.email}}</span>
22
+                    <span> - {{ml.type}}</span>
23
+                  </tr>
24
+              </td>
25
+              <td>
26
+                <button pButton pRipple icon="pi pi-pencil" class="p-button-rounded p-button-success mr-2" (click)="editProduct(candidate)"></button>
27
+                <button pButton pRipple icon="pi pi-trash" class="p-button-rounded p-button-warning" (click)="deleteProduct(candidate)"></button>
28
+             </td>
29
+          </tr>
30
+      </ng-template>
31
+      <ng-template pTemplate="paginatorleft">
32
+        <span class="p-float-label">
33
+          <input type="text" class="w-full" pInputText>
34
+          <label>Search</label>
35
+        </span>
36
+      </ng-template>
37
+  </p-table>
38
+</div>

+ 201
- 0
Angular/src/app/pages/candidate/candidate-list/candidate-list.component.scss 查看文件

@@ -0,0 +1,201 @@
1
+:host ::ng-deep {
2
+    .p-paginator {
3
+        .p-paginator-current {
4
+            margin-left: auto;
5
+        }
6
+    }
7
+
8
+    .p-progressbar {
9
+        height: .5rem;
10
+        background-color: #D8DADC;
11
+
12
+        .p-progressbar-value {
13
+            background-color: #607D8B;
14
+        }
15
+    }
16
+
17
+    .table-header {
18
+        display: flex;
19
+        justify-content: space-between;
20
+    }
21
+
22
+    .p-calendar .p-datepicker {
23
+        min-width: 25rem;
24
+
25
+        td {
26
+            font-weight: 400;
27
+        }
28
+    }
29
+
30
+    .p-datatable.p-datatable-customers {
31
+        .p-datatable-header {
32
+            padding: 1rem;
33
+            text-align: left;
34
+            font-size: 1.5rem;
35
+        }
36
+
37
+        .p-paginator {
38
+            padding: 1rem;
39
+        }
40
+
41
+        .p-datatable-thead > tr > th {
42
+            text-align: left;
43
+        }
44
+
45
+        .p-dropdown-label:not(.p-placeholder) {
46
+            text-transform: uppercase;
47
+        }
48
+    }
49
+
50
+    .p-datatable.p-datatable-customers:not(.p-datatable-gridlines) {
51
+        .p-datatable-tbody > tr > td {
52
+            cursor: auto;
53
+        }
54
+    }
55
+
56
+    /* Responsive */
57
+    .p-datatable-customers .p-datatable-tbody > tr > td .p-column-title {
58
+        display: none;
59
+    }
60
+}
61
+
62
+.customer-badge {
63
+    border-radius: 2px;
64
+    padding: .25em .5rem;
65
+    text-transform: uppercase;
66
+    font-weight: 700;
67
+    font-size: 12px;
68
+    letter-spacing: .3px;
69
+
70
+    &.status-qualified {
71
+        background: #C8E6C9;
72
+        color: #256029;
73
+    }
74
+
75
+    &.status-unqualified {
76
+        background: #FFCDD2;
77
+        color: #C63737;
78
+    }
79
+
80
+    &.status-negotiation {
81
+        background: #FEEDAF;
82
+        color: #8A5340;
83
+    }
84
+
85
+    &.status-new {
86
+        background: #B3E5FC;
87
+        color: #23547B;
88
+    }
89
+
90
+    &.status-renewal {
91
+        background: #ECCFFF;
92
+        color: #694382;
93
+    }
94
+
95
+    &.status-proposal {
96
+        background: #FFD8B2;
97
+        color: #805B36;
98
+    }
99
+}
100
+
101
+.product-badge {
102
+    border-radius: 2px;
103
+    padding: .25em .5rem;
104
+    text-transform: uppercase;
105
+    font-weight: 700;
106
+    font-size: 12px;
107
+    letter-spacing: .3px;
108
+
109
+    &.status-instock {
110
+        background: #C8E6C9;
111
+        color: #256029;
112
+    }
113
+
114
+    &.status-outofstock {
115
+        background: #FFCDD2;
116
+        color: #C63737;
117
+    }
118
+
119
+    &.status-lowstock {
120
+        background: #FEEDAF;
121
+        color: #8A5340;
122
+    }
123
+}
124
+
125
+.order-badge {
126
+    border-radius: 2px;
127
+    padding: .25em .5rem;
128
+    text-transform: uppercase;
129
+    font-weight: 700;
130
+    font-size: 12px;
131
+    letter-spacing: .3px;
132
+
133
+    &.order-delivered {
134
+        background: #C8E6C9;
135
+        color: #256029;
136
+    }
137
+
138
+    &.order-cancelled {
139
+        background: #FFCDD2;
140
+        color: #C63737;
141
+    }
142
+
143
+    &.order-pending {
144
+        background: #FEEDAF;
145
+        color: #8A5340;
146
+    }
147
+
148
+    &.order-returned {
149
+        background: #ECCFFF;
150
+        color: #694382;
151
+    }
152
+}
153
+
154
+.global-filter-label {
155
+    font-size: 1rem;
156
+    font-weight: normal;
157
+
158
+    .p-float-label input:focus ~ label {
159
+        font-size: 12px;
160
+    }
161
+}
162
+
163
+@media screen and (max-width: 960px) {
164
+    :host ::ng-deep {
165
+        .p-datatable {
166
+            &.p-datatable-customers {
167
+                .p-datatable-thead > tr > th,
168
+                .p-datatable-tfoot > tr > td {
169
+                    display: none !important;
170
+                }
171
+
172
+                .p-datatable-tbody > tr {
173
+                    border-bottom: 1px solid var(--surface-d);
174
+
175
+                    > td {
176
+                        text-align: left;
177
+                        display: block;
178
+                        border: 0 none !important;
179
+                        width: 100% !important;
180
+                        float: left;
181
+                        clear: left;
182
+                        border: 0 none;
183
+
184
+                        .p-column-title {
185
+                            padding: .4rem;
186
+                            min-width: 30%;
187
+                            display: inline-block;
188
+                            margin: -.4rem 1rem -.4rem -.4rem;
189
+                            font-weight: bold;
190
+                        }
191
+
192
+                        .p-progressbar {
193
+                            margin-top: .5rem;
194
+                        }
195
+                    }
196
+                }
197
+            }
198
+        }
199
+    }
200
+
201
+}

+ 25
- 0
Angular/src/app/pages/candidate/candidate-list/candidate-list.component.spec.ts 查看文件

@@ -0,0 +1,25 @@
1
+import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+import { CandidateListComponent } from './candidate-list.component';
4
+
5
+describe('CandidateListComponent', () => {
6
+  let component: CandidateListComponent;
7
+  let fixture: ComponentFixture<CandidateListComponent>;
8
+
9
+  beforeEach(async () => {
10
+    await TestBed.configureTestingModule({
11
+      declarations: [ CandidateListComponent ]
12
+    })
13
+    .compileComponents();
14
+  });
15
+
16
+  beforeEach(() => {
17
+    fixture = TestBed.createComponent(CandidateListComponent);
18
+    component = fixture.componentInstance;
19
+    fixture.detectChanges();
20
+  });
21
+
22
+  it('should create', () => {
23
+    expect(component).toBeTruthy();
24
+  });
25
+});

+ 0
- 0
Angular/src/app/pages/candidate/candidate-list/candidate-list.component.ts 查看文件


部分文件因文件數量過多而無法顯示

Powered by TurnKey Linux.