Skip to content

Commit dbe4f9a

Browse files
chore(release): release ng-devui-admin 1.2.0
1 parent cae27a0 commit dbe4f9a

File tree

110 files changed

+3055
-723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+3055
-723
lines changed

angular.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,19 @@
2222
"main": "src/main.ts",
2323
"polyfills": "src/polyfills.ts",
2424
"tsConfig": "tsconfig.app.json",
25-
"aot": true,
2625
"assets": ["src/favicon.ico", "src/assets"],
2726
"styles": [
2827
"src/styles.scss",
2928
"node_modules/ng-devui/devui.min.css",
3029
"node_modules/@devui-design/icons/icomoon/devui-icon.css"
3130
],
32-
"scripts": []
31+
"scripts": [],
32+
"vendorChunk": true,
33+
"extractLicenses": false,
34+
"buildOptimizer": false,
35+
"sourceMap": true,
36+
"optimization": false,
37+
"namedChunks": true
3338
},
3439
"configurations": {
3540
"production": {
@@ -60,7 +65,8 @@
6065
}
6166
]
6267
}
63-
}
68+
},
69+
"defaultConfiguration": ""
6470
},
6571
"serve": {
6672
"builder": "@angular-devkit/build-angular:dev-server",

package.json

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng-devui-admin",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"license": "MIT",
55
"description": "DevUI Admin based on Angular and DevUI components",
66
"repository": {
@@ -11,7 +11,7 @@
1111
"ng": "ng",
1212
"start": "ng serve --open --port 8001",
1313
"build": "ng build",
14-
"build:website": "ng build --prod --base-href /admin/ --deploy-url /admin/ --output-path dist/admin",
14+
"build:website": "ng build --configuration production --base-href /admin/ --deploy-url /admin/ --output-path dist/admin",
1515
"test": "ng test",
1616
"lint": "ng lint",
1717
"e2e": "ng e2e",
@@ -21,47 +21,49 @@
2121
},
2222
"private": true,
2323
"dependencies": {
24-
"@angular/animations": "~11.2.10",
25-
"@angular/cdk": "^11.2.6",
26-
"@angular/common": "~11.2.10",
27-
"@angular/compiler": "~11.2.10",
28-
"@angular/core": "~11.2.10",
29-
"@angular/forms": "~11.2.10",
30-
"@angular/platform-browser": "~11.2.10",
31-
"@angular/platform-browser-dynamic": "~11.2.10",
32-
"@angular/router": "~11.2.10",
24+
"@angular/animations": "~12.0.4",
25+
"@angular/cdk": "^12.0.4",
26+
"@angular/common": "~12.0.4",
27+
"@angular/compiler": "~12.0.4",
28+
"@angular/core": "~12.0.4",
29+
"@angular/forms": "~12.0.4",
30+
"@angular/platform-browser": "~12.0.4",
31+
"@angular/platform-browser-dynamic": "~12.0.4",
32+
"@angular/router": "~12.0.4",
3333
"@devui-design/icons": "^1.2.0",
3434
"@ngx-translate/core": "^13.0.0",
3535
"@ngx-translate/http-loader": "^6.0.0",
3636
"color": "^3.1.3",
3737
"echarts": "^5.1.1",
38-
"ng-devui": "^11.1.0",
38+
"ng-devui": "^12.0.0-beta.1",
39+
"ng-packagr": "^12.0.5",
3940
"rxjs": "~6.6.0",
4041
"tslib": "^2.0.0",
41-
"zone.js": "~0.10.2"
42+
"zone.js": "~0.11.4"
4243
},
4344
"devDependencies": {
44-
"@angular-devkit/build-angular": "~0.1102.0",
45-
"@angular/cli": "~11.2.9",
46-
"@angular/compiler-cli": "~11.2.10",
47-
"@types/node": "^12.11.1",
45+
"@angular-devkit/build-angular": "~12.0.4",
46+
"@angular/cli": "~12.0.4",
47+
"@angular/compiler-cli": "~12.0.4",
4848
"@types/jasmine": "~3.5.0",
4949
"@types/jasminewd2": "~2.0.3",
50+
"@types/node": "^12.11.1",
5051
"codelyzer": "^6.0.0",
5152
"jasmine-core": "~3.6.0",
5253
"jasmine-spec-reporter": "~5.0.0",
53-
"karma": "~5.0.0",
54+
"karma": "~6.3.4",
5455
"karma-chrome-launcher": "~3.1.0",
5556
"karma-coverage-istanbul-reporter": "~3.0.2",
5657
"karma-jasmine": "~4.0.0",
5758
"karma-jasmine-html-reporter": "^1.5.0",
59+
"protractor": "~7.0.0",
60+
"shelljs": "^0.8.4",
5861
"stylelint": "^13.13.0",
5962
"stylelint-config-recommended-scss": "^4.2.0",
6063
"stylelint-config-standard": "^22.0.0",
6164
"stylelint-scss": "^3.19.0",
62-
"protractor": "~7.0.0",
6365
"ts-node": "~8.3.0",
6466
"tslint": "~6.1.0",
65-
"typescript": "~4.0.2"
67+
"typescript": "~4.2.4"
6668
}
6769
}

