Skip to content

Commit

Permalink
chore(release): release ng-devui-admin 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
huaweidevcloud committed Jul 13, 2021
1 parent cae27a0 commit dbe4f9a
Show file tree
Hide file tree
Showing 110 changed files with 3,055 additions and 723 deletions.
12 changes: 9 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": ["src/favicon.ico", "src/assets"],
"styles": [
"src/styles.scss",
"node_modules/ng-devui/devui.min.css",
"node_modules/@devui-design/icons/icomoon/devui-icon.css"
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down Expand Up @@ -60,7 +65,8 @@
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down
42 changes: 22 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-devui-admin",
"version": "1.1.0",
"version": "1.2.0",
"license": "MIT",
"description": "DevUI Admin based on Angular and DevUI components",
"repository": {
Expand All @@ -11,7 +11,7 @@
"ng": "ng",
"start": "ng serve --open --port 8001",
"build": "ng build",
"build:website": "ng build --prod --base-href /admin/ --deploy-url /admin/ --output-path dist/admin",
"build:website": "ng build --configuration production --base-href /admin/ --deploy-url /admin/ --output-path dist/admin",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
Expand All @@ -21,47 +21,49 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~11.2.10",
"@angular/cdk": "^11.2.6",
"@angular/common": "~11.2.10",
"@angular/compiler": "~11.2.10",
"@angular/core": "~11.2.10",
"@angular/forms": "~11.2.10",
"@angular/platform-browser": "~11.2.10",
"@angular/platform-browser-dynamic": "~11.2.10",
"@angular/router": "~11.2.10",
"@angular/animations": "~12.0.4",
"@angular/cdk": "^12.0.4",
"@angular/common": "~12.0.4",
"@angular/compiler": "~12.0.4",
"@angular/core": "~12.0.4",
"@angular/forms": "~12.0.4",
"@angular/platform-browser": "~12.0.4",
"@angular/platform-browser-dynamic": "~12.0.4",
"@angular/router": "~12.0.4",
"@devui-design/icons": "^1.2.0",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"color": "^3.1.3",
"echarts": "^5.1.1",
"ng-devui": "^11.1.0",
"ng-devui": "^12.0.0-beta.1",
"ng-packagr": "^12.0.5",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1102.0",
"@angular/cli": "~11.2.9",
"@angular/compiler-cli": "~11.2.10",
"@types/node": "^12.11.1",
"@angular-devkit/build-angular": "~12.0.4",
"@angular/cli": "~12.0.4",
"@angular/compiler-cli": "~12.0.4",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma": "~6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"shelljs": "^0.8.4",
"stylelint": "^13.13.0",
"stylelint-config-recommended-scss": "^4.2.0",
"stylelint-config-standard": "^22.0.0",
"stylelint-scss": "^3.19.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.0.2"
"typescript": "~4.2.4"
}
}
10 changes: 4 additions & 6 deletions src/app/@core/core.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
ModuleWithProviders,
NgModule,
Optional,
SkipSelf,
} from '@angular/core';
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
import { CommonModule } from '@angular/common';

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

const DATA_SERVICES = [
{ provide: CourseData, useClass: CourseService },
{ provide: GanttData, useClass: GanttDataService },
{ provide: ListData, useClass: ListDataService },
{ provide: WorkItemData, useClass: WorkItemService },
{ provide: WorkGroupData, useClass: WorkGroupService },
{ provide: NoticeData, useClass: NoticeDataService },
];

export const DEVUI_CORE_PROVIDERS = [
Expand Down
34 changes: 34 additions & 0 deletions src/app/@core/data/noticeData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Observable } from 'rxjs';

export interface Notification {
type: string;
title: string;
time: string;
icon: string;
id: string;
status: number;
}

export interface Message {
image: string;
title: string;
content: string;
time: string;
id: string;
status: number;
}

export interface Todo {
tagName: string;
tagType: string;
title: string;
memo: string;
id: string;
status: number;
}

export abstract class NoticeData {
abstract getNotifications(): Observable<Notification[]>;
abstract getMessages(): Observable<Message[]>;
abstract getTodos(): Observable<Todo[]>;
}
10 changes: 2 additions & 8 deletions src/app/@core/mock/mock-data.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@ import { ListDataService } from './list-data.service';
import { WorkItemService } from './work-item.service';
import { WorkGroupService } from './work-group.service';
import { EchartsService } from './echarts.service';
import { NoticeDataService } from './notice-data.service';

const SERVICES = [
CourseService,
GanttDataService,
ListDataService,
WorkItemService,
WorkGroupService,
EchartsService,
];
const SERVICES = [CourseService, GanttDataService, ListDataService, WorkItemService, WorkGroupService, EchartsService, NoticeDataService];

