From 9b1e4efc6aebd123611863063647cae5d9cbd81e Mon Sep 17 00:00:00 2001 From: huaweidevcloud Date: Mon, 20 Nov 2023 19:38:27 +0800 Subject: [PATCH] chore(release): release 16.2.0 --- CodeArts-logo.png | Bin 0 -> 9483 bytes README.md | 2 +- README_zh_CN.md | 2 +- devcloud-logo.png | Bin 16175 -> 0 bytes .../src/sidebar/sidebar.component.html | 15 ++- .../alert/alert-carousel-item.component.scss | 4 + devui/alert/alert-carousel-item.component.ts | 9 ++ devui/alert/alert.component.html | 70 ++++++++--- devui/alert/alert.component.scss | 100 ++++++++++++--- devui/alert/alert.component.ts | 97 +++++++++++++-- devui/alert/alert.module.ts | 16 ++- devui/alert/demo/alert-demo.component.html | 11 +- devui/alert/demo/alert-demo.component.ts | 31 +++-- devui/alert/demo/alert-demo.module.ts | 31 +++-- devui/alert/demo/alert-design.component.ts | 8 +- devui/alert/demo/basic/basic.component.css | 3 - devui/alert/demo/basic/basic.component.ts | 21 ++-- .../demo/carousel/carousel.component.html | 7 ++ .../alert/demo/carousel/carousel.component.ts | 37 ++++++ devui/alert/demo/close/close.component.ts | 15 +-- .../withoutIcon/withoutIcon.component.css | 3 - .../demo/withoutIcon/withoutIcon.component.ts | 21 ++-- devui/alert/doc/api-cn.md | 39 +++--- devui/alert/doc/api-en.md | 33 +++-- devui/alert/public-api.ts | 3 +- .../auto-complete/auto-complete.directive.ts | 5 +- devui/back-top/back-top.component.html | 2 +- devui/back-top/back-top.component.ts | 28 ++--- .../demo/customize/customize.component.ts | 2 +- devui/breadcrumb/breadcrumb.spec.ts | 2 +- devui/button/button.component.html | 2 +- devui/button/button.component.scss | 4 +- devui/button/button.component.ts | 1 + devui/button/button.spec.ts | 4 +- .../button/demo/groups/groups.component.html | 2 +- .../button/demo/groups/groups.component.scss | 5 + devui/cascader/cascader-li.component.scss | 4 - devui/cascader/cascader-li.component.ts | 6 + .../category-search.component.html | 13 +- .../category-search.component.ts | 21 ++-- devui/category-search/category-search.type.ts | 4 + .../demo/auto-scroll/auto-scroll.component.ts | 4 +- devui/category-search/doc/api-cn.md | 4 + devui/category-search/doc/api-en.md | 4 + devui/checkbox/checkbox.component.scss | 1 + devui/checkbox/checkbox.component.ts | 12 +- devui/checkbox/checkbox.spec.ts | 2 +- devui/common/auto-focus.directive.ts | 2 +- .../helper-download.component.ts | 2 +- devui/common/helper-utils.ts | 2 +- devui/data-table/data-table-column.spec.ts | 8 +- devui/data-table/data-table-head.component.ts | 2 +- devui/data-table/data-table.component.scss | 47 +++---- devui/data-table/data-table.component.ts | 12 +- .../demo/data-table-demo.component.html | 9 ++ .../demo/data-table-demo.component.ts | 7 ++ .../data-table/demo/data-table-demo.module.ts | 116 +++++++++--------- .../memory-table-width.directive.ts | 71 +++++++++++ .../memory-table/memory-table.component.html | 22 ++++ .../memory-table/memory-table.component.ts | 15 +++ devui/data-table/doc/api-cn.md | 11 +- .../head/th/filter/filter.component.html | 37 +++--- .../head/th/filter/filter.component.scss | 29 +++-- .../table/head/th/filter/filter.component.ts | 30 ++--- .../table/head/th/th.component.scss | 4 + .../data-table/table/head/th/th.component.ts | 6 +- .../data-table/table/head/thead.component.ts | 2 +- devui/data-table/table/row/tr.component.ts | 2 +- devui/data-table/utils/utils.ts | 2 +- .../datepicker-pro.component.ts | 14 +-- .../lib/timepicker-panel.component.ts | 25 +++- .../datepicker-cdk-overlay.component.ts | 10 +- devui/datepicker/datepicker.directive.ts | 12 +- devui/drawer/demo/basic/basic.component.ts | 4 +- devui/drawer/demo/drawer-demo.component.html | 7 ++ devui/drawer/demo/drawer-demo.component.ts | 8 +- devui/drawer/demo/drawer-demo.module.ts | 4 +- .../drawer/demo/resize/resize.component.html | 11 ++ devui/drawer/demo/resize/resize.component.ts | 35 ++++++ devui/drawer/doc/api-cn.md | 1 + devui/drawer/doc/api-en.md | 1 + devui/drawer/drawer.component.html | 11 ++ devui/drawer/drawer.component.scss | 27 +++- devui/drawer/drawer.component.ts | 71 ++++++++++- devui/drawer/drawer.moudule.ts | 2 + devui/drawer/drawer.service.ts | 6 +- devui/drawer/drawer.types.ts | 1 + devui/dropdown/dropdown.directive.ts | 6 +- .../form-control-rules.directive.ts | 18 +-- .../form/validator-directive/validate.type.ts | 4 +- .../gantt-scale/gantt-scale.component.scss | 4 +- devui/i18n/en-us.ts | 25 ++-- devui/i18n/i18n.model.ts | 1 + devui/i18n/i18n.service.ts | 6 +- devui/i18n/zh-cn.ts | 1 + devui/icon/icon.component.spec.ts | 8 +- .../image-preview.component.html | 6 +- .../image-preview.component.scss | 4 + .../image-preview/image-preview.component.ts | 9 +- devui/image-preview/transformable-element.ts | 2 + .../decimalLimit/decimal-limit.component.html | 2 +- devui/input-number/input-number.component.ts | 32 +++-- devui/loading/loading.component.ts | 13 +- .../demo/auto-expand/auto-expand.component.ts | 1 - devui/menu/menu-item.directive.ts | 3 +- .../modal/demo/maximize/maximize.component.ts | 2 +- devui/modal/demo/modal-demo.component.ts | 2 +- devui/modal/demo/modal-demo.module.ts | 92 +++++++------- devui/modal/modal-container.component.html | 1 + devui/modal/modal-container.component.ts | 2 +- devui/modal/modal-header.component.ts | 2 +- devui/modal/modal.component.ts | 6 +- devui/modal/modal.module.ts | 37 ++---- devui/modal/modal.spec.ts | 6 +- devui/multi-auto-complete/doc/api-cn.md | 59 ++++----- devui/multi-auto-complete/doc/api-en.md | 45 +++---- .../multi-auto-complete.component.html | 1 + .../multi-auto-complete.component.ts | 21 ++-- .../number-translation.pipe.ts | 2 +- devui/package.json | 10 +- devui/pagination/pagination.component.ts | 4 +- devui/popover/popover.component.html | 7 +- devui/popover/popover.component.ts | 2 +- devui/radio/radio-group.component.ts | 12 +- devui/search/search.component.html | 3 +- .../lazy-load-virtual-scroll.component.html | 9 +- .../demo/select-all/select-all.component.ts | 2 +- devui/select/doc/api-cn.md | 31 ++--- devui/select/doc/api-en.md | 31 ++--- devui/select/select.component.html | 7 +- devui/select/select.component.scss | 2 + devui/select/select.component.ts | 34 +++-- devui/shared/devui-api/devui-api.component.ts | 4 +- .../devui-codebox/devui-codebox.component.ts | 2 +- .../devui-online-ide.service.ts | 3 +- devui/steps-guide/steps-guide.component.ts | 8 +- devui/steps-guide/steps-guide.directive.ts | 6 +- devui/style/devui.css | 14 ++- devui/style/theme/_color.scss | 1 + .../demo/basic/basic.component.html | 1 + .../demo/customize/customize.component.html | 2 + .../demo/customize/customize.component.ts | 9 +- devui/tags-input/doc/api-cn.md | 54 ++++---- devui/tags-input/doc/api-en.md | 52 ++++---- devui/tags-input/tags.input.component.ts | 22 ++-- devui/textarea/demo/basic/basic.component.css | 4 - devui/textarea/demo/basic/basic.component.ts | 11 +- .../textarea/demo/resize/resize.component.css | 4 - .../demo/resize/resize.component.html | 6 +- .../textarea/demo/resize/resize.component.ts | 11 +- devui/textarea/demo/text-demo.component.ts | 4 +- devui/textarea/doc/api-cn.md | 13 +- devui/textarea/doc/api-en.md | 13 +- devui/textarea/textarea.directive.ts | 8 +- devui/theme-collection/extend-theme.ts | 3 +- devui/theme-collection/overwrite-style.scss | 6 +- devui/theme-collection/theme-initial-data.ts | 1 + devui/theme/theme-data.ts | 3 + devui/theme/utils/storage-service.ts | 6 +- .../time-axis-all-states.component.ts | 28 ++--- .../alternative-mode.component.ts | 17 +-- .../demo/custom-dot/custom-dot.component.ts | 41 +++++-- .../time-axis-direction.component.ts | 47 ++++--- .../time-axis-html-content.component.ts | 26 ++-- .../seperate-way/seperate-way.component.html | 10 +- devui/toast/demo/basic/basic.component.html | 2 +- devui/toast/demo/basic/basic.component.ts | 4 + .../search/transfer-demo-search.component.ts | 2 +- .../transfer/demo/transfer-demo.component.ts | 2 +- devui/transfer/transfer.component.ts | 2 +- devui/tree-select/doc/api-cn.md | 2 +- devui/tree-select/doc/api-en.md | 2 +- devui/tree-select/tree-select.component.html | 2 +- devui/tree-select/tree-select.component.scss | 4 + .../demo/customize/customize.component.ts | 4 +- devui/tree/operable-tree.component.html | 6 +- devui/tree/operable-tree.component.scss | 4 + devui/tree/operable-tree.component.ts | 4 +- devui/tree/tree-factory.class.ts | 1 + devui/tree/tree.component.scss | 9 +- .../customize-area-upload.component.ts | 2 +- devui/upload/demo/multi/multi.component.ts | 2 +- devui/upload/multiple-upload.component.html | 24 +++- devui/upload/multiple-upload.component.ts | 17 ++- devui/upload/multiple-upload.spec.ts | 4 +- devui/upload/select-files.utils.ts | 16 +-- devui/upload/single-upload.component.html | 24 +++- devui/upload/single-upload.component.ts | 2 +- devui/upload/single-upload.spec.ts | 4 +- devui/upload/upload-view.component.scss | 12 +- devui/upload/upload.directive.ts | 15 ++- devui/user-guide/user-guide-core.service.ts | 10 +- devui/user-guide/user-guide-ui.component.scss | 6 +- devui/user-guide/user-guide.component.scss | 2 +- devui/user-guide/user-guide.component.ts | 15 ++- devui/user-guide/user-guide.service.ts | 14 ++- devui/utils/animations/expand-collapse.ts | 4 +- devui/utils/public-api.ts | 4 +- .../str-tpl-outlet.directive.ts | 13 +- devui/utils/type-utils.ts | 1 - devui/version.ts | 2 +- package.json | 6 +- src/app/app.module.ts | 70 +++++------ src/app/component/app-content.module.ts | 42 +++---- src/app/component/get-started.component.ts | 4 +- src/app/component/global-config.component.ts | 4 +- src/app/component/scope-list.ts | 31 ++--- src/app/component/theme-guide.component.ts | 4 +- src/assets/i18n/en-us.json | 45 ++++--- src/assets/i18n/zh-cn.json | 27 +++- src/tsconfig.app.json | 14 +-- 211 files changed, 1806 insertions(+), 1099 deletions(-) create mode 100644 CodeArts-logo.png delete mode 100644 devcloud-logo.png create mode 100644 devui/alert/alert-carousel-item.component.scss create mode 100644 devui/alert/alert-carousel-item.component.ts delete mode 100755 devui/alert/demo/basic/basic.component.css create mode 100644 devui/alert/demo/carousel/carousel.component.html create mode 100644 devui/alert/demo/carousel/carousel.component.ts delete mode 100644 devui/alert/demo/withoutIcon/withoutIcon.component.css create mode 100644 devui/data-table/demo/memory-table/memory-table-width.directive.ts create mode 100644 devui/data-table/demo/memory-table/memory-table.component.html create mode 100644 devui/data-table/demo/memory-table/memory-table.component.ts create mode 100644 devui/drawer/demo/resize/resize.component.html create mode 100644 devui/drawer/demo/resize/resize.component.ts delete mode 100644 devui/textarea/demo/basic/basic.component.css delete mode 100644 devui/textarea/demo/resize/resize.component.css delete mode 100644 devui/utils/type-utils.ts diff --git a/CodeArts-logo.png b/CodeArts-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2a2c1cdb38e2dd703f01376ca2d9156b9ca2f261 GIT binary patch literal 9483 zcmchd<98iiu=iuzPLnjYPHdYeXl&cI)!00-8Z}lMyFp{yPEMSszqOwGC*1pD_MX`@ zd#%~uJug2os>(8`NJK~w5D=(xvXbf$5RiQTd{qRvf2*kj)Y88V(oJ1P9HM@jd`SaFV&Tp9bZrY5l=WGQn8*4vm8gfCueEM0Z z%k|K+}rge6Y;vMAoS9eoP151d;Eq2Wv>2D+-(x6{?dJAfBiP59Lzis zG);ERqm0kgVgk~?ANSjK;-lY<%2*rF8%KCxM~2P|7!)!BpBLA&#!^H7{Z5D*6l7}3 z0OdekBNN}>HEiX~w8jsVj)zNRg=EFz<44g#4Q26IPZ4Fe)VscC!QmEl=f}7bdgGWo~;UR zHt*{V5tfLci2E!KELE81n#OEt$XjnODg{Z({)A;2REK!a1$}~ zBW~=jZgNWYYocY6U#0CU?ZZx)uu6M$3W7FGJ#^ceLyy6=y(9$ECI12=*e7)243gE_ zDm_J^FeCH)#v2bd^RJ(iM(nAl{pPO(0pw_!Tz#kXF=4JA4wsL(DOKl8nUtvf%G81> z{qC7^EU&L8FR46yj8=Sx3sb6g`A96Wzl(~uj$PWc%ghfxz96x4*nCo5UpU8!R$&61 z+BrZ6oPsazid=yMuT=aUl;56vvU``(^YFaH_O=N{SO~bztj5Bv@xl8hSPqFNNfoSb zwX`;`97=(Kz0BO4M|`#9X4O)ArWrgyIMuKZ0H51s98*%(SbFFSOvvP9w+q3LQrws3 zla-ZcAzMbw{hI`n3vOzeT^SNG!LwPV7@ryRCe*?lbV<_Lq8zU6P#^HusW&bn!k+95 z`oc)*r7hIzw}z$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UDDO9tMwkB#~}L@4>!v7aEYxiWskJ#Ra1fIqXpzc5T%KgpE~_H*STwjx(# z5SBP#xgtIvLC{Hz)c6Iz$z_-ER-U3Pa;AM=Yl5`vaZ%MQh4YoCN&-?+2oiWI_M(JLMX)?tWr|g7s-(odv(0SHhW0n&qg; z{R8Lmc{N{fBDmc}@FUtLeBnpIPcHghcXru+eW>y3MDzYXLb#wiE_)sF*eyveb961R zatWpKwp6XU=0)6hRL1dJHmga`RepHTcSPP{f2dossEiFbaE5Of9lU1PVsS_ip#@-l z-#!ivPq5sWXVhGf73FiVOx;XG8vfNDpdQ1Tcd<(okIBx->6EAUw_Ll;%_ywU9t$NjO1lAA*{yTJ7K-F@Zd^+FysT3l}4}E|Hl1e4zYgX;^4mYG;us!AQ65dA>&I&`Nk9rU z03ok!W|0e_aG{? zVv?eoWh?Z_r1StR`fmeSBbok#Vg4K;WTlZX{*oXJ+9buVnBrrVc6Vm^IV9k^ndjlK zMXE4=^p}n^?H@2BiGZL2<6}H-=ixNlX1Q?nwhiFjGa)bHfSyhTZ5NFI<4aIp3KCi0 zF~++a+Kkap&T6cf4leo5UtPyYsQ<6voBvPwZ0k#Je?k+|cx4pa*lGR;BFRZ9OV*1U GhyFjswko3l literal 0 HcmV?d00001 diff --git a/README.md b/README.md index dab2ca25..213c06c6 100755 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Modern browsers and Internet Explorer 11+. ## Who use it -

DevCloud Logo

+

CodeArts Logo

## LICENSE diff --git a/README_zh_CN.md b/README_zh_CN.md index d4366435..d6a5df93 100644 --- a/README_zh_CN.md +++ b/README_zh_CN.md @@ -107,7 +107,7 @@ ng serve --open ## 谁在使用 -

DevCloud Logo

+

CodeArts Logo

## LICENSE diff --git a/devcloud-logo.png b/devcloud-logo.png deleted file mode 100644 index 0bcc355d3932bdaecbebb13ac0cd794f5aa2d030..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16175 zcmd73g;!ibkS{#L;2PWq3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$2mrNCxjYDKy_$FUPKsg+^DM`N9mkjUAGG^o4o$qa zN%1jOWb!dqkh{>hqMKk>R1Y`~4uW0D0%W`sJkR!Wz7Smb0g&@9&CSNWw49IIuSX-K zU#>+lS!hfqS`$F)XSTMaWMS7vCx2{mvw@qhXw?q@sWpGot#bal_hpop!A92o0IX9a zEm-?NjhD2`PfOPwsXacco#%hS!WuLy>A)p%lVYq*mkTlC61;>_Sw1PTMpFtN<}qm% z%8jFb!ZWPxN2QmdV5twBf716bPe!U9Mw;#-09tM~%R8jQ!$*b>*OL>|iOZ6j%oL#)L`jNqEGIoedfRi00Wkd?sH@Ha8*B7J~lvZ~iH!!v3U)Hlp}r zU0K6Yokc7ys5#W-#6i}pRl{uQ|FVs!|>8+3CZ>*+3)!y#| z^tf~oI3EQzK^~UXEGtG}K;*=UBwlVXZ1)5k1g8ZEBvNRH!9NU62fT{| z$2jH&|3Vzi7(8FM)u~#8KNF%+AU!<)4ymZup|Z8c)q%NK@9H|Z ni2looCh1~1|G!%HKze|VvTE)&c8vI{0iZ0eCihLoEad+HS?w0M diff --git a/devui-commons/src/sidebar/sidebar.component.html b/devui-commons/src/sidebar/sidebar.component.html index 019ffef9..9b44d419 100644 --- a/devui-commons/src/sidebar/sidebar.component.html +++ b/devui-commons/src/sidebar/sidebar.component.html @@ -1,6 +1,12 @@ - \ No newline at end of file + diff --git a/devui/alert/alert-carousel-item.component.scss b/devui/alert/alert-carousel-item.component.scss new file mode 100644 index 00000000..fe8bbc5f --- /dev/null +++ b/devui/alert/alert-carousel-item.component.scss @@ -0,0 +1,4 @@ +:host { + display: block; + width: 100%; +} diff --git a/devui/alert/alert-carousel-item.component.ts b/devui/alert/alert-carousel-item.component.ts new file mode 100644 index 00000000..71946465 --- /dev/null +++ b/devui/alert/alert-carousel-item.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'd-alert-carousel-item', + styleUrls: ['./alert-carousel-item.component.scss'], + template: ``, + preserveWhitespaces: false, +}) +export class AlertCarouselItemComponent {} diff --git a/devui/alert/alert.component.html b/devui/alert/alert.component.html index b0bdc9db..e9a121a2 100755 --- a/devui/alert/alert.component.html +++ b/devui/alert/alert.component.html @@ -1,22 +1,4 @@
-
- - - - - - - -
- + +
+ + +
+ + + + + + + +
+
diff --git a/devui/alert/alert.component.scss b/devui/alert/alert.component.scss index c7e2787b..a7cabfcd 100755 --- a/devui/alert/alert.component.scss +++ b/devui/alert/alert.component.scss @@ -16,23 +16,9 @@ border-radius: $devui-border-radius; word-break: normal; word-wrap: break-word; - - .devui-close { - color: $devui-text; - opacity: 1; - line-height: 26px; - height: 24px; - - & > svg path { - fill: $devui-light-text; - } - - span { - color: $devui-text; - font-size: $devui-font-size; - font-weight: bold; - } - } + display: flex; + flex-wrap: nowrap; + align-items: center; &.devui-alert-success { background-color: $devui-success-bg; @@ -93,6 +79,10 @@ } } + .devui-alert-icon { + padding-right: 8px; + } + svg.devui-icon { width: 16px; height: 16px; @@ -151,8 +141,78 @@ } } } -} -.devui-alert-icon { - margin-right: 4px; + .devui-alert-carousel-container { + flex-grow: 1; + flex-shrink: 0; + height: 24px; + overflow: hidden; + + .devui-alert-carousel-box { + position: relative; + left: 0; + top: 0; + } + } + + .devui-alert-operation-container { + flex-grow: 0; + flex-shrink: 1; + display: flex; + align-items: center; + justify-content: flex-end; + height: 24px; + min-width: 200px; + + .devui-alert-carousel-num { + padding-right: 8px; + } + + .devui-alert-carousel-button { + margin-left: 8px; + display: inline-flex; + align-items: center; + justify-content: center; + width: 24px; + height: 16px; + line-height: 16px; + vertical-align: middle; + background-color: transparent; + text-align: center; + border-radius: $devui-border-radius; + cursor: pointer; + + svg path { + fill: $devui-text; + } + + &:hover { + background-color: $devui-shape-icon-fill-hover; + + svg path { + fill: $devui-light-text; + } + } + } + } + + .devui-close { + flex-grow: 0; + flex-shrink: 1; + color: $devui-text; + opacity: 1; + line-height: 26px; + height: 24px; + padding-left: 8px; + + & > svg path { + fill: $devui-light-text; + } + + span { + color: $devui-text; + font-size: $devui-font-size; + font-weight: bold; + } + } } diff --git a/devui/alert/alert.component.ts b/devui/alert/alert.component.ts index 6e0551a4..5d5f032b 100755 --- a/devui/alert/alert.component.ts +++ b/devui/alert/alert.component.ts @@ -1,10 +1,20 @@ import { + AfterViewInit, Component, - + ContentChildren, + ElementRef, EventEmitter, Input, - Output + OnChanges, + OnDestroy, + Output, + QueryList, + Renderer2, + SimpleChanges, + TemplateRef, + ViewChild } from '@angular/core'; +import { AlertCarouselItemComponent } from './alert-carousel-item.component'; import { AlertType } from './alert.types'; @Component({ @@ -13,26 +23,89 @@ import { AlertType } from './alert.types'; styleUrls: ['./alert.component.scss'], preserveWhitespaces: false, }) -export class AlertComponent { +export class AlertComponent implements OnChanges, OnDestroy, AfterViewInit { @Input() type: AlertType = 'info'; @Input() cssClass: string; @Input() closeable = true; - /** - * @deprecated - */ - @Input() content: HTMLElement | string; @Input() showIcon = true; - @Output() closeEvent = new EventEmitter(); - @Input() set dismissTime(time) { + @Input() autoplay = false; + @Input() autoplaySpeed = 3000; + @Input() transitionSpeed = 500; + @Input() operationTemplate: TemplateRef; + @Input() set dismissTime(time: number) { setTimeout(() => { this.close(); }, time); } - + @Output() closeEvent = new EventEmitter(); + @ViewChild('carouselContainer') box: ElementRef; + @ContentChildren(AlertCarouselItemComponent) carouselItems: QueryList; hide = false; + carouselNum: number; + currentIndex = 1; + scheduledId: any; + + constructor(private renderer: Renderer2) {} + + ngOnChanges(changes: SimpleChanges) { + const { autoplay, autoplaySpeed, transitionSpeed } = changes; + if ((autoplay || autoplaySpeed) && (!this.autoplay || !this.autoplaySpeed)) { + this.clearScheduledTransition(); + } else { + this.autoScheduleTransition(); + } + if (transitionSpeed && this.transitionSpeed) { + this.renderer.setStyle(this.box.nativeElement, 'transition', `top ${this.transitionSpeed}ms ease`); + } + } + + ngAfterViewInit(): void { + this.renderCarouselItem(); + this.carouselItems.changes.subscribe(() => this.renderCarouselItem()); + } + + ngOnDestroy() { + this.clearScheduledTransition(); + } - close() { + renderCarouselItem() { + this.carouselNum = this.carouselItems.length; + if (this.carouselNum) { + this.renderer.setStyle(this.box.nativeElement, 'transition', `top ${this.transitionSpeed}ms ease`); + this.autoScheduleTransition(); + } + } + + next = (): void => { + if (this.currentIndex < this.carouselNum) { + this.currentIndex++; + } else { + this.currentIndex = 1; + } + this.translatePosition(this.currentIndex - 1); + this.autoScheduleTransition(); + }; + + autoScheduleTransition() { + this.clearScheduledTransition(); + if (this.autoplay && this.autoplaySpeed) { + this.scheduledId = setTimeout(() => this.next(), this.autoplaySpeed); + } + } + + clearScheduledTransition() { + if (this.scheduledId) { + clearTimeout(this.scheduledId); + this.scheduledId = undefined; + } + } + + translatePosition(size: number) { + this.renderer.setStyle(this.box.nativeElement, 'top', `${-size * 100}%`); + } + + close = (): void => { this.closeEvent.emit(this); this.hide = true; - } + }; } diff --git a/devui/alert/alert.module.ts b/devui/alert/alert.module.ts index e8717035..7b9d5550 100755 --- a/devui/alert/alert.module.ts +++ b/devui/alert/alert.module.ts @@ -1,13 +1,11 @@ -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; - -import {AlertComponent} from './alert.component'; +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { AlertCarouselItemComponent } from './alert-carousel-item.component'; +import { AlertComponent } from './alert.component'; @NgModule({ imports: [CommonModule], - exports: [AlertComponent], - declarations: [AlertComponent], - providers: [], + exports: [AlertComponent, AlertCarouselItemComponent], + declarations: [AlertComponent, AlertCarouselItemComponent], }) -export class AlertModule { -} +export class AlertModule {} diff --git a/devui/alert/demo/alert-demo.component.html b/devui/alert/demo/alert-demo.component.html index 0f54c603..db3fbf73 100755 --- a/devui/alert/demo/alert-demo.component.html +++ b/devui/alert/demo/alert-demo.component.html @@ -9,7 +9,6 @@ -
{{ 'components.alert.closableDemo.title' | translate }}
@@ -19,7 +18,6 @@
-
{{ 'components.alert.withoutIconDemo.title' | translate }}
@@ -29,4 +27,13 @@
+
+
{{ 'components.alert.carouselDemo.title' | translate }}
+
+ {{ 'components.alert.carouselDemo.description' | translate }} +
+ + + +
diff --git a/devui/alert/demo/alert-demo.component.ts b/devui/alert/demo/alert-demo.component.ts index 5b9441e4..9c1723a9 100755 --- a/devui/alert/demo/alert-demo.component.ts +++ b/devui/alert/demo/alert-demo.component.ts @@ -4,32 +4,30 @@ import { TranslateService, TranslationChangeEvent } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; @Component({ selector: 'd-alert-demo', - templateUrl: './alert-demo.component.html' + templateUrl: './alert-demo.component.html', }) export class AlertDemoComponent implements OnInit, OnDestroy { basicSource: Array = [ - {title: 'HTML', language: 'xml', code: require('./basic/basic.component.html?raw')}, - {title: 'TS', language: 'typescript', code: require('./basic/basic.component.ts?raw')}, - {title: 'SCSS', language: 'css', code: require('./basic/basic.component.css?raw')} + { title: 'HTML', language: 'xml', code: require('./basic/basic.component.html?raw') }, + { title: 'TS', language: 'typescript', code: require('./basic/basic.component.ts?raw') }, ]; - closeSource: Array = [ - {title: 'HTML', language: 'xml', code: require('./close/close.component.html?raw')}, - {title: 'TS', language: 'typescript', code: require('./close/close.component.ts?raw')}, - {title: 'SCSS', language: 'css', code: require('./close/close.component.css?raw')} + { title: 'HTML', language: 'xml', code: require('./close/close.component.html?raw') }, + { title: 'TS', language: 'typescript', code: require('./close/close.component.ts?raw') }, + { title: 'SCSS', language: 'css', code: require('./close/close.component.css?raw') }, ]; - withoutIconSource: Array = [ - {title: 'HTML', language: 'xml', code: require('./withoutIcon/withoutIcon.component.html?raw')}, - {title: 'TS', language: 'typescript', code: require('./withoutIcon/withoutIcon.component.ts?raw')}, - {title: 'SCSS', language: 'css', code: require('./withoutIcon/withoutIcon.component.css?raw')} + { title: 'HTML', language: 'xml', code: require('./withoutIcon/withoutIcon.component.html?raw') }, + { title: 'TS', language: 'typescript', code: require('./withoutIcon/withoutIcon.component.ts?raw') }, + ]; + carouselSource: Array = [ + { title: 'HTML', language: 'xml', code: require('./carousel/carousel.component.html?raw') }, + { title: 'TS', language: 'typescript', code: require('./carousel/carousel.component.ts?raw') }, ]; - navItems = []; subs: Subscription = new Subscription(); - constructor(private translate: TranslateService) { - } + constructor(private translate: TranslateService) {} ngOnInit() { this.subs.add( @@ -50,7 +48,8 @@ export class AlertDemoComponent implements OnInit, OnDestroy { this.navItems = [ { dAnchorLink: 'basic-usage', value: values['basic-usage'] }, { dAnchorLink: 'tips-to-close', value: values['tips-to-close'] }, - { dAnchorLink: 'without-icon', value: values['without-icon'] } + { dAnchorLink: 'without-icon', value: values['without-icon'] }, + { dAnchorLink: 'carousel', value: values['carousel'] }, ]; } diff --git a/devui/alert/demo/alert-demo.module.ts b/devui/alert/demo/alert-demo.module.ts index 32b0d9df..87e13164 100755 --- a/devui/alert/demo/alert-demo.module.ts +++ b/devui/alert/demo/alert-demo.module.ts @@ -11,6 +11,7 @@ import { DDemoNavModule } from 'devui-commons/src/demo-nav/d-demo-nav.module'; import { AlertDemoComponent } from './alert-demo.component'; import { AlertDesignComponent } from './alert-design.component'; import { BasicComponent } from './basic/basic.component'; +import { CarouselComponent } from './carousel/carousel.component'; import { CloseComponent } from './close/close.component'; import { WithoutIconComponent } from './withoutIcon/withoutIcon.component'; @@ -24,27 +25,23 @@ import { WithoutIconComponent } from './withoutIcon/withoutIcon.component'; DevUIApiModule, DDemoNavModule, RouterModule.forChild([ - { path: '', redirectTo: 'demo', pathMatch: 'full' }, + { path: '', redirectTo: 'demo', pathMatch: 'full' }, { path: 'design', component: AlertDesignComponent, }, - { path: 'demo', component: AlertDemoComponent}, - { path: 'api', component: DevUIApiComponent, data: { - 'zh-cn': require('!html-loader!markdown-loader!../doc/api-cn.md'), - 'en-us': require('!html-loader!markdown-loader!../doc/api-en.md') - }} - ]) + { path: 'demo', component: AlertDemoComponent }, + { + path: 'api', + component: DevUIApiComponent, + data: { + 'zh-cn': require('!html-loader!markdown-loader!../doc/api-cn.md'), + 'en-us': require('!html-loader!markdown-loader!../doc/api-en.md'), + }, + }, + ]), ], exports: [AlertDemoComponent], - declarations: [ - AlertDemoComponent, - AlertDesignComponent, - BasicComponent, - CloseComponent, - WithoutIconComponent - ], - + declarations: [AlertDemoComponent, AlertDesignComponent, BasicComponent, CloseComponent, WithoutIconComponent, CarouselComponent], }) -export class AlertDemoModule { -} +export class AlertDemoModule {} diff --git a/devui/alert/demo/alert-design.component.ts b/devui/alert/demo/alert-design.component.ts index 475633f5..96c43580 100644 --- a/devui/alert/demo/alert-design.component.ts +++ b/devui/alert/demo/alert-design.component.ts @@ -1,16 +1,14 @@ -import { Component, OnInit } from "@angular/core"; +import { Component, OnInit } from '@angular/core'; import { environment } from 'src/environments/environment'; @Component({ selector: 'd-alert-design', templateUrl: './alert-design.component.html', }) - export class AlertDesignComponent implements OnInit { - imgSrc; - constructor() { } + imgSrc: string; ngOnInit(): void { - this.imgSrc = environment.deployPrefix + 'assets/no-data.png'; + this.imgSrc = `${environment.deployPrefix}assets/no-data.png`; } } diff --git a/devui/alert/demo/basic/basic.component.css b/devui/alert/demo/basic/basic.component.css deleted file mode 100755 index 969aef83..00000000 --- a/devui/alert/demo/basic/basic.component.css +++ /dev/null @@ -1,3 +0,0 @@ -d-alert { - margin-bottom: 20px; -} diff --git a/devui/alert/demo/basic/basic.component.ts b/devui/alert/demo/basic/basic.component.ts index 73907f7c..92167352 100755 --- a/devui/alert/demo/basic/basic.component.ts +++ b/devui/alert/demo/basic/basic.component.ts @@ -1,17 +1,14 @@ -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; @Component({ selector: 'd-alert-basic', templateUrl: './basic.component.html', - styleUrls: ['./basic.component.css'] + styles: [ + ` + d-alert { + margin-bottom: 16px; + } + `, + ], }) -export class BasicComponent implements OnInit { - - constructor() { - - } - - ngOnInit() { - } - -} +export class BasicComponent {} diff --git a/devui/alert/demo/carousel/carousel.component.html b/devui/alert/demo/carousel/carousel.component.html new file mode 100644 index 00000000..ad5a60d6 --- /dev/null +++ b/devui/alert/demo/carousel/carousel.component.html @@ -0,0 +1,7 @@ + + {{ item.content }} + + + + Don't prompt again + diff --git a/devui/alert/demo/carousel/carousel.component.ts b/devui/alert/demo/carousel/carousel.component.ts new file mode 100644 index 00000000..bd01a3fe --- /dev/null +++ b/devui/alert/demo/carousel/carousel.component.ts @@ -0,0 +1,37 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'd-alert-carousel', + templateUrl: './carousel.component.html', + styles: [ + ` + .not-show { + cursor: pointer; + } + `, + ], +}) +export class CarouselComponent { + data = [ + { + id: 1, + content: 'info 1', + }, + { + id: 2, + content: 'info 2', + }, + { + id: 3, + content: 'info 3', + }, + { + id: 4, + content: 'info 4', + }, + { + id: 5, + content: 'info 5', + }, + ]; +} diff --git a/devui/alert/demo/close/close.component.ts b/devui/alert/demo/close/close.component.ts index f7358ed3..035876e9 100755 --- a/devui/alert/demo/close/close.component.ts +++ b/devui/alert/demo/close/close.component.ts @@ -1,21 +1,12 @@ -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; @Component({ selector: 'd-alert-close', templateUrl: './close.component.html', - styleUrls: ['./close.component.css'] + styleUrls: ['./close.component.css'], }) -export class CloseComponent implements OnInit { - - constructor() { - - } - - ngOnInit() { - } - +export class CloseComponent { handleClose($event) { console.log($event); } - } diff --git a/devui/alert/demo/withoutIcon/withoutIcon.component.css b/devui/alert/demo/withoutIcon/withoutIcon.component.css deleted file mode 100644 index 969aef83..00000000 --- a/devui/alert/demo/withoutIcon/withoutIcon.component.css +++ /dev/null @@ -1,3 +0,0 @@ -d-alert { - margin-bottom: 20px; -} diff --git a/devui/alert/demo/withoutIcon/withoutIcon.component.ts b/devui/alert/demo/withoutIcon/withoutIcon.component.ts index df7a692e..4edc85c1 100644 --- a/devui/alert/demo/withoutIcon/withoutIcon.component.ts +++ b/devui/alert/demo/withoutIcon/withoutIcon.component.ts @@ -1,17 +1,14 @@ -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; @Component({ selector: 'd-alert-without-icon', templateUrl: './withoutIcon.component.html', - styleUrls: ['./withoutIcon.component.css'] + styles: [ + ` + d-alert { + margin-bottom: 20px; + } + `, + ], }) -export class WithoutIconComponent implements OnInit { - - constructor() { - - } - - ngOnInit() { - } - -} +export class WithoutIconComponent {} diff --git a/devui/alert/doc/api-cn.md b/devui/alert/doc/api-cn.md index 08a90ad1..b5bc2ca6 100644 --- a/devui/alert/doc/api-cn.md +++ b/devui/alert/doc/api-cn.md @@ -1,6 +1,6 @@ # 如何使用 -在module中引入: +在 module 中引入: ```ts import { AlertModule } from 'ng-devui/alert'; @@ -11,28 +11,35 @@ import { AlertModule } from 'ng-devui/alert'; ```xml ``` -# d-alert -## d-alert 参数 -| 参数 | 类型 | 默认 | 说明 | 跳转 Demo |全局配置项| -| :----------------: | :---------: | :--------------------------------------: | :----: | :---------------------------------------- | ------------------------------------------ | -| type | [`AlertType`](#alerttype) | 'info' | 必选,指定警告提示的样式 | [基本用法](demo#basic-usage) | -| cssClass | `string` | -- | 可选,自定义 class 名 | -| closeable | `boolean` | true | 可选,默认显示关闭按钮 | [基本用法](demo#tips-to-close) | -| dismissTime | `number` | -- | 可选,自动关闭 alert 的延迟时间(`ms`) | -| showIcon | `boolean` | true | 可选,是否使用默认的类型图标 | [不使用默认图标](demo#without-icon) | +## d-alert -## d-alert 事件 +### d-alert 参数 -| 参数 | 类型 | 说明 | 跳转 Demo | -| :--------: | :-----------------: | :------------------------- | -------------------------------------------- | +| 参数 | 类型 | 默认 | 说明 | 跳转 Demo | 全局配置项 | +| ----------------- | ------------------------- | ------ | ----------------------------------------------- | ----------------------------------- | ---------- | +| type | [`AlertType`](#alerttype) | 'info' | 必选,指定警告提示的样式 | [基本用法](demo#basic-usage) | +| cssClass | `string` | -- | 可选,自定义 class 名 | +| closeable | `boolean` | true | 可选,默认显示关闭按钮 | [基本用法](demo#tips-to-close) | +| dismissTime | `number` | -- | 可选,自动关闭 alert 的延迟时间(`ms`) | +| showIcon | `boolean` | true | 可选,是否使用默认的类型图标 | [不使用默认图标](demo#without-icon) | +| autoplay | `boolean` | false | 可选,是否自动轮播 | [自动轮播](demo#carousel) | +| autoplaySpeed | `number` | 3000 | 可选,配合`autoplay`使用,自动轮播速度,单位 ms | [自动轮播](demo#carousel) | +| transitionSpeed | `number` | 500 | 可选,内容切换动画速度,单位 ms | [自动轮播](demo#carousel) | +| operationTemplate | `TemplateRef` | -- | 可选,自定义操作区内容模板 | [自动轮播](demo#carousel) | + +### d-alert 事件 + +| 参数 | 类型 | 说明 | 跳转 Demo | +| ---------- | ------------------------------ | -------------------------- | ---------------------------------- | | closeEvent | `EventEmitter` | 可选,关闭时触发的回调函数 | [可关闭的提示](demo#tips-to-close) | -# 接口 & 类型定义 +## 接口 & 类型定义 + ### AlertType -默认值为'info', 指定alert警告提示的类型 +默认值为'info', 指定 alert 警告提示的类型 ```ts export type AlertType = 'success' | 'danger' | 'warning' | 'info' | 'simple'; -``` \ No newline at end of file +``` diff --git a/devui/alert/doc/api-en.md b/devui/alert/doc/api-en.md index a3af2132..881c1cb5 100644 --- a/devui/alert/doc/api-en.md +++ b/devui/alert/doc/api-en.md @@ -11,24 +11,31 @@ In the page: ```xml ``` -# d-alert -## d-alert Parameter -| Attributes | Type | Default | Description | Jump to Demo |Global Config| -| :----------------: | :---------: | :--------------------------------------: | :----: | :---------------------------------------- | ------------------------------------------ | -| type | [`AlertType`](#alerttype) | 'info' | Required. Specify the style of the warning prompt | [Basic Usage](demo#basic-usage) | -| cssClass | `string` | -- | Optional. Customize className | -| closeable | `boolean` | true | Optional. The close button is displayed by default | [Basic Usage](demo#tips-to-close) | -| dismissTime | `number` | -- | Optional. Toggle off the delay time of Alert(`ms`) | -| showIcon | `boolean` | true | Optional. Whether to use the default type icon | [Without Icon](demo#without-icon) | +## d-alert -## d-alert Event +### d-alert Parameter -| Attributes | Type | Description | Jump to Demo | -| :--------: | :-----------------: | :------------------------- | -------------------------------------------- | +| Attributes | Type | Default | Description | Jump to Demo | Global Config | +| ----------------- | ------------------------- | ------- | --------------------------------------------------------------------------------------- | --------------------------------- | ------------- | +| type | [`AlertType`](#alerttype) | 'info' | Required. Specify the style of the warning prompt. | [Basic Usage](demo#basic-usage) | +| cssClass | `string` | -- | Optional. Customize className. | +| closeable | `boolean` | true | Optional. The close button is displayed by default. | [Basic Usage](demo#tips-to-close) | +| dismissTime | `number` | -- | Optional. Toggle off the delay time of Alert (`ms`). | +| showIcon | `boolean` | true | Optional. Whether to use the default type icon. | [Without Icon](demo#without-icon) | +| autoplay | `boolean` | false | Optional. Indicating whether to enable automatic NVOD. | [Carousel](demo#carousel) | +| autoplaySpeed | `number` | 3000 | Optional. Automatic NVOD speed, in ms. This parameter is used together with `autoplay'. | [Carousel](demo#carousel) | +| transitionSpeed | `number` | 500 | Optional. Content switch animation interval, in ms. | [Carousel](demo#carousel) | +| operationTemplate | `TemplateRef` | -- | Optional. Customized operation area template. | [Carousel](demo#carousel) | + +### d-alert Event + +| Attributes | Type | Description | Jump to Demo | +| ---------- | ------------------------------ | --------------------------------------- | ------------------------------------- | | closeEvent | `EventEmitter` | Optional. Callback when alert is closed | [Closable Prompt](demo#tips-to-close) | -# Interface & Type Definition +## Interface & Type Definition + ### AlertType The default value is 'info', which specifies the type of alert warning. diff --git a/devui/alert/public-api.ts b/devui/alert/public-api.ts index ae3b0f2d..f3f18d4c 100755 --- a/devui/alert/public-api.ts +++ b/devui/alert/public-api.ts @@ -1,3 +1,4 @@ -export * from './alert.types'; +export * from './alert-carousel-item.component'; export * from './alert.component'; export * from './alert.module'; +export * from './alert.types'; diff --git a/devui/auto-complete/auto-complete.directive.ts b/devui/auto-complete/auto-complete.directive.ts index cd8c56ea..ea0f69bd 100755 --- a/devui/auto-complete/auto-complete.directive.ts +++ b/devui/auto-complete/auto-complete.directive.ts @@ -110,6 +110,7 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont * 【可选】启用数据懒加载,默认不启用 */ @Input() enableLazyLoad = false; + @Input() retainInputValue = false; @Input() allowEmptyValueSearch = false; // 在value为空时,是否允许进行搜索 @Input() customViewTemplate: TemplateRef; @Input() customViewDirection: 'bottom' | 'right' | 'left' | 'top' = 'bottom'; @@ -339,7 +340,9 @@ export class AutoCompleteDirective implements OnInit, OnDestroy, OnChanges, Cont writeValue(obj): void { this.value = this.valueParser(obj) || ''; - this.writeInputValue(this.value); + if (!this.retainInputValue) { + this.writeInputValue(this.value); + } } registerOnChange(fn): void { diff --git a/devui/back-top/back-top.component.html b/devui/back-top/back-top.component.html index 02b97c8b..b3a6962d 100644 --- a/devui/back-top/back-top.component.html +++ b/devui/back-top/back-top.component.html @@ -8,7 +8,7 @@ }" (click)="goTop()" > -
+
diff --git a/devui/back-top/back-top.component.ts b/devui/back-top/back-top.component.ts index d213ab85..c63f70ce 100644 --- a/devui/back-top/back-top.component.ts +++ b/devui/back-top/back-top.component.ts @@ -25,7 +25,7 @@ import { debounceTime } from 'rxjs/operators'; styleUrls: ['./back-top.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, - }) +}) export class BackTopComponent implements OnChanges, OnInit, OnDestroy, AfterViewInit { @Input() customTemplate: TemplateRef; @Input() visibleHeight = 300; @@ -41,6 +41,7 @@ export class BackTopComponent implements OnChanges, OnInit, OnDestroy, AfterView cursorTimer: any; dragBoundary: any; moveCursor = false; + moveToggle = false; isVisible = false; target: HTMLElement | Window; subs: Subscription = new Subscription(); @@ -131,6 +132,10 @@ export class BackTopComponent implements OnChanges, OnInit, OnDestroy, AfterView } goTop() { + if (this.draggable && this.duration > this.MOUSEDOWN_DELAY) { + this.duration = 0; + return; + } if (this.target === window) { this.document.documentElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'nearest' }); this.document.body.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'nearest' }); @@ -138,6 +143,7 @@ export class BackTopComponent implements OnChanges, OnInit, OnDestroy, AfterView this.scrollTarget.style.scrollBehavior = 'smooth'; this.scrollTarget.scrollTop = 0; } + this.duration = 0; this.backTopEvent.emit(true); } @@ -171,11 +177,11 @@ export class BackTopComponent implements OnChanges, OnInit, OnDestroy, AfterView mousedownEvent(event: MouseEvent) { if (this.draggable) { event.preventDefault(); + this.setDragBoundary(); + this.duration = new Date().getTime(); + this.moveToggle = true; this.cursorTimer = setTimeout(() => { - this.setDragBoundary(); - this.duration = new Date().getTime(); this.moveCursor = true; - this.cdr.markForCheck(); this.dragEvent.emit(true); }, this.MOUSEDOWN_DELAY); } @@ -187,22 +193,15 @@ export class BackTopComponent implements OnChanges, OnInit, OnDestroy, AfterView } } - clickEvent(event: MouseEvent) { - if (this.draggable && this.duration > this.MOUSEDOWN_DELAY) { - event.stopPropagation(); - this.duration = 0; - } - } - @HostListener('document:mouseup', []) onMouseUp() { if (this.draggable) { if (this.cursorTimer) { clearTimeout(this.cursorTimer); } - if (this.moveCursor) { + if (this.moveToggle) { + this.moveToggle = false; this.moveCursor = false; - this.cdr.markForCheck(); this.dragEvent.emit(false); } this.duration = this.duration && new Date().getTime() - this.duration; @@ -211,9 +210,10 @@ export class BackTopComponent implements OnChanges, OnInit, OnDestroy, AfterView @HostListener('document:mousemove', ['$event']) onMouseMove(event: MouseEvent) { - if (this.draggable && this.moveCursor && this.dragBoundary) { + if (this.draggable && this.moveToggle && this.dragBoundary) { // 先判断再执行阻止默认事件,否则可能影响鼠标拖选功能 event.preventDefault(); + this.moveCursor = true; const posX = event.movementX; const posY = event.movementY; const rect = this.dragBoundary.dom.getBoundingClientRect(); diff --git a/devui/back-top/demo/customize/customize.component.ts b/devui/back-top/demo/customize/customize.component.ts index 47d604fb..ea097d30 100644 --- a/devui/back-top/demo/customize/customize.component.ts +++ b/devui/back-top/demo/customize/customize.component.ts @@ -5,7 +5,7 @@ import { TooltipDirective } from 'ng-devui/tooltip'; selector: 'd-back-top-customize', templateUrl: './customize.component.html', styleUrls: ['./customize.component.scss'], - }) +}) export class CustomizeComponent { @ViewChild('tooltipItem', { read: TooltipDirective }) tooltipItem: TooltipDirective; content = 'Back to the top'; diff --git a/devui/breadcrumb/breadcrumb.spec.ts b/devui/breadcrumb/breadcrumb.spec.ts index a296d5d5..a74e36b5 100644 --- a/devui/breadcrumb/breadcrumb.spec.ts +++ b/devui/breadcrumb/breadcrumb.spec.ts @@ -27,7 +27,7 @@ class TestBreadCrumbComponent { { title: '面包屑', showMenu: true, link: '/components/zh-cn/breadcrumb/demo', noNavigation: true, isSearch: true, menuList: [ - { name: '锚点', link: 'http://devui.huawei.com/components/anchor/demo', target: '_blank' }, + { name: '锚点', link: '/components/anchor/demo', target: '_blank' }, { name: '按钮', link: '/', linkType: 'routerLink' } // 测试是否进入navigateTo方法处理routerLink的情况 ] }]; diff --git a/devui/button/button.component.html b/devui/button/button.component.html index 232048cf..6c8d0989 100755 --- a/devui/button/button.component.html +++ b/devui/button/button.component.html @@ -17,7 +17,7 @@ (mousedown)="isMouseDown = true" (mouseup)="isMouseDown = false" > - +
diff --git a/devui/button/button.component.scss b/devui/button/button.component.scss index d9ca6bf0..11e28f6a 100755 --- a/devui/button/button.component.scss +++ b/devui/button/button.component.scss @@ -386,8 +386,8 @@ $devui-btn-pseudo-config: ( pointer-events: none; } -.clear-right-4 { - margin-right: 4px; +.clear-right-8 { + margin-right: 8px; } .devui-btn-more-text-omits { diff --git a/devui/button/button.component.ts b/devui/button/button.component.ts index 43bcb348..f753867c 100755 --- a/devui/button/button.component.ts +++ b/devui/button/button.component.ts @@ -79,6 +79,7 @@ export class ButtonComponent implements AfterContentChecked { setTimeout(() => { this.showWave = false; + this.cd.detectChanges(); }, AnimationNumberDuration.SLOW); } diff --git a/devui/button/button.spec.ts b/devui/button/button.spec.ts index d7165667..eca77958 100644 --- a/devui/button/button.spec.ts +++ b/devui/button/button.spec.ts @@ -18,7 +18,7 @@ import { ButtonComponent } from './button.component'; {{text}} ` - }) +}) class TestButtonComponent { bsStyle = 'primary'; bsPosition = 'default'; @@ -37,7 +37,7 @@ class TestButtonComponent { template: ` {{text}} ` - }) +}) class TestButtonAutoFocusComponent { show = false; } diff --git a/devui/button/demo/groups/groups.component.html b/devui/button/demo/groups/groups.component.html index b41fbcc1..37d370a2 100644 --- a/devui/button/demo/groups/groups.component.html +++ b/devui/button/demo/groups/groups.component.html @@ -6,7 +6,7 @@
- 近期发布 + 近期发布
+
+
{{ 'components.datatable.memoryDemo.title' | translate }}
+
+ {{ 'components.datatable.memoryDemo.description' | translate }} +
+ + + +
{{ 'components.datatable.checkOptionsDemo.title' | translate }}
{{ 'components.datatable.checkOptionsDemo.description' | translate }}
diff --git a/devui/data-table/demo/data-table-demo.component.ts b/devui/data-table/demo/data-table-demo.component.ts index 9208e48b..41a8b86a 100755 --- a/devui/data-table/demo/data-table-demo.component.ts +++ b/devui/data-table/demo/data-table-demo.component.ts @@ -27,6 +27,12 @@ export class DataTableDemoComponent implements OnInit, OnDestroy { { title: 'TS', language: 'typescript', code: require('./interaction/interaction.component.ts?raw') }, { title: 'mock-data', language: 'typescript', code: require('./mock-data?raw') }, ]; + memoryTableSource: Array = [ + { title: 'HTML', language: 'xml', code: require('./memory-table/memory-table.component.html?raw') }, + { title: 'TS', language: 'typescript', code: require('./memory-table/memory-table.component.ts?raw') }, + { title: 'Directive', language: 'typescript', code: require('./memory-table/memory-table-width.directive.ts?raw') }, + { title: 'mock-data', language: 'typescript', code: require('./mock-data?raw') }, + ]; checkOptionSource: Array = [ { title: 'HTML', language: 'xml', code: require('./check-options/check-options.component.html?raw') }, { title: 'TS', language: 'typescript', code: require('./check-options/check-options.component.ts?raw') }, @@ -173,6 +179,7 @@ export class DataTableDemoComponent implements OnInit, OnDestroy { { dAnchorLink: 'dynamic-cols', value: values['dynamic-cols'] }, { dAnchorLink: 'async-loading', value: values['async-loading'] }, { dAnchorLink: 'table-interaction', value: values['table-interaction'] }, + { dAnchorLink: 'table-memory', value: values['table-memory'] }, { dAnchorLink: 'table-check-options', value: values['table-check-options'] }, { dAnchorLink: 'lazy-loading-of-list-data', value: values['lazy-loading-of-list-data'] }, { dAnchorLink: 'virtual-scroll', value: values['virtual-scroll'] }, diff --git a/devui/data-table/demo/data-table-demo.module.ts b/devui/data-table/demo/data-table-demo.module.ts index 6aade009..2cea7700 100755 --- a/devui/data-table/demo/data-table-demo.module.ts +++ b/devui/data-table/demo/data-table-demo.module.ts @@ -39,6 +39,8 @@ import { InteractionColumnComponent } from './interaction-column/interaction-col import { InteractionComponent } from './interaction/interaction.component'; import { DatatableDemoLazyloadDataComponent } from './lazy/data-table-demo-lazyloaddata.component'; import { DatatableDemoMaxheightComponent } from './max-height/data-table-demo-maxheight.component'; +import { MemoryTableWidthDirective } from './memory-table/memory-table-width.directive'; +import { MemoryTableComponent } from './memory-table/memory-table.component'; import { DatatableDemoMultiHeaderComponent } from './multi-header/data-table-demo-multiheader.component'; import { MutiDragRowComponent } from './muti-drag-row/muti-drag-row.component'; import { MutilStylesComponent } from './mutil-styles/mutil-styles.component'; @@ -47,66 +49,68 @@ import { TreeDataComponent } from './tree-table/tree-data.component'; import { VirtualScrollComponent } from './virtual-scroll/virtual-scroll.component'; @NgModule({ imports: [ - TranslateModule, - CommonModule, - ScrollingModule, - DevUIModule, - FormsModule, - DataTableModule, - DevUICodeboxModule, - DevUIApiModule, - TooltipModule, - AutoCompleteModule, - I18nModule, - DDemoNavModule, - LoadingModule, - SplitterModule, - DCommonModule, - RouterModule.forChild([ - { path: '', redirectTo: 'demo', pathMatch: 'full' }, - { - path: 'design', - component: DataTableDesignComponent, - }, - { path: 'demo', component: DataTableDemoComponent}, - { path: 'api', component: DevUIApiComponent, data: { - 'zh-cn': require('!html-loader!markdown-loader!../doc/api-cn.md'), - 'en-us': require('!html-loader!markdown-loader!../doc/api-en.md') - }} + TranslateModule, + CommonModule, + ScrollingModule, + DevUIModule, + FormsModule, + DataTableModule, + DevUICodeboxModule, + DevUIApiModule, + TooltipModule, + AutoCompleteModule, + I18nModule, + DDemoNavModule, + LoadingModule, + SplitterModule, + DCommonModule, + RouterModule.forChild([ + { path: '', redirectTo: 'demo', pathMatch: 'full' }, + { + path: 'design', + component: DataTableDesignComponent, + }, + { path: 'demo', component: DataTableDemoComponent}, + { path: 'api', component: DevUIApiComponent, data: { + 'zh-cn': require('!html-loader!markdown-loader!../doc/api-cn.md'), + 'en-us': require('!html-loader!markdown-loader!../doc/api-en.md') + }} ]) ], exports: [DataTableDemoComponent], declarations: [ - DataTableDemoComponent, - DataTableDesignComponent, - DatatableDemoBasicComponent, - DatatableDemoAsyncComponent, - DatatableDemoMaxheightComponent, - DatatableDemoMultiHeaderComponent, - DatatableDemoLazyloadDataComponent, - DatatableDemoEditableComponent, - TreeDataComponent, - ExpandRowComponent, - FixColumnComponent, - DragColumnComponent, - CellMergeComponent, - DragRowComponent, - InteractionComponent, - BasicOldComponent, - HeaderGroupingComponent, - EditableOldComponent, - ExpandRowOldComponent, - TreeTableOldComponent, - FixColumnOldComponent, - MutiDragRowComponent, - CheckOptionsComponent, - CheckOptionsColumnComponent, - InteractionColumnComponent, - VirtualScrollComponent, - MutilStylesComponent, - FixHeightVirtualScrollComponent, - DynamicColsDemoComponent, + DataTableDemoComponent, + DataTableDesignComponent, + DatatableDemoBasicComponent, + DatatableDemoAsyncComponent, + DatatableDemoMaxheightComponent, + DatatableDemoMultiHeaderComponent, + DatatableDemoLazyloadDataComponent, + DatatableDemoEditableComponent, + TreeDataComponent, + ExpandRowComponent, + FixColumnComponent, + DragColumnComponent, + CellMergeComponent, + DragRowComponent, + InteractionComponent, + BasicOldComponent, + HeaderGroupingComponent, + EditableOldComponent, + ExpandRowOldComponent, + TreeTableOldComponent, + FixColumnOldComponent, + MutiDragRowComponent, + CheckOptionsComponent, + CheckOptionsColumnComponent, + InteractionColumnComponent, + VirtualScrollComponent, + MutilStylesComponent, + FixHeightVirtualScrollComponent, + DynamicColsDemoComponent, + MemoryTableComponent, + MemoryTableWidthDirective ], providers: [], - }) +}) export class DataTableDemoModule {} diff --git a/devui/data-table/demo/memory-table/memory-table-width.directive.ts b/devui/data-table/demo/memory-table/memory-table-width.directive.ts new file mode 100644 index 00000000..a7c6cda6 --- /dev/null +++ b/devui/data-table/demo/memory-table/memory-table-width.directive.ts @@ -0,0 +1,71 @@ +import { AfterContentInit, Directive, Host, Input, OnChanges, OnDestroy, Optional } from '@angular/core'; +import { DataTableComponent } from 'ng-devui'; +import { Subscription } from 'rxjs'; +@Directive({ + selector: '[dMemoryTableWidth]' +}) +export class MemoryTableWidthDirective implements OnChanges, OnDestroy, AfterContentInit { + @Input() tableWidthConfig: Array; + + @Input() memoryId: string; + + subscribers = new Subscription(); + constructor( + @Optional() @Host() + private hostCmp: DataTableComponent + ) { } + + /** + * 使用模板的监听 + */ + ngOnChanges(changes) { + if (changes.tableWidthConfig) { + this.update(); + } + } + + ngAfterContentInit() { + if (this.hostCmp.columns) { + this.update(); + } + this.subscribers.add(this.hostCmp.columns.changes.subscribe(res => { + setTimeout(() => { + this.update(); + }); + })); + + this.subscribers.add(this.hostCmp.resize.subscribe(res => { + localStorage.setItem(this.memoryId, JSON.stringify(this.hostCmp.tableWidthConfig)); + })); + } + + + /** + * 更新数据 + */ + update() { + const list = localStorage.getItem(this.memoryId) || '[]'; + // 防止缓存数据被篡改导致报错 + try { + const memoryColumns = JSON.parse(list); + if (!this.hostCmp.tableWidthConfig.length) { + return; + } + for (let i = 0; i < (memoryColumns?.length || 0); i++) { + const target = this.hostCmp.tableWidthConfig.find(t => t.field === memoryColumns[i].field); + if (target) { + target.width = memoryColumns[i].width; + } + } + } catch (error) { + console.error(error); + } + } + + ngOnDestroy(): void { + if (this.subscribers) { + this.subscribers.unsubscribe(); + } + } + +} diff --git a/devui/data-table/demo/memory-table/memory-table.component.html b/devui/data-table/demo/memory-table/memory-table.component.html new file mode 100644 index 00000000..1b08ef90 --- /dev/null +++ b/devui/data-table/demo/memory-table/memory-table.component.html @@ -0,0 +1,22 @@ + + + + + + + + hidden + diff --git a/devui/data-table/demo/memory-table/memory-table.component.ts b/devui/data-table/demo/memory-table/memory-table.component.ts new file mode 100644 index 00000000..b4c92184 --- /dev/null +++ b/devui/data-table/demo/memory-table/memory-table.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; +import { SourceType, originSource } from './../mock-data'; + +@Component({ + selector: 'd-memory-table-demo', + templateUrl: './memory-table.component.html' +}) +export class MemoryTableComponent implements OnInit { + dataSource: Array = JSON.parse(JSON.stringify(originSource.slice(0, 6))); + constructor() { } + + ngOnInit() { + } + +} diff --git a/devui/data-table/doc/api-cn.md b/devui/data-table/doc/api-cn.md index 68f61485..2c8f5431 100644 --- a/devui/data-table/doc/api-cn.md +++ b/devui/data-table/doc/api-cn.md @@ -576,8 +576,8 @@ advancedHeader: Array < {
-
-
+
+
@@ -695,8 +695,8 @@ addTreeNodeByRowItem(rowItem: TreeNodeInterface, action: 'addChild' | 'insertBef ``` xml
-
-
+
+
``` ``` javascript @@ -710,7 +710,8 @@ copyAndCut(rowItem, status) { this.VirtualTableTree.copyAndCut(rowItem, status); } -paste(rowItem, status) { +// 粘贴三种模式,粘贴到子节点,粘贴到根节点最后,粘贴到兄弟节点 +paste(rowItem, status: 'child' | 'root' | 'next') { this.VirtualTableTree.paste(rowItem, status); if(this.isCut) { this.saveCopyClickNode = ""; diff --git a/devui/data-table/table/head/th/filter/filter.component.html b/devui/data-table/table/head/th/filter/filter.component.html index 86fe2532..395950cc 100644 --- a/devui/data-table/table/head/th/filter/filter.component.html +++ b/devui/data-table/table/head/th/filter/filter.component.html @@ -54,14 +54,14 @@
- + (searchFn)="onSearch($event)" + >
-
- {{ i18nCommonText?.btnOk }} +
+ {{ + i18nCommonText?.reset + }} + {{ i18nCommonText?.btnOk }}
-
- + + (searchFn)="onSearch($event)" + >
diff --git a/devui/drawer/demo/drawer-demo.component.ts b/devui/drawer/demo/drawer-demo.component.ts index 5120e4c6..6386fb6f 100755 --- a/devui/drawer/demo/drawer-demo.component.ts +++ b/devui/drawer/demo/drawer-demo.component.ts @@ -28,6 +28,11 @@ export class DrawerDemoComponent implements OnInit, OnDestroy { { title: 'TS', language: 'typescript', code: require('./template/template.component.ts?raw') } ]; + resizeSource: Array = [ + { title: 'HTML', language: 'xml', code: require('./resize/resize.component.html?raw') }, + { title: 'TS', language: 'typescript', code: require('./resize/resize.component.ts?raw') } + ]; + navItems = []; subs: Subscription = new Subscription(); constructor(private translate: TranslateService) {} @@ -51,7 +56,8 @@ export class DrawerDemoComponent implements OnInit, OnDestroy { this.navItems = [ { dAnchorLink: 'basic-usage', value: values['basic-usage'] }, { dAnchorLink: 'do-not-destroy-after-closing', value: values['do-not-destroy-after-closing'] }, - { dAnchorLink: 'template', value: values['template'] } + { dAnchorLink: 'template', value: values['template'] }, + { dAnchorLink: 'resize', value: values['resize'] } ]; } diff --git a/devui/drawer/demo/drawer-demo.module.ts b/devui/drawer/demo/drawer-demo.module.ts index f621a626..88bbb8fe 100755 --- a/devui/drawer/demo/drawer-demo.module.ts +++ b/devui/drawer/demo/drawer-demo.module.ts @@ -14,6 +14,7 @@ import { BasicComponent } from './basic/basic.component'; import { DrawerDemoComponent } from './drawer-demo.component'; import { DrawerDesignComponent } from './drawer-design.component'; import { DrawerContentComponent } from './drawerContent/drawer-content.component'; +import { ResizeComponent } from './resize/resize.component'; import { TemplateComponent } from './template/template.component'; import { UndestroyableComponent } from './undestroyable/undestroyable.component'; @@ -52,7 +53,8 @@ import { UndestroyableComponent } from './undestroyable/undestroyable.component' BasicComponent, UndestroyableComponent, DrawerContentComponent, - TemplateComponent + TemplateComponent, + ResizeComponent ], }) export class DrawerDemoModule {} diff --git a/devui/drawer/demo/resize/resize.component.html b/devui/drawer/demo/resize/resize.component.html new file mode 100644 index 00000000..53ddf793 --- /dev/null +++ b/devui/drawer/demo/resize/resize.component.html @@ -0,0 +1,11 @@ +click me! + + +
+ +
+
+
Hello, Drawer!
+
Powered by template.
+
+
diff --git a/devui/drawer/demo/resize/resize.component.ts b/devui/drawer/demo/resize/resize.component.ts new file mode 100644 index 00000000..3d4e7599 --- /dev/null +++ b/devui/drawer/demo/resize/resize.component.ts @@ -0,0 +1,35 @@ +import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; +import { DrawerService, IDrawerOpenResult } from 'ng-devui/drawer'; + +@Component({ + selector: 'd-can-resize', + templateUrl: './resize.component.html' +}) +export class ResizeComponent implements OnInit { + @ViewChild('drawerContent', { static: true }) drawerContent: TemplateRef; + results: IDrawerOpenResult; + constructor(private drawerService: DrawerService) { } + + ngOnInit() { + } + + openDrawer() { + this.results = this.drawerService.open({ + width: '300px', + zIndex: 10000, + isCover: false, + backdropCloseable: true, + escKeyCloseable: true, + position: 'right', + resizable: true, + onClose: () => { + console.log('on drawer closed'); + }, + contentTemplate: this.drawerContent + }); + } + + close($event) { + this.results.drawerInstance.hide(); + } +} diff --git a/devui/drawer/doc/api-cn.md b/devui/drawer/doc/api-cn.md index d4faa83b..a768fc63 100644 --- a/devui/drawer/doc/api-cn.md +++ b/devui/drawer/doc/api-cn.md @@ -63,6 +63,7 @@ openDrawer() { | bodyScrollable | `boolean` | true | 可选,drawer 打开后,body 是否可滚动,默认为可滚动,false 时隐藏滚动,隐藏滚动条可能会产生抖动,可以通过设置外层 fixed 来同时避免滚动与抖动,可参考 modal 的解决方案 | [解决抖动滚动问题](demo#template-fixed) | | showAnimation | `boolean` | true | 可选,是否开启动效 | | id | `string` | -- | 可选,窗口的id | +| resizable | `boolean` | false | 可选,是否可动态调整抽屉宽度 | ## IDrawerOpenResult 参数 diff --git a/devui/drawer/doc/api-en.md b/devui/drawer/doc/api-en.md index dc4e4821..25b9102d 100644 --- a/devui/drawer/doc/api-en.md +++ b/devui/drawer/doc/api-en.md @@ -60,6 +60,7 @@ Note: Components passed to drawerContentComponent in the API need to be register | bodyScrollable | `boolean` | true | Optional. Whether the body can be scrolled when the drawer opens. The default value is false. If the scroll bar is hidden, the scroll bar may jitter. You need to resolve the problem in the page layout. |s | showAnimation | `boolean` | true | optional. Whether to enable animation. | | id | `string` | -- | Optional. Id of the drawer. | +| resizable | `boolean` | false | Optional. Whether the drawer's width can be dynamically adjusted. | ## IDrawerOpenResult Parameter diff --git a/devui/drawer/drawer.component.html b/devui/drawer/drawer.component.html index c7cefdd0..a39cad33 100755 --- a/devui/drawer/drawer.component.html +++ b/devui/drawer/drawer.component.html @@ -14,6 +14,7 @@ >
+
diff --git a/devui/drawer/drawer.component.scss b/devui/drawer/drawer.component.scss index d734bf91..3fc83a79 100755 --- a/devui/drawer/drawer.component.scss +++ b/devui/drawer/drawer.component.scss @@ -27,12 +27,8 @@ .overlay-backdrop { position: absolute; top: 0; - left: 0; - right: 0; bottom: 0 !important; background: $devui-shadow; - width: 100vw; - height: 100vh; } .drawer-nav, @@ -66,3 +62,26 @@ } } } + +.devui-drawer-resize-bar { + position: absolute; + top: 0; + height: 100%; + width: 4px; + z-index: 10; + border-left: 1px solid $devui-dividing-line; + + &.devui-drawer-resize-bar-left { + right: -1px; + } + + &.devui-drawer-resize-bar-right { + left: -1px; + } + + &.devui-drawer-can-hover:hover { + border-left-color: $devui-brand-hover; + border-left-width: 2px; + cursor: col-resize; + } +} diff --git a/devui/drawer/drawer.component.ts b/devui/drawer/drawer.component.ts index 67ba0783..49885e8b 100755 --- a/devui/drawer/drawer.component.ts +++ b/devui/drawer/drawer.component.ts @@ -1,6 +1,7 @@ import { AnimationEvent } from '@angular/animations'; import { DOCUMENT } from '@angular/common'; import { + ChangeDetectorRef, Component, Directive, ElementRef, @@ -14,14 +15,15 @@ import { ViewChild, ViewContainerRef } from '@angular/core'; +import { ResizeDirective } from 'ng-devui/splitter'; import { backdropFadeInOut, flyInOut } from 'ng-devui/utils'; import { isNumber, parseInt, trim } from 'lodash-es'; -import { Observable, Subject, Subscription, fromEvent } from 'rxjs'; -import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; +import { fromEvent, Observable, Subject, Subscription } from 'rxjs'; +import { debounceTime, distinctUntilChanged, filter, map, switchMap, takeUntil, tap } from 'rxjs/operators'; @Directive({ selector: '[dDrawerContentHost]', - }) +}) export class DrawerContentDirective { constructor(public viewContainerRef: ViewContainerRef) {} } @@ -32,7 +34,7 @@ export class DrawerContentDirective { styleUrls: ['./drawer.component.scss'], animations: [backdropFadeInOut, flyInOut], preserveWhitespaces: false, - }) +}) export class DrawerComponent implements OnInit, OnDestroy { animateState = 'void'; @Input() id: string; @@ -53,7 +55,9 @@ export class DrawerComponent implements OnInit, OnDestroy { @Input() afterOpened: Function; @Input() position: 'right' | 'left' = 'right'; @Input() bodyScrollable = true; // drawer打开body是否可滚动 + @Input() resizable = false; @ViewChild('drawerContainer', { static: true }) drawerContainer: ElementRef; + @ViewChild('resizeBar', { read: ResizeDirective }) resizeCmp: ResizeDirective; _width: string; // 全屏时用来记录之前的宽度,因为没遮罩的情况下width不能是百分比 oldWidth: string; @@ -72,8 +76,14 @@ export class DrawerComponent implements OnInit, OnDestroy { contentTemplate: TemplateRef; _right: string; + _curWidth; - constructor(private elementRef: ElementRef, private renderer: Renderer2, @Inject(DOCUMENT) private doc: any) { + constructor( + private elementRef: ElementRef, + private renderer: Renderer2, + @Inject(DOCUMENT) private doc: any, + private cdr: ChangeDetectorRef + ) { this.document = this.doc; } @@ -165,6 +175,9 @@ export class DrawerComponent implements OnInit, OnDestroy { if (activeElement && typeof activeElement['blur'] === 'function') { activeElement['blur'](); } + setTimeout(() => { + this.handleResizeWidth(); + }, 0); this.isCover = this.isCover === undefined ? true : this.isCover; if (!this.backdropCloseable || this.isCover) { return; @@ -294,4 +307,52 @@ export class DrawerComponent implements OnInit, OnDestroy { public setFullScreen(fullScreen: boolean) { this._setFullScreen(fullScreen); } + + private stopPropagation = ({ originalEvent: event }) => { + event.stopPropagation(); + if (event.cancelable) { + event.preventDefault(); + } + }; + + private moveStream = (resize) => (mouseDown) => + resize.dragEvent.pipe( + takeUntil(resize.releaseEvent), + map(({ pageX, pageY }) => ({ + originalX: mouseDown.pageX, + originalY: mouseDown.pageY, + pageX, + pageY, + })) + ); + + public handleResizeWidth() { + if (this.resizable) { + this.resizeCmp.pressEvent + .pipe( + tap(this.stopPropagation), + filter(() => { + this._curWidth = this._width; + return this.resizable; + }), + switchMap(this.moveStream(this.resizeCmp)) + ) + .subscribe(({ pageX, originalX }) => { + this.showAnimation = false; + let tmpWidth; + if (this.position === 'left') { + tmpWidth = parseInt(this._curWidth, 10) + pageX - originalX + 'px'; + } else { + tmpWidth = parseInt(this._curWidth, 10) + originalX - pageX + 'px'; + } + this.setWidth(tmpWidth); + + this.cdr.detectChanges(); + }); + + this.resizeCmp.releaseEvent.subscribe(() => { + this.showAnimation = true; + }); + } + } } diff --git a/devui/drawer/drawer.moudule.ts b/devui/drawer/drawer.moudule.ts index f7bf9925..710f9519 100755 --- a/devui/drawer/drawer.moudule.ts +++ b/devui/drawer/drawer.moudule.ts @@ -3,6 +3,7 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { OverlayContainerModule } from 'ng-devui/overlay-container'; import { PortalModule } from 'ng-devui/portal'; +import { SplitterModule } from 'ng-devui/splitter'; import { DrawerComponent, DrawerContentDirective } from './drawer.component'; import { DrawerService } from './drawer.service'; @@ -10,6 +11,7 @@ import { DrawerService } from './drawer.service'; imports: [ CommonModule, ScrollingModule, + SplitterModule, PortalModule, OverlayContainerModule ], diff --git a/devui/drawer/drawer.service.ts b/devui/drawer/drawer.service.ts index 39346b88..98297b79 100755 --- a/devui/drawer/drawer.service.ts +++ b/devui/drawer/drawer.service.ts @@ -31,7 +31,8 @@ export class DrawerService { position = 'right', bodyScrollable = true, showAnimation = true, - contentTemplate + contentTemplate, + resizable = false }: IDrawerOptions): IDrawerOpenResult { const componentFactoryResolver_ = componentFactoryResolver || this.componentFactoryResolver; const drawerRef = this.overlayContainerRef.createComponent( @@ -52,7 +53,8 @@ export class DrawerService { backdropCloseable: isUndefined(backdropCloseable) ? true : backdropCloseable, bodyScrollable, showAnimation, - contentTemplate + contentTemplate, + resizable }); let drawerContentRef; diff --git a/devui/drawer/drawer.types.ts b/devui/drawer/drawer.types.ts index 08d46a60..83a4bc39 100755 --- a/devui/drawer/drawer.types.ts +++ b/devui/drawer/drawer.types.ts @@ -28,6 +28,7 @@ export interface IDrawerOptions { bodyScrollable?: boolean; showAnimation?: boolean; contentTemplate?: TemplateRef; + resizable?: boolean; } export interface IDrawerOpenResult { diff --git a/devui/dropdown/dropdown.directive.ts b/devui/dropdown/dropdown.directive.ts index 57107a13..fb5cded8 100755 --- a/devui/dropdown/dropdown.directive.ts +++ b/devui/dropdown/dropdown.directive.ts @@ -7,6 +7,7 @@ import { Directive, ElementRef, EventEmitter, + forwardRef, HostBinding, Inject, Input, @@ -16,8 +17,7 @@ import { Output, QueryList, SimpleChanges, - SkipSelf, - forwardRef + SkipSelf } from '@angular/core'; import { addClassToOrigin, DevConfigService, formWithDropDown, removeClassFromOrigin, WithConfig } from 'ng-devui/utils'; import { fromEvent, merge, Observable, ReplaySubject, Subscription } from 'rxjs'; @@ -28,7 +28,7 @@ import { DropDownService } from './dropdown.service'; selector: '[dDropDown]', exportAs: 'd-dropdown', providers: [DropDownService], - }) +}) export class DropDownDirective implements OnDestroy, OnChanges, AfterContentInit { @ContentChildren(forwardRef(() => DropDownDirective), { descendants: true }) dropdownChildren: QueryList; private hoverSubscription: Subscription; diff --git a/devui/form/validator-directive/form-control-rules.directive.ts b/devui/form/validator-directive/form-control-rules.directive.ts index 57e21a8b..3f820685 100644 --- a/devui/form/validator-directive/form-control-rules.directive.ts +++ b/devui/form/validator-directive/form-control-rules.directive.ts @@ -459,7 +459,7 @@ const dControlErrorStatusHost = { /* eslint-disable-next-line @angular-eslint/no-host-metadata-property*/ host: dControlErrorStatusHost, exportAs: 'dValidateRules', - }) +}) export class DFormGroupRuleDirective extends DAbstractControlRuleDirective implements OnInit, OnChanges, OnDestroy { @Input('dValidateRules') rules: DValidateRules; @Output() dRulesStatusChange: EventEmitter = new EventEmitter(); @@ -504,7 +504,7 @@ export class DFormGroupRuleDirective extends DAbstractControlRuleDirective imple /* eslint-disable-next-line @angular-eslint/no-host-metadata-property*/ host: dControlErrorStatusHost, exportAs: 'dValidateRules', - }) +}) export class DFormControlRuleDirective extends DAbstractControlRuleDirective implements OnInit, OnChanges, OnDestroy { @Input('dValidateRules') rules: DValidateRules; @Output() dRulesStatusChange: EventEmitter = new EventEmitter(); @@ -525,13 +525,13 @@ export class DFormControlRuleDirective extends DAbstractControlRuleDirective imp } constructor( - @Self() cd: NgControl, - @Optional() @Host() private dFormItem: FormItemComponent, - @Optional() @Host() @SkipSelf() parentDir: DFormGroupRuleDirective, - private i18n: I18nService, - public triggerElementRef: ElementRef, - private overlayContainerRef: OverlayContainerRef, - private componentFactoryResolver: ComponentFactoryResolver + @Self() cd: NgControl, + @Optional() @Host() private dFormItem: FormItemComponent, + @Optional() @Host() @SkipSelf() parentDir: DFormGroupRuleDirective, + private i18n: I18nService, + public triggerElementRef: ElementRef, + private overlayContainerRef: OverlayContainerRef, + private componentFactoryResolver: ComponentFactoryResolver ) { super(cd, parentDir); } diff --git a/devui/form/validator-directive/validate.type.ts b/devui/form/validator-directive/validate.type.ts index e9d0217c..e12d48d8 100644 --- a/devui/form/validator-directive/validate.type.ts +++ b/devui/form/validator-directive/validate.type.ts @@ -31,8 +31,8 @@ export interface DValidateRule { priority?: number; isNgValidator?: boolean; validateLevel?: 'error' | 'warning'; // 校验级别 - [id: string]: boolean | number | string | { [key: string]: string } - | RegExp | DValidatorFn | ValidatorFn | undefined | TemplateRef; // 万能key + [id: string]: boolean | number | string | + { [key: string]: string } | RegExp | DValidatorFn | ValidatorFn | undefined | TemplateRef; // 万能key } export interface DAsyncValidateRule { id?: string; diff --git a/devui/gantt/gantt-scale/gantt-scale.component.scss b/devui/gantt/gantt-scale/gantt-scale.component.scss index 995ccdd9..515ba2d5 100644 --- a/devui/gantt/gantt-scale/gantt-scale.component.scss +++ b/devui/gantt/gantt-scale/gantt-scale.component.scss @@ -99,7 +99,7 @@ bottom: 0; width: 1px; z-index: 1; - background: $devui-gray-5; + background: $devui-area; opacity: 1; } @@ -152,7 +152,7 @@ top: 0; bottom: 0; z-index: 1; - background: $devui-gray-5; + background: $devui-area; background-size: 6px 6px; &.day { diff --git a/devui/i18n/en-us.ts b/devui/i18n/en-us.ts index ae4ec829..dc4ef38d 100644 --- a/devui/i18n/en-us.ts +++ b/devui/i18n/en-us.ts @@ -24,6 +24,7 @@ export default { btnOk: 'OK', btnCancel: 'Cancel', btnClose: 'Close', + reset: 'Reset', btnClickMe: 'click me!', copied: 'Copied', }, @@ -130,18 +131,18 @@ export default { month: 'Month', milestone: 'milestone', monthsOfYear: [ - 'January', - 'February', - 'March', - 'April', + 'Jan', + 'Feb', + 'Mar', + 'Apr', 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December', + 'Jun', + 'Jul', + 'Aug', + 'Sept', + 'Oct', + 'Nov', + 'Dec', ], yearDisplay(year) { return `${year}`; @@ -150,7 +151,7 @@ export default { return this.monthsOfYear[Number(strMonthIndex) - 1]; }, yearAndMonthDisplay(year: string, strMonthIndex: string) { - return this.yearDisplay(year) + this.monthDisplay(strMonthIndex); + return this.monthDisplay(strMonthIndex) + ' ' + this.yearDisplay(year); }, }, pagination: { diff --git a/devui/i18n/i18n.model.ts b/devui/i18n/i18n.model.ts index f65765e5..38b5b4a5 100644 --- a/devui/i18n/i18n.model.ts +++ b/devui/i18n/i18n.model.ts @@ -12,6 +12,7 @@ export interface I18nInterface { btnClose: string; btnClickMe: string; copied: string; + reset: string; }; autoComplete: { latestInput: string; diff --git a/devui/i18n/i18n.service.ts b/devui/i18n/i18n.service.ts index 50d3853e..98b203af 100644 --- a/devui/i18n/i18n.service.ts +++ b/devui/i18n/i18n.service.ts @@ -35,7 +35,11 @@ export class I18nService { } toggleLang(lang = this.DEFAULT_LANG) { - localStorage.setItem('lang', lang); + try { + localStorage.setItem('lang', lang); + } catch (error) { + console.error(error); + } if (Object.prototype.hasOwnProperty.call(this.i18nConfig, lang)) { this.currentLang = lang; this.i18nSubject.next(this.getI18nText()); diff --git a/devui/i18n/zh-cn.ts b/devui/i18n/zh-cn.ts index f2c209c4..3384aceb 100644 --- a/devui/i18n/zh-cn.ts +++ b/devui/i18n/zh-cn.ts @@ -8,6 +8,7 @@ export default { loading: '加载中...', checkAll: '全选', btnOk: '确定', + reset: '重置', btnCancel: '取消', btnClose: '关闭', btnClickMe: '点击我', diff --git a/devui/icon/icon.component.spec.ts b/devui/icon/icon.component.spec.ts index 23c9fed6..619364af 100644 --- a/devui/icon/icon.component.spec.ts +++ b/devui/icon/icon.component.spec.ts @@ -8,7 +8,7 @@ import { IconModule } from "./icon.module"; @Component({ template: ` - `, standalone: true, imports: [IconModule] -}) + }) class TestIconComponent { icon: string | TemplateRef = ''; - operable: boolean = false; - disabled: boolean = false; + operable = false; + disabled = false; rotate?: number | 'infinite'; color?: string; @ViewChild('iconTemplate', { static: true }) iconTemplate: TemplateRef; diff --git a/devui/image-preview/image-preview.component.html b/devui/image-preview/image-preview.component.html index bfc20808..3e2da72f 100644 --- a/devui/image-preview/image-preview.component.html +++ b/devui/image-preview/image-preview.component.html @@ -10,7 +10,7 @@ - +
- -