src/app/@core/core.module.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
import {
2-
ModuleWithProviders,
3-
NgModule,
4-
Optional,
5-
SkipSelf,
6-
} from '@angular/core';
1+
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
72
import { CommonModule } from '@angular/common';
83

94
import { throwIfAlreadyLoaded } from './module-import-guard';
@@ -22,13 +17,16 @@ import { WorkGroupData } from './data/work-group';
2217
import { WorkGroupService } from './mock/work-group.service';
2318
import { AuthGuardService } from './services/auth-guard-service.guard';
2419
import { CustomThemeService } from './services/custom-theme.service';
20+
import { NoticeData } from './data/noticeData';
21+
import { NoticeDataService } from './mock/notice-data.service';
2522

2623
const DATA_SERVICES = [
2724
{ provide: CourseData, useClass: CourseService },
2825
{ provide: GanttData, useClass: GanttDataService },
2926
{ provide: ListData, useClass: ListDataService },
3027
{ provide: WorkItemData, useClass: WorkItemService },
3128
{ provide: WorkGroupData, useClass: WorkGroupService },
29+
{ provide: NoticeData, useClass: NoticeDataService },
3230
];
3331

3432
export const DEVUI_CORE_PROVIDERS = [

src/app/@core/data/noticeData.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Observable } from 'rxjs';
2+
3+
export interface Notification {
4+
type: string;
5+
title: string;
6+
time: string;
7+
icon: string;
8+
id: string;
9+
status: number;
10+
}
11+
12+
export interface Message {
13+
image: string;
14+
title: string;
15+
content: string;
16+
time: string;
17+
id: string;
18+
status: number;
19+
}
20+
21+
export interface Todo {
22+
tagName: string;
23+
tagType: string;
24+
title: string;
25+
memo: string;
26+
id: string;
27+
status: number;
28+
}
29+
30+
export abstract class NoticeData {
31+
abstract getNotifications(): Observable<Notification[]>;
32+
abstract getMessages(): Observable<Message[]>;
33+
abstract getTodos(): Observable<Todo[]>;
34+
}

src/app/@core/mock/mock-data.module.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@ import { ListDataService } from './list-data.service';
66
import { WorkItemService } from './work-item.service';
77
import { WorkGroupService } from './work-group.service';
88
import { EchartsService } from './echarts.service';
9+
import { NoticeDataService } from './notice-data.service';
910

10-
const SERVICES = [
11-
CourseService,
12-
GanttDataService,
13-
ListDataService,
14-
WorkItemService,
15-
WorkGroupService,
16-
EchartsService,
17-
];
11+
const SERVICES = [CourseService, GanttDataService, ListDataService, WorkItemService, WorkGroupService, EchartsService, NoticeDataService];
1812