@NgModule({
imports: [CommonModule],
Expand Down
145 changes: 145 additions & 0 deletions src/app/@core/mock/notice-data.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
import { Injectable } from '@angular/core';
import { Observable, of as observableOf } from 'rxjs';
import { Notification, Message, Todo, NoticeData } from '../data/noticeData';

@Injectable()
export class NoticeDataService extends NoticeData {
private notifications: Notification[] = [
{
type: 'success',
title: '你提交的XXX申请已经通过',
time: '1天前',
icon: 'notice',
id: '1',
status: 0,
},
{
type: 'warning',
title: '你内推的人已经在走流程',
time: '2天前',
icon: 'message-2',
id: '2',
status: 0,
},
{
type: 'warning',
title: '2021年7月1日早有会议',
time: '3天前',
icon: 'message-2',
id: '3',
status: 0,
},
{
type: 'info',
title: '你提交的XXX申请已经通过',
time: '4天前',
icon: 'infomation',
id: '4',
status: 0,
},
{
type: 'info',
title: '你提交的XXX申请已经通过',
time: '5天前',
icon: 'infomation',
id: '5',
status: 0,
},
{
type: 'info',
title: '你提交的XXX申请已经通过',
time: '5天前',
icon: 'infomation',
id: '6',
status: 0,
},
];

private messages: Message[] = [
{
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
title: '来自XXX发件人',
content: '左侧头像为发信者的头像,收到的来自别人的未读信息',
time: '2天前',
id: '1',
status: 0,
},
{
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
title: '来自XXX',
content: '收到的来自别人的未读信息',
time: '2天前',
id: '2',
status: 0,
},
{
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
title: '来自XXX',
content: '收到的来自别人的未读信息',
time: '2天前',
id: '3',
status: 0,
},
{
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
title: '来自XXX',
content: '收到的来自别人的未读信息',
time: '2天前',
id: '4',
status: 0,
},
{
image: 'https://res.hc-cdn.com/x-roma-components/1.0.10/assets/devui/logo.svg',
title: '来自XXX',
content: '收到的来自别人的未读信息',
time: '2天前',
id: '5',
status: 0,
},
];

private todos: Todo[] = [
{
tagName: '进行中',
tagType: 'olivine-w98',
title: '参加可信考试',
memo: '一年内要通过考试,持证上岗',
id: '1',
status: 0,
},
{
tagName: '已逾期2天',
tagType: 'orange-w98',
title: 'Bug单处理',
memo: '有个bug单需要处理,来自SL的指派',
id: '2',
status: 0,
},
{
tagName: '待开始',
tagType: 'blue-w98',
title: '待办事项名称',
memo: '右侧为事项相关说明',
id: '3',
status: 0,
},
{
tagName: '逾期10天',
tagType: 'red-w98',
title: '待办事项名称',
memo: '对于该事项的描述',
id: '4',
status: 0,
},
];

getNotifications(): Observable<Notification[]> {
return observableOf(this.notifications);
}
getMessages(): Observable<Message[]> {
return observableOf(this.messages);
}
getTodos(): Observable<Todo[]> {
return observableOf(this.todos);
}
}
20 changes: 4 additions & 16 deletions src/app/@shared/components/admin-form/admin-form.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<form
dForm
[layout]="formConfig.layout"
[labelSize]="formConfig.labelSize"
(dSubmit)="submitPlanForm($event)"
>
<form dForm [layout]="formConfig.layout" [labelSize]="formConfig.labelSize" (dSubmit)="submitPlanForm($event)">
<d-form-item *ngFor="let item of formConfig.items">
<d-form-label [required]="item.required">{{ item.label }}:</d-form-label>
<d-form-control [extraInfo]="item.extraInfo">
Expand All @@ -17,16 +12,13 @@
/>
<d-select
*ngIf="item.type === 'select'"
appendToBody
[appendToBody]="true"
[options]="item.options"
[name]="item.prop"
[(ngModel)]="_formData[item.prop]"
[dValidateRules]="item.required ? item.rule : []"
></d-select>
<div
class="devui-input-group devui-dropdown-origin"
*ngIf="item.type === 'datePicker'"
>
<div class="devui-input-group devui-dropdown-origin" *ngIf="item.type === 'datePicker'">
<input
class="devui-input devui-form-control"
placeholder="y/MM/dd"
Expand All @@ -39,11 +31,7 @@
#datePicker1="datepicker"
[dValidateRules]="item.required ? item.rule : []"
/>
<div
*ngIf="selectedDate1"
class="devui-input-group-addon close-icon-wrapper"
(click)="datePicker1.clearAll()"
>
<div class="devui-input-group-addon close-icon-wrapper" (click)="datePicker1.clearAll()">
<i class="icon icon-close"></i>
</div>
<div class="devui-input-group-addon" (click)="datePicker1.toggle()">
Expand Down

0 comments on commit dbe4f9a

Please sign in to comment.