Skip to content

Commit c997e0f

Browse files
chore(release): release 13.1.0 (#214)
Co-authored-by: huaweidevcloud <[email protected]>
1 parent 3c43b91 commit c997e0f

File tree

414 files changed

+4981
-4273
lines changed

Some content is hidden

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

414 files changed

+4981
-4273
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Modern browsers and Internet Explorer 11+.
9797

9898
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
9999
| --------- | --------- | --------- | --------- | --------- |
100-
| Edge | last 2 versions| last 2 versions| last 2 versions| last 2 versions
100+
| Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
101101

102102
## Who use it
103103

README_zh_CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ ng serve --open
9999

100100
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera |
101101
| --------- | --------- | --------- | --------- | --------- |
102-
| Edge | last 2 versions| last 2 versions| last 2 versions| last 2 versions
102+
| Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions
103103

104104
## 谁在使用
105105

angular.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"highlight.js",
1919
"codemirror",
2020
"xss",
21-
"enquire.js"
21+
"enquire.js",
22+
"color"
2223
],
2324
"customWebpackConfig": {
2425
"path": "scripts/extra-webpack.config.js"

devui-commons/src/header/language-switch/language-switch.component.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { I18nService } from 'ng-devui/i18n';
12
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
23
import { DevuiCommonsService } from '../../devui-commons.service';
34
import { I18nUtil } from '../../i18n/i18n.util';
@@ -12,7 +13,10 @@ export class LanguageSwitchComponent implements OnInit {
1213
@Output() languageEvent = new EventEmitter<string>();
1314
currentLang: string;
1415

15-
constructor(private commonsService: DevuiCommonsService) { }
16+
constructor(
17+
private commonsService: DevuiCommonsService,
18+
private i18n: I18nService
19+
) { }
1620

1721
ngOnInit(): void {
1822
this.currentLang = I18nUtil.getCurrentLanguage();
@@ -22,6 +26,7 @@ export class LanguageSwitchComponent implements OnInit {
2226
this.currentLang = this.currentLang === 'zh-cn' ? 'en-us' : 'zh-cn';
2327
localStorage.setItem('lang', this.currentLang);
2428
this.languageEvent.emit(this.currentLang);
29+
this.i18n.toggleLang(this.currentLang);
2530
this.commonsService.broadcast('languageEvent', this.currentLang);
2631
}
2732
}

devui/accordion/accordion-list.component.ts

+4-23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
2-
Component, Host, HostBinding, Inject, Input, OnDestroy, OnInit,
2+
Component,
3+
forwardRef, Host, HostBinding, Inject, Input, OnDestroy, OnInit,
34
Optional, QueryList, SkipSelf, ViewChildren, ViewEncapsulation
45
} from '@angular/core';
56
import { expandCollapse, expandCollapseForDomDestroy } from 'ng-devui/utils';
@@ -17,31 +18,11 @@ import { AccordionMenuItem } from './accordion.type';
1718
preserveWhitespaces: false,
1819
providers: [{
1920
provide: ACCORDION_LIST,
20-
useExisting: AccordionListComponent
21+
useExisting: forwardRef(() => AccordionListComponent)
2122
}]
2223
})
2324
export class AccordionListComponent implements OnInit, OnDestroy {
2425

25-
// @HostBinding('class.open')
26-
// get open() {
27-
// return (this.keyOpen === undefined && this.accordion.autoOpenActiveMenu)
28-
// ? this.childActived
29-
// : this.keyOpen;
30-
// }
31-
// get keyOpen() {
32-
// return this.data && this.data[this.accordion.openKey];
33-
// }
34-
35-
// get children() {
36-
// return this.data && this.data[this.accordion.childrenKey];
37-
// }
38-
// get childActived() {
39-
// return this.routerLinkActived || this.hasActiveChildren;
40-
// }
41-
42-
// get showAnimate() {
43-
// return this.accordion.showAnimation;
44-
// }
4526
constructor(@Optional() @Host() @SkipSelf() @Inject(ACCORDION_MENU) private parentComponent: any,
4627
@Inject(ACCORDION) private accordion: any) {}
4728
@HostBinding('class.devui-accordion-show-animate') get animateState() {
@@ -113,7 +94,7 @@ export class AccordionListComponent implements OnInit, OnDestroy {
11394
@Input() parent: AccordionMenuItem;
11495
@ViewChildren(ACCORDION_MENU) accordionMenuQueryList: QueryList<any>;
11596
@ViewChildren(AccordionItemRouterlinkComponent) accordionItemRouterlinkQueryList: QueryList<AccordionItemRouterlinkComponent>;
116-
6;
97+
6;
11798
ngOnInit(): void {
11899
if (this.parentComponent) {
119100
setTimeout(() => {this.parentComponent.accordionListFromView = this; });

devui/accordion/accordion-menu.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, HostBinding, Inject, ViewEncapsulation } from '@angular/core';
1+
import { Component, forwardRef, HostBinding, Inject, ViewEncapsulation } from '@angular/core';
22
import { AccordionBaseComponent } from './accordion-base-component.class';
33
import { ACCORDION_MENU } from './accordion-menu-token';
44
import { ACCORDION } from './accordion-token';
@@ -10,7 +10,7 @@ import { AccordionBaseMenu, AccordionMenuItem } from './accordion.type';
1010
preserveWhitespaces: false,
1111
providers: [{
1212
provide: ACCORDION_MENU,
13-
useExisting: AccordionMenuComponent
13+
useExisting: forwardRef(() => AccordionMenuComponent)
1414
}]
1515
})
1616
export class AccordionMenuComponent extends AccordionBaseComponent<AccordionBaseMenu<AccordionMenuItem>> {

devui/accordion/accordion.component.scss

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import '../style/mixins/index';
21
@import '../style/theme/color';
32
@import '../style/theme/shadow';
43
@import '../style/theme/corner';

devui/accordion/accordion.component.ts

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, TemplateRef } from '@angular/core';
1+
import {
2+
Component,
3+
EventEmitter,
4+
forwardRef,
5+
Input,
6+
OnChanges,
7+
OnDestroy,
8+
OnInit,
9+
Output,
10+
SimpleChanges,
11+
TemplateRef
12+
} from '@angular/core';
213
import { I18nInterface, I18nService } from 'ng-devui/i18n';
314
import { DevConfigService, WithConfig } from 'ng-devui/utils/globalConfig';
415
import { Subscription } from 'rxjs';
@@ -11,7 +22,7 @@ import { AccordionItemClickEvent, AccordionMenuToggleEvent, AccordionMenuType, A
1122
preserveWhitespaces: false,
1223
providers: [{
1324
provide: ACCORDION,
14-
useExisting: AccordionComponent
25+
useExisting: forwardRef(() => AccordionComponent)
1526
}]
1627
})
1728
export class AccordionComponent implements AccordionOptions, OnChanges, OnInit, OnDestroy {

devui/accordion/demo/accordion-demo.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="devui-demo-container" dAnchorBox dAnchorHashSupport [view]="{ top: 180, bottom: 0 }">
1+
<div class="devui-demo-container" style="padding-left: 4px" dAnchorBox dAnchorHashSupport [view]="{ top: 180, bottom: 0 }">
22
<d-demo-nav [navItems]="navItems"></d-demo-nav>
33
<div [dAnchor]="'basic-usage'" class="devui-demo-example">
44
<div class="devui-demo-title">{{ 'components.accordion.basicDemo.title' | translate }}</div>
@@ -24,7 +24,7 @@
2424
<d-codebox id="accordion-demo-template" [sourceData]="AccordionDemoTemplate">
2525
<d-template demo></d-template>
2626
</d-codebox>
27-
<div class="devui-demo-text">{{ 'components.accordion.innerListTemplateDemo.description' | translate }}</div>
27+
<div class="devui-demo-text" style="margin-top: 20px">{{ 'components.accordion.innerListTemplateDemo.description' | translate }}</div>
2828
<d-codebox id="accordion-demo-inner-list-template" [sourceData]="AccordionDemoInnerListTemplate">
2929
<d-inner-list-template demo></d-inner-list-template>
3030
</d-codebox>

devui/accordion/doc/api-cn.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { AccordionModule } from 'ng-devui/accordion';
3939
| autoOpenActiveMenu | `boolean` | false | 可选,是否自动展开带有活跃子项的菜单 | [复合层级和自动展开](demo#compound-level-and-auto-expand) |
4040
| accordionType | `'normal'\|'embed'` | 'normal' | 可选,菜单形式是普通(带阴影)还是内嵌(不带阴影) | [基本用法](demo#basic-usage) |
4141
| showAnimation | `boolean` | true | 可选,是否展示动画 | [内置路由和链接类型](demo#use-built-in-routing-and-link-types) ||
42+
| showNoContent | `boolean` | true | 可选,没有内容的时候是否显示没有数据 | | |
4243

4344
### d-accordion 事件
4445

devui/accordion/doc/api-en.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ On the page:
3939
| autoOpenActiveMenu | `boolean` | false | Optional. Whether to automatically expand menus with active subitems | [Composite Hierarchy and Auto Expand](demo#compound-level-and-auto-expand) |
4040
| accordionType | `normal ' \| 'embed'` | 'normal' | Optional. The menu format is common (with shadow) or embedded (without shadow). | [Basic usage](demo#basic-usage) |
4141
| showAnimation | `boolean` | true | Optional. Indicating whether to display animations. | [Built-in route and link type](demo#use-built-in-routing-and-link-types) ||
42+
| showNoContent | `boolean` | true | Optional. Whether to display no data when there is no content. | | |
4243

4344
### d-accordion event
4445

devui/accordion/public-api.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
export * from './accordion.module';
2-
export * from './accordion.component';
31
export * from './accordion-base-component.class';
42
export * from './accordion-base-item-component.class';
53
export * from './accordion-base-link-component.class';
64
export * from './accordion-item-hreflink.component';
75
export * from './accordion-item-routerlink.component';
86
export * from './accordion-item.component';
7+
export * from './accordion-list-token';
98
export * from './accordion-list.component';
9+
export * from './accordion-menu-token';
1010
export * from './accordion-menu.component';
11+
export * from './accordion-token';
12+
export * from './accordion.component';
13+
export * from './accordion.module';
1114
export * from './accordion.type';

devui/alert/alert.component.scss

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import '../style/mixins/index';
21
@import '../style/theme/color';
32
@import '../style/theme/shadow';
43
@import '../style/theme/corner';

devui/alert/alert.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ export class AlertComponent {
1717
@Input() type: AlertType = 'info';
1818
@Input() cssClass: string;
1919
@Input() closeable = true;
20+
/**
21+
* @deprecated
22+
*/
2023
@Input() content: HTMLElement | string;
2124
@Input() showIcon = true;
2225
@Output() closeEvent = new EventEmitter<AlertComponent>();

devui/auto-complete/auto-complete-popup.component.scss

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import '../style/mixins/index';
21
@import '../style/theme/color';
32

43
.devui-dropdown-menu {

devui/auto-complete/auto-complete-popup.component.theme.scss

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@import '../style/theme/color';
2-
@import '../style/mixins/index';
32

43
.active {
54
background: $devui-list-item-hover-bg;

devui/auto-complete/auto-complete-popup.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ export class AutoCompletePopupComponent implements ControlValueAccessor {
2828
@Input() isOpen: boolean;
2929
@Input() term: string;
3030
@Input() popTipsText: string;
31+
/**
32+
* @deprecated
33+
*/
3134
@Input() overview: string;
3235
@Input() itemTemplate: TemplateRef<any>;
3336
@Input() noResultItemTemplate: TemplateRef<any>;

devui/auto-complete/auto-complete.directive.ts

+15
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,14 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
4646
@HostBinding('attr.autocapitalize') autocapitalize = 'off';
4747
@HostBinding('attr.autocorrect') autocorrect = 'off';
4848
@Input() disabled: boolean;
49+
/**
50+
* @deprecated
51+
*/
4952
@Input() cssClass: string;
5053
@Input() delay = 300;
54+
/**
55+
* @deprecated
56+
*/
5157
@Input() minLength: number;
5258
@Input() itemTemplate: TemplateRef<any>;
5359
@Input() noResultItemTemplate: TemplateRef<any>;
@@ -78,6 +84,9 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
7884
@Input() source: any[];
7985
@Input() valueParser: (item: any) => any;
8086
@Input() searchFn: (term: string, target?: AutoCompleteDirective) => Observable<any[]>;
87+
/**
88+
* @deprecated
89+
*/
8190
@Input() dropdown: boolean;
8291
@Input() maxHeight = 300;
8392
@Input() disabledKey: string;
@@ -90,7 +99,11 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
9099
@Output() loadMore = new EventEmitter<any>();
91100
@Output() selectValue = new EventEmitter<any>();
92101
@Output() transInputFocusEmit = new EventEmitter<any>(); // input状态传给父组件函数
102+
/**
103+
* @deprecated
104+
*/
93105
@Output() changeDropDownStatus = new EventEmitter<any>();
106+
@Output() toggleChange = new EventEmitter<any>();
94107
KEYBOARD_EVENT_NOT_REFRESH = ['escape', 'enter', 'arrowup', 'arrowdown', /* ie 10 edge */ 'esc', 'up', 'down'];
95108
popupRef: ComponentRef<AutoCompletePopupComponent>;
96109

@@ -287,6 +300,7 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
287300
this.popupRef.instance.disabled = this.disabled;
288301
addClassToOrigin(this.elementRef);
289302
this.changeDropDownStatus.emit(true);
303+
this.toggleChange.emit(true);
290304
}
291305

292306
writeValue(obj): void {
@@ -408,6 +422,7 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
408422
this.popupRef.instance.isOpen = false;
409423
removeClassFromOrigin(this.elementRef);
410424
this.changeDropDownStatus.emit(false);
425+
this.toggleChange.emit(false);
411426
}
412427
}
413428

0 commit comments

Comments
 (0)