1913
@NgModule({
2014
imports: [CommonModule],
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
import { Injectable } from '@angular/core';
2+
import { Observable, of as observableOf } from 'rxjs';
3+
import { Notification, Message, Todo, NoticeData } from '../data/noticeData';
4+
5+
@Injectable()
6+
export class NoticeDataService extends NoticeData {
7+
private notifications: Notification[] = [
8+
{
9+
type: 'success',
10+
title: '你提交的XXX申请已经通过',
11+
time: '1天前',
12+
icon: 'notice',
13+
id: '1',
14+
status: 0,
15+
},
16+
{
17+
type: 'warning',
18+
title: '你内推的人已经在走流程',
19+
time: '2天前',
20+
icon: 'message-2',
21+
id: '2',
22+
status: 0,
23+
},
24+
{
25+
type: 'warning',
26+
title: '2021年7月1日早有会议',
27+
time: '3天前',
28+
icon: 'message-2',
29+
id: '3',
30+
status: 0,
31+
},
32+
{
33+
type: 'info',
34+
title: '你提交的XXX申请已经通过',
35+
time: '4天前',
36+
icon: 'infomation',
37+
id: '4',
38+
status: 0,
39+
},
40+
{
41+
type: 'info',
42+
title: '你提交的XXX申请已经通过',
43+
time: '5天前',
44+
icon: 'infomation',
45+
id: '5',
46+
status: 0,
47+
},
48+
{
49+
type: 'info',
50+
title: '你提交的XXX申请已经通过',
51+
time: '5天前',
52+
icon: 'infomation',
53+
id: '6',
54+
status: 0,
55+
},
56+
];
57+
58+
private messages: Message[] = [
59+
{
60+
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
61+
title: '来自XXX发件人',
62+
content: '左侧头像为发信者的头像,收到的来自别人的未读信息',
63+
time: '2天前',
64+
id: '1',
65+
status: 0,
66+
},
67+
{
68+
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
69+
title: '来自XXX',
70+
content: '收到的来自别人的未读信息',
71+
time: '2天前',
72+
id: '2',
73+
status: 0,
74+
},
75+
{
76+
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
77+
title: '来自XXX',
78+
content: '收到的来自别人的未读信息',
79+
time: '2天前',
80+
id: '3',
81+
status: 0,
82+
},
83+
{
84+
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
85+
title: '来自XXX',
86+
content: '收到的来自别人的未读信息',
87+
time: '2天前',
88+
id: '4',
89+
status: 0,
90+
},
91+
{
92+
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
93+
title: '来自XXX',
94+
content: '收到的来自别人的未读信息',
95+
time: '2天前',
96+
id: '5',
97+
status: 0,
98+
},
99+
];
100+
101+
private todos: Todo[] = [
102+
{
103+
tagName: '进行中',
104+
tagType: 'olivine-w98',
105+
title: '参加可信考试',
106+
memo: '一年内要通过考试,持证上岗',
107+
id: '1',
108+
status: 0,
109+
},
110+
{
111+
tagName: '已逾期2天',
112+
tagType: 'orange-w98',
113+
title: 'Bug单处理',
114+
memo: '有个bug单需要处理,来自SL的指派',
115+
id: '2',
116+
status: 0,
117+
},
118+
{
119+
tagName: '待开始',
120+
tagType: 'blue-w98',
121+
title: '待办事项名称',
122+
memo: '右侧为事项相关说明',
123+
id: '3',
124+
status: 0,
125+
},
126+
{
127+
tagName: '逾期10天',
128+
tagType: 'red-w98',
129+
title: '待办事项名称',
130+
memo: '对于该事项的描述',
131+
id: '4',
132+
status: 0,
133+
},
134+
];
135+
136+
getNotifications(): Observable<Notification[]> {
137+
return observableOf(this.notifications);
138+
}
139+
getMessages(): Observable<Message[]> {
140+
return observableOf(this.messages);
141+
}
142+
getTodos(): Observable<Todo[]> {
143+
return observableOf(this.todos);
144+
}
145+
}

src/app/@shared/components/admin-form/admin-form.component.html

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
<form
2-
dForm
3-
[layout]="formConfig.layout"
4-
[labelSize]="formConfig.labelSize"
5-
(dSubmit)="submitPlanForm($event)"
6-
>
1+
<form dForm [layout]="formConfig.layout" [labelSize]="formConfig.labelSize" (dSubmit)="submitPlanForm($event)">
72
<d-form-item *ngFor="let item of formConfig.items">
83
<d-form-label [required]="item.required">{{ item.label }}:</d-form-label>
94
<d-form-control [extraInfo]="item.extraInfo">
@@ -17,16 +12,13 @@
1712
/>
1813
<d-select
1914
*ngIf="item.type === 'select'"
20-
appendToBody
15+
[appendToBody]="true"
2116
[options]="item.options"
2217
[name]="item.prop"
2318
[(ngModel)]="_formData[item.prop]"
2419
[dValidateRules]="item.required ? item.rule : []"
2520
></d-select>
26-
<div
27-
class="devui-input-group devui-dropdown-origin"
28-
*ngIf="item.type === 'datePicker'"
29-
>
21+
<div class="devui-input-group devui-dropdown-origin" *ngIf="item.type === 'datePicker'">
3022
<input
3123
class="devui-input devui-form-control"
3224
placeholder="y/MM/dd"
@@ -39,11 +31,7 @@
3931
#datePicker1="datepicker"
4032
[dValidateRules]="item.required ? item.rule : []"
4133
/>
42-
<div
43-
*ngIf="selectedDate1"
44-
class="devui-input-group-addon close-icon-wrapper"
45-
(click)="datePicker1.clearAll()"
46-
>
34+
<div class="devui-input-group-addon close-icon-wrapper" (click)="datePicker1.clearAll()">
4735
<i class="icon icon-close"></i>
4836
</div>
4937
<div class="devui-input-group-addon" (click)="datePicker1.toggle()">

0 commit comments

Comments
 (0)