Skip to content

Commit

Permalink
chore(release): release 13.1.0 (#214)
Browse files Browse the repository at this point in the history
Co-authored-by: huaweidevcloud <[email protected]>
  • Loading branch information
wangyaju and huaweidevcloud authored Apr 12, 2022
1 parent 3c43b91 commit c997e0f
Show file tree
Hide file tree
Showing 414 changed files with 4,981 additions and 4,273 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Modern browsers and Internet Explorer 11+.

| [<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 |
| --------- | --------- | --------- | --------- | --------- |
| Edge | last 2 versions| last 2 versions| last 2 versions| last 2 versions
| Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions

## Who use it

Expand Down
2 changes: 1 addition & 1 deletion README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ng serve --open

| [<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 |
| --------- | --------- | --------- | --------- | --------- |
| Edge | last 2 versions| last 2 versions| last 2 versions| last 2 versions
| Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions

## 谁在使用

Expand Down
3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"highlight.js",
"codemirror",
"xss",
"enquire.js"
"enquire.js",
"color"
],
"customWebpackConfig": {
"path": "scripts/extra-webpack.config.js"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { I18nService } from 'ng-devui/i18n';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { DevuiCommonsService } from '../../devui-commons.service';
import { I18nUtil } from '../../i18n/i18n.util';
Expand All @@ -12,7 +13,10 @@ export class LanguageSwitchComponent implements OnInit {
@Output() languageEvent = new EventEmitter<string>();
currentLang: string;

constructor(private commonsService: DevuiCommonsService) { }
constructor(
private commonsService: DevuiCommonsService,
private i18n: I18nService
) { }

ngOnInit(): void {
this.currentLang = I18nUtil.getCurrentLanguage();
Expand All @@ -22,6 +26,7 @@ export class LanguageSwitchComponent implements OnInit {
this.currentLang = this.currentLang === 'zh-cn' ? 'en-us' : 'zh-cn';
localStorage.setItem('lang', this.currentLang);
this.languageEvent.emit(this.currentLang);
this.i18n.toggleLang(this.currentLang);
this.commonsService.broadcast('languageEvent', this.currentLang);
}
}
27 changes: 4 additions & 23 deletions devui/accordion/accordion-list.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
Component, Host, HostBinding, Inject, Input, OnDestroy, OnInit,
Component,
forwardRef, Host, HostBinding, Inject, Input, OnDestroy, OnInit,
Optional, QueryList, SkipSelf, ViewChildren, ViewEncapsulation
} from '@angular/core';
import { expandCollapse, expandCollapseForDomDestroy } from 'ng-devui/utils';
Expand All @@ -17,31 +18,11 @@ import { AccordionMenuItem } from './accordion.type';
preserveWhitespaces: false,
providers: [{
provide: ACCORDION_LIST,
useExisting: AccordionListComponent
useExisting: forwardRef(() => AccordionListComponent)
}]
})
export class AccordionListComponent implements OnInit, OnDestroy {

// @HostBinding('class.open')
// get open() {
// return (this.keyOpen === undefined && this.accordion.autoOpenActiveMenu)
// ? this.childActived
// : this.keyOpen;
// }
// get keyOpen() {
// return this.data && this.data[this.accordion.openKey];
// }

// get children() {
// return this.data && this.data[this.accordion.childrenKey];
// }
// get childActived() {
// return this.routerLinkActived || this.hasActiveChildren;
// }

// get showAnimate() {
// return this.accordion.showAnimation;
// }
constructor(@Optional() @Host() @SkipSelf() @Inject(ACCORDION_MENU) private parentComponent: any,
@Inject(ACCORDION) private accordion: any) {}
@HostBinding('class.devui-accordion-show-animate') get animateState() {
Expand Down Expand Up @@ -113,7 +94,7 @@ export class AccordionListComponent implements OnInit, OnDestroy {
@Input() parent: AccordionMenuItem;
@ViewChildren(ACCORDION_MENU) accordionMenuQueryList: QueryList<any>;
@ViewChildren(AccordionItemRouterlinkComponent) accordionItemRouterlinkQueryList: QueryList<AccordionItemRouterlinkComponent>;
6;
6;
ngOnInit(): void {
if (this.parentComponent) {
setTimeout(() => {this.parentComponent.accordionListFromView = this; });
Expand Down
4 changes: 2 additions & 2 deletions devui/accordion/accordion-menu.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, HostBinding, Inject, ViewEncapsulation } from '@angular/core';
import { Component, forwardRef, HostBinding, Inject, ViewEncapsulation } from '@angular/core';
import { AccordionBaseComponent } from './accordion-base-component.class';
import { ACCORDION_MENU } from './accordion-menu-token';
import { ACCORDION } from './accordion-token';
Expand All @@ -10,7 +10,7 @@ import { AccordionBaseMenu, AccordionMenuItem } from './accordion.type';
preserveWhitespaces: false,
providers: [{
provide: ACCORDION_MENU,
useExisting: AccordionMenuComponent
useExisting: forwardRef(() => AccordionMenuComponent)
}]
})
export class AccordionMenuComponent extends AccordionBaseComponent<AccordionBaseMenu<AccordionMenuItem>> {
Expand Down
1 change: 0 additions & 1 deletion devui/accordion/accordion.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../style/mixins/index';
@import '../style/theme/color';
@import '../style/theme/shadow';
@import '../style/theme/corner';
Expand Down
15 changes: 13 additions & 2 deletions devui/accordion/accordion.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, TemplateRef } from '@angular/core';
import {
Component,
EventEmitter,
forwardRef,
Input,
OnChanges,
OnDestroy,
OnInit,
Output,
SimpleChanges,
TemplateRef
} from '@angular/core';
import { I18nInterface, I18nService } from 'ng-devui/i18n';
import { DevConfigService, WithConfig } from 'ng-devui/utils/globalConfig';
import { Subscription } from 'rxjs';
Expand All @@ -11,7 +22,7 @@ import { AccordionItemClickEvent, AccordionMenuToggleEvent, AccordionMenuType, A
preserveWhitespaces: false,
providers: [{
provide: ACCORDION,
useExisting: AccordionComponent
useExisting: forwardRef(() => AccordionComponent)
}]
})
export class AccordionComponent implements AccordionOptions, OnChanges, OnInit, OnDestroy {
Expand Down
4 changes: 2 additions & 2 deletions devui/accordion/demo/accordion-demo.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="devui-demo-container" dAnchorBox dAnchorHashSupport [view]="{ top: 180, bottom: 0 }">
<div class="devui-demo-container" style="padding-left: 4px" dAnchorBox dAnchorHashSupport [view]="{ top: 180, bottom: 0 }">
<d-demo-nav [navItems]="navItems"></d-demo-nav>
<div [dAnchor]="'basic-usage'" class="devui-demo-example">
<div class="devui-demo-title">{{ 'components.accordion.basicDemo.title' | translate }}</div>
Expand All @@ -24,7 +24,7 @@
<d-codebox id="accordion-demo-template" [sourceData]="AccordionDemoTemplate">
<d-template demo></d-template>
</d-codebox>
<div class="devui-demo-text">{{ 'components.accordion.innerListTemplateDemo.description' | translate }}</div>
<div class="devui-demo-text" style="margin-top: 20px">{{ 'components.accordion.innerListTemplateDemo.description' | translate }}</div>
<d-codebox id="accordion-demo-inner-list-template" [sourceData]="AccordionDemoInnerListTemplate">
<d-inner-list-template demo></d-inner-list-template>
</d-codebox>
Expand Down
1 change: 1 addition & 0 deletions devui/accordion/doc/api-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { AccordionModule } from 'ng-devui/accordion';
| autoOpenActiveMenu | `boolean` | false | 可选,是否自动展开带有活跃子项的菜单 | [复合层级和自动展开](demo#compound-level-and-auto-expand) |
| accordionType | `'normal'\|'embed'` | 'normal' | 可选,菜单形式是普通(带阴影)还是内嵌(不带阴影) | [基本用法](demo#basic-usage) |
| showAnimation | `boolean` | true | 可选,是否展示动画 | [内置路由和链接类型](demo#use-built-in-routing-and-link-types) ||
| showNoContent | `boolean` | true | 可选,没有内容的时候是否显示没有数据 | | |

### d-accordion 事件

Expand Down
1 change: 1 addition & 0 deletions devui/accordion/doc/api-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ On the page:
| autoOpenActiveMenu | `boolean` | false | Optional. Whether to automatically expand menus with active subitems | [Composite Hierarchy and Auto Expand](demo#compound-level-and-auto-expand) |
| accordionType | `normal ' \| 'embed'` | 'normal' | Optional. The menu format is common (with shadow) or embedded (without shadow). | [Basic usage](demo#basic-usage) |
| showAnimation | `boolean` | true | Optional. Indicating whether to display animations. | [Built-in route and link type](demo#use-built-in-routing-and-link-types) ||
| showNoContent | `boolean` | true | Optional. Whether to display no data when there is no content. | | |

### d-accordion event

Expand Down
7 changes: 5 additions & 2 deletions devui/accordion/public-api.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
export * from './accordion.module';
export * from './accordion.component';
export * from './accordion-base-component.class';
export * from './accordion-base-item-component.class';
export * from './accordion-base-link-component.class';
export * from './accordion-item-hreflink.component';
export * from './accordion-item-routerlink.component';
export * from './accordion-item.component';
export * from './accordion-list-token';
export * from './accordion-list.component';
export * from './accordion-menu-token';
export * from './accordion-menu.component';
export * from './accordion-token';
export * from './accordion.component';
export * from './accordion.module';
export * from './accordion.type';
1 change: 0 additions & 1 deletion devui/alert/alert.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../style/mixins/index';
@import '../style/theme/color';
@import '../style/theme/shadow';
@import '../style/theme/corner';
Expand Down
3 changes: 3 additions & 0 deletions devui/alert/alert.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export class AlertComponent {
@Input() type: AlertType = 'info';
@Input() cssClass: string;
@Input() closeable = true;
/**
* @deprecated
*/
@Input() content: HTMLElement | string;
@Input() showIcon = true;
@Output() closeEvent = new EventEmitter<AlertComponent>();
Expand Down
1 change: 0 additions & 1 deletion devui/auto-complete/auto-complete-popup.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../style/mixins/index';
@import '../style/theme/color';

.devui-dropdown-menu {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '../style/theme/color';
@import '../style/mixins/index';

.active {
background: $devui-list-item-hover-bg;
Expand Down
3 changes: 3 additions & 0 deletions devui/auto-complete/auto-complete-popup.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export class AutoCompletePopupComponent implements ControlValueAccessor {
@Input() isOpen: boolean;
@Input() term: string;
@Input() popTipsText: string;
/**
* @deprecated
*/
@Input() overview: string;
@Input() itemTemplate: TemplateRef<any>;
@Input() noResultItemTemplate: TemplateRef<any>;
Expand Down
15 changes: 15 additions & 0 deletions devui/auto-complete/auto-complete.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,14 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
@HostBinding('attr.autocapitalize') autocapitalize = 'off';
@HostBinding('attr.autocorrect') autocorrect = 'off';
@Input() disabled: boolean;
/**
* @deprecated
*/
@Input() cssClass: string;
@Input() delay = 300;
/**
* @deprecated
*/
@Input() minLength: number;
@Input() itemTemplate: TemplateRef<any>;
@Input() noResultItemTemplate: TemplateRef<any>;
Expand Down Expand Up @@ -78,6 +84,9 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
@Input() source: any[];
@Input() valueParser: (item: any) => any;
@Input() searchFn: (term: string, target?: AutoCompleteDirective) => Observable<any[]>;
/**
* @deprecated
*/
@Input() dropdown: boolean;
@Input() maxHeight = 300;
@Input() disabledKey: string;
Expand All @@ -90,7 +99,11 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
@Output() loadMore = new EventEmitter<any>();
@Output() selectValue = new EventEmitter<any>();
@Output() transInputFocusEmit = new EventEmitter<any>(); // input状态传给父组件函数
/**
* @deprecated
*/
@Output() changeDropDownStatus = new EventEmitter<any>();
@Output() toggleChange = new EventEmitter<any>();
KEYBOARD_EVENT_NOT_REFRESH = ['escape', 'enter', 'arrowup', 'arrowdown', /* ie 10 edge */ 'esc', 'up', 'down'];
popupRef: ComponentRef<AutoCompletePopupComponent>;

Expand Down Expand Up @@ -287,6 +300,7 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
this.popupRef.instance.disabled = this.disabled;
addClassToOrigin(this.elementRef);
this.changeDropDownStatus.emit(true);
this.toggleChange.emit(true);
}

writeValue(obj): void {
Expand Down Expand Up @@ -408,6 +422,7 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont
this.popupRef.instance.isOpen = false;
removeClassFromOrigin(this.elementRef);
this.changeDropDownStatus.emit(false);
this.toggleChange.emit(false);
}
}

Expand Down
Loading

0 comments on commit c997e0f

Please sign in to comment.