@alauda/ui 6.2.0 → 6.2.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alauda-ui.metadata.json +1 -1
- package/bundles/alauda-ui.umd.js +65 -20
- package/bundles/alauda-ui.umd.js.map +1 -1
- package/bundles/alauda-ui.umd.min.js +1 -1
- package/bundles/alauda-ui.umd.min.js.map +1 -1
- package/checkbox/checkbox.component.d.ts +1 -1
- package/esm2015/accordion/accordion-item/accordion-item.component.ngfactory.js +2 -2
- package/esm2015/back-top/back-top.component.ngfactory.js +2 -2
- package/esm2015/breadcrumb/breadcrumb-item.component.ngfactory.js +2 -2
- package/esm2015/button/button.component.ngfactory.js +2 -2
- package/esm2015/checkbox/checkbox-group/checkbox-group.component.ngfactory.js +1 -1
- package/esm2015/checkbox/checkbox-group/checkbox-group.component.ngsummary.json +1 -1
- package/esm2015/checkbox/checkbox.component.js +7 -6
- package/esm2015/checkbox/checkbox.component.ngfactory.js +3 -3
- package/esm2015/checkbox/checkbox.component.ngsummary.json +1 -1
- package/esm2015/color-picker/color-picker.component.ngfactory.js +1 -1
- package/esm2015/color-picker/color-picker.component.ngsummary.json +1 -1
- package/esm2015/date-picker/calendar/date-picker-panel/component.ngfactory.js +4 -4
- package/esm2015/date-picker/calendar/date-picker-panel/component.ngsummary.json +1 -1
- package/esm2015/date-picker/calendar/header/component.ngfactory.js +5 -5
- package/esm2015/date-picker/calendar/range-picker-panel/component.ngfactory.js +5 -5
- package/esm2015/date-picker/calendar/range-picker-panel/component.ngsummary.json +1 -1
- package/esm2015/date-picker/date-picker/date-picker.component.ngfactory.js +4 -4
- package/esm2015/date-picker/date-picker/date-picker.component.ngsummary.json +1 -1
- package/esm2015/date-picker/range-picker/range-picker.component.ngfactory.js +4 -4
- package/esm2015/date-picker/range-picker/range-picker.component.ngsummary.json +1 -1
- package/esm2015/date-picker/trigger/trigger.component.ngfactory.js +9 -9
- package/esm2015/dialog/confirm-dialog/confirm-dialog.component.ngfactory.js +3 -3
- package/esm2015/dialog/dialog-content/dialog-header.component.ngfactory.js +2 -2
- package/esm2015/dialog/dialog.component.js +2 -2
- package/esm2015/dialog/dialog.component.ngfactory.js +2 -2
- package/esm2015/drawer/component/drawer.component.ngfactory.js +2 -2
- package/esm2015/dropdown/dropdown-button/dropdown-button.component.ngfactory.js +2 -2
- package/esm2015/dropdown/submenu/submenu.component.ngfactory.js +2 -2
- package/esm2015/form/common-form.js +12 -4
- package/esm2015/form/common-form.ngsummary.json +1 -1
- package/esm2015/icon/icon.component.js +4 -4
- package/esm2015/icon/icon.component.ngfactory.js +4 -4
- package/esm2015/icon/icon.component.ngsummary.json +1 -1
- package/esm2015/icon/icon.module.ngfactory.js +1 -1
- package/esm2015/inline-alert/inline-alert.component.ngfactory.js +4 -4
- package/esm2015/input/input.component.js +8 -2
- package/esm2015/input/input.component.ngfactory.js +1 -1
- package/esm2015/input/input.component.ngsummary.json +1 -1
- package/esm2015/input/number-input/number-input.component.ngfactory.js +4 -4
- package/esm2015/input/number-input/number-input.component.ngsummary.json +1 -1
- package/esm2015/input/search/search.component.ngfactory.js +6 -6
- package/esm2015/input/tags-input/tags-input.component.js +5 -4
- package/esm2015/input/tags-input/tags-input.component.ngfactory.js +1 -1
- package/esm2015/input/tags-input/tags-input.component.ngsummary.json +1 -1
- package/esm2015/message/message.component.ngfactory.js +2 -2
- package/esm2015/notification/notification.component.ngfactory.js +3 -3
- package/esm2015/paginator/paginator.component.ngfactory.js +10 -10
- package/esm2015/radio/base-radio.js +6 -2
- package/esm2015/radio/base-radio.ngsummary.json +1 -1
- package/esm2015/radio/radio-button/radio-button.component.ngfactory.js +3 -3
- package/esm2015/radio/radio-button/radio-button.component.ngsummary.json +1 -1
- package/esm2015/radio/radio-group/radio-group.component.ngfactory.js +1 -1
- package/esm2015/radio/radio-group/radio-group.component.ngsummary.json +1 -1
- package/esm2015/radio/radio.component.ngfactory.js +1 -1
- package/esm2015/radio/radio.component.ngsummary.json +1 -1
- package/esm2015/select/multi-select/multi-select.component.js +6 -5
- package/esm2015/select/multi-select/multi-select.component.ngfactory.js +7 -7
- package/esm2015/select/multi-select/multi-select.component.ngsummary.json +1 -1
- package/esm2015/select/option/option.component.js +6 -2
- package/esm2015/select/option/option.component.ngfactory.js +3 -3
- package/esm2015/select/option/option.component.ngsummary.json +1 -1
- package/esm2015/select/select.component.js +2 -2
- package/esm2015/select/select.component.ngfactory.js +7 -7
- package/esm2015/select/select.component.ngsummary.json +1 -1
- package/esm2015/steps/steps.component.ngfactory.js +3 -3
- package/esm2015/switch/switch.component.ngfactory.js +1 -1
- package/esm2015/switch/switch.component.ngsummary.json +1 -1
- package/esm2015/table/table-cell.component.ngfactory.js +2 -2
- package/esm2015/tabs/tab-group.component.ngfactory.js +3 -3
- package/esm2015/tabs/tab-header.component.ngfactory.js +3 -3
- package/esm2015/tag/tag.component.ngfactory.js +3 -3
- package/esm2015/theme/public-api.js +2 -2
- package/esm2015/theme/public-api.ngsummary.json +1 -1
- package/esm2015/theme/theme-picker.pipe.js +36 -0
- package/esm2015/theme/{theme.pipe.ngsummary.json → theme-picker.pipe.ngsummary.json} +1 -1
- package/esm2015/theme/theme.module.js +2 -2
- package/esm2015/theme/theme.module.ngfactory.js +1 -1
- package/esm2015/theme/theme.module.ngsummary.json +1 -1
- package/esm2015/theme/theme.types.js +1 -1
- package/esm2015/time-picker/component.ngfactory.js +8 -8
- package/esm2015/time-picker/component.ngsummary.json +1 -1
- package/esm2015/time-picker/panel/panel.component.js +5 -4
- package/esm2015/time-picker/panel/panel.component.ngfactory.js +1 -1
- package/esm2015/time-picker/panel/panel.component.ngsummary.json +1 -1
- package/esm2015/tree-select/tree-node/tree-node.component.ngfactory.js +4 -4
- package/esm2015/tree-select/tree-select.component.ngfactory.js +5 -5
- package/esm2015/tree-select/tree-select.component.ngsummary.json +1 -1
- package/fesm2015/alauda-ui.js +50 -21
- package/fesm2015/alauda-ui.js.map +1 -1
- package/form/common-form.d.ts +4 -2
- package/input/input.component.d.ts +1 -0
- package/input/tags-input/tags-input.component.d.ts +1 -1
- package/package.json +1 -1
- package/radio/base-radio.d.ts +1 -0
- package/select/multi-select/multi-select.component.d.ts +1 -1
- package/select/option/option.component.d.ts +1 -0
- package/theme/public-api.d.ts +1 -1
- package/theme/{theme.pipe.d.ts → theme-picker.pipe.d.ts} +0 -0
- package/theme/theme.types.d.ts +1 -1
- package/time-picker/panel/panel.component.d.ts +1 -1
- package/esm2015/theme/theme.pipe.js +0 -33
package/fesm2015/alauda-ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TemplateRef, ɵɵdefineInjectable, Injectable, Pipe, ChangeDetectorRef, NgModule, Optional, Inject, SkipSelf, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Directive, EventEmitter, Output, ElementRef, ViewContainerRef,
|
|
1
|
+
import { TemplateRef, ɵɵdefineInjectable, Injectable, Pipe, ChangeDetectorRef, NgModule, Optional, Inject, SkipSelf, Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, Input, Directive, EventEmitter, Output, ElementRef, ViewContainerRef, ViewChild, ContentChild, Host, isDevMode, Renderer2, NgZone, HostListener, InjectionToken, Injector, ContentChildren, forwardRef, ɵɵinject, ApplicationRef, ComponentFactoryResolver, ViewChildren, Type } from '@angular/core';
|
|
2
2
|
import { Observable, ReplaySubject, Subject, merge, fromEvent, BehaviorSubject, combineLatest, of, Subscription, EMPTY, animationFrameScheduler } from 'rxjs';
|
|
3
3
|
import { startWith, map, publishReplay, refCount, distinctUntilChanged, takeUntil, switchMap, throttleTime, debounceTime, first, tap, take, pluck, observeOn, repeat, takeWhile, endWith, filter } from 'rxjs/operators';
|
|
4
4
|
import { CdkCellDef, CdkCell, CdkColumnDef, CdkHeaderCellDef, CdkHeaderCell, CdkHeaderRowDef, CdkHeaderRow, CDK_ROW_TEMPLATE, CdkRowDef, CdkRow, CdkTable, CDK_TABLE_TEMPLATE, CDK_TABLE, _COALESCED_STYLE_SCHEDULER, _CoalescedStyleScheduler, CdkTableModule } from '@angular/cdk/table';
|
|
@@ -209,6 +209,9 @@ class ThemePickerPipe {
|
|
|
209
209
|
if (v instanceof Function) {
|
|
210
210
|
return v(this.currentTheme);
|
|
211
211
|
}
|
|
212
|
+
if (Array.isArray(v)) {
|
|
213
|
+
return v[this.currentTheme === 'light' ? 0 : 1];
|
|
214
|
+
}
|
|
212
215
|
return v[this.currentTheme];
|
|
213
216
|
}
|
|
214
217
|
ngOnDestroy() {
|
|
@@ -338,7 +341,7 @@ class IconComponent {
|
|
|
338
341
|
IconComponent.decorators = [
|
|
339
342
|
{ type: Component, args: [{
|
|
340
343
|
selector: 'aui-icon',
|
|
341
|
-
template: "<svg\n *ngIf=\"icon === 'spinner'; else icons\"\n [attr.class]=\"getClass('aui-icon-spinner')\"\n [style.fill]=\"color\"\n [style.width]=\"getWidth()\"\n [style.height]=\"getHeight()\"\n viewBox=\"0 0 200 200\"\n>\n <defs>\n <linearGradient\n [attr.id]=\"'right-' + id\"\n gradientUnits=\"userSpaceOnUse\"\n x1=\"150\"\n y1=\"20\"\n x2=\"150\"\n y2=\"180\"\n >\n <stop offset=\"0\" style=\"stop-color: #000\" />\n <stop offset=\"1\" style=\"stop-color: #808080\" />\n </linearGradient>\n <linearGradient\n [attr.id]=\"'left-' + id\"\n gradientUnits=\"userSpaceOnUse\"\n x1=\"50\"\n y1=\"0\"\n x2=\"50\"\n y2=\"180\"\n >\n <stop offset=\"0\" style=\"stop-color: #fff\" />\n <stop offset=\"1\" style=\"stop-color: #808080\" />\n </linearGradient>\n <mask [attr.id]=\"'mask-' + id\">\n <g>\n <path\n [attr.fill]=\"'url(#right-' + id + ')'\"\n d=\"M100,0v20c44.1,0,80,35.9,80,80c0,44.1-35.9,80-80,80v20c55.2,0,100-44.8,100-100S155.2,0,100,0z\"\n />\n <path\n [attr.fill]=\"'url(#left-' + id + ')'\"\n d=\"M20,100c0-44.1,35.9-80,80-80V0C44.8,0,0,44.8,0,100s44.8,100,100,100v-20C55.9,180,20,144.1,20,100z\"\n />\n </g>\n </mask>\n </defs>\n <rect\n x=\"0\"\n y=\"0\"\n width=\"200\"\n height=\"200\"\n [attr.mask]=\"'url(#mask-' + id + ')'\"\n />\n</svg>\n\n<ng-template #icons>\n <svg\n *ngIf=\"
|
|
344
|
+
template: "<svg\n *ngIf=\"icon === 'spinner'; else icons\"\n [attr.class]=\"getClass('aui-icon-spinner')\"\n [style.fill]=\"color\"\n [style.width]=\"getWidth()\"\n [style.height]=\"getHeight()\"\n viewBox=\"0 0 200 200\"\n>\n <defs>\n <linearGradient\n [attr.id]=\"'right-' + id\"\n gradientUnits=\"userSpaceOnUse\"\n x1=\"150\"\n y1=\"20\"\n x2=\"150\"\n y2=\"180\"\n >\n <stop offset=\"0\" style=\"stop-color: #000\" />\n <stop offset=\"1\" style=\"stop-color: #808080\" />\n </linearGradient>\n <linearGradient\n [attr.id]=\"'left-' + id\"\n gradientUnits=\"userSpaceOnUse\"\n x1=\"50\"\n y1=\"0\"\n x2=\"50\"\n y2=\"180\"\n >\n <stop offset=\"0\" style=\"stop-color: #fff\" />\n <stop offset=\"1\" style=\"stop-color: #808080\" />\n </linearGradient>\n <mask [attr.id]=\"'mask-' + id\">\n <g>\n <path\n [attr.fill]=\"'url(#right-' + id + ')'\"\n d=\"M100,0v20c44.1,0,80,35.9,80,80c0,44.1-35.9,80-80,80v20c55.2,0,100-44.8,100-100S155.2,0,100,0z\"\n />\n <path\n [attr.fill]=\"'url(#left-' + id + ')'\"\n d=\"M20,100c0-44.1,35.9-80,80-80V0C44.8,0,0,44.8,0,100s44.8,100,100,100v-20C55.9,180,20,144.1,20,100z\"\n />\n </g>\n </mask>\n </defs>\n <rect\n x=\"0\"\n y=\"0\"\n width=\"200\"\n height=\"200\"\n [attr.mask]=\"'url(#mask-' + id + ')'\"\n />\n</svg>\n\n<ng-template #icons>\n <svg\n *ngIf=\"getIconId(icon ? icon : ([light, dark] | auiThemePicker)) as iconId\"\n [attr.class]=\"getClass(iconId)\"\n [style.fill]=\"color\"\n [style.width]=\"getWidth()\"\n [style.height]=\"getHeight()\"\n >\n <use [attr.xlink:href]=\"link + '#' + iconId\"></use>\n </svg>\n</ng-template>\n",
|
|
342
345
|
encapsulation: ViewEncapsulation.None,
|
|
343
346
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
344
347
|
preserveWhitespaces: false,
|
|
@@ -349,7 +352,7 @@ IconComponent.ctorParameters = () => [
|
|
|
349
352
|
{ type: IconRegisterService }
|
|
350
353
|
];
|
|
351
354
|
IconComponent.propDecorators = {
|
|
352
|
-
icon: [{ type: Input }],
|
|
355
|
+
icon: [{ type: HostBinding, args: ['attr.data-test',] }, { type: Input }],
|
|
353
356
|
light: [{ type: Input }],
|
|
354
357
|
dark: [{ type: Input }],
|
|
355
358
|
link: [{ type: Input }],
|
|
@@ -2154,7 +2157,7 @@ class DialogComponent {
|
|
|
2154
2157
|
DialogComponent.decorators = [
|
|
2155
2158
|
{ type: Component, args: [{
|
|
2156
2159
|
selector: 'aui-dialog',
|
|
2157
|
-
template: "<div [ngClass]=\"rootClass\" [ngStyle]=\"customStyle\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n",
|
|
2160
|
+
template: "<div [ngClass]=\"rootClass\" [ngStyle]=\"customStyle\" data-test=\"AUI-DIALOG\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n",
|
|
2158
2161
|
encapsulation: ViewEncapsulation.None,
|
|
2159
2162
|
// tslint:disable-next-line:validate-decorators
|
|
2160
2163
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
@@ -2674,8 +2677,9 @@ FormModule.decorators = [
|
|
|
2674
2677
|
*/
|
|
2675
2678
|
// tslint:disable-next-line:directive-class-suffix
|
|
2676
2679
|
class CommonFormControl {
|
|
2677
|
-
constructor(cdr) {
|
|
2680
|
+
constructor(cdr, elementRef) {
|
|
2678
2681
|
this.cdr = cdr;
|
|
2682
|
+
this.elementRef = elementRef;
|
|
2679
2683
|
this.valueChange = new EventEmitter();
|
|
2680
2684
|
this.value$$ = new ReplaySubject(1);
|
|
2681
2685
|
this._disabled = false;
|
|
@@ -2690,6 +2694,11 @@ class CommonFormControl {
|
|
|
2690
2694
|
set disabled(val) {
|
|
2691
2695
|
this._disabled = coerceAttrBoolean(val);
|
|
2692
2696
|
}
|
|
2697
|
+
get testId() {
|
|
2698
|
+
return ('AUI-FORM-CONTROL/' +
|
|
2699
|
+
(this.elementRef.nativeElement.getAttribute('formControlName') ||
|
|
2700
|
+
this.elementRef.nativeElement.getAttribute('name')));
|
|
2701
|
+
}
|
|
2693
2702
|
get readonly() {
|
|
2694
2703
|
return this.disabled;
|
|
2695
2704
|
}
|
|
@@ -2740,10 +2749,12 @@ CommonFormControl.decorators = [
|
|
|
2740
2749
|
{ type: Directive }
|
|
2741
2750
|
];
|
|
2742
2751
|
CommonFormControl.ctorParameters = () => [
|
|
2743
|
-
{ type: ChangeDetectorRef }
|
|
2752
|
+
{ type: ChangeDetectorRef },
|
|
2753
|
+
{ type: ElementRef }
|
|
2744
2754
|
];
|
|
2745
2755
|
CommonFormControl.propDecorators = {
|
|
2746
2756
|
disabled: [{ type: Input }],
|
|
2757
|
+
testId: [{ type: HostBinding, args: ['attr.data-test',] }],
|
|
2747
2758
|
readonly: [{ type: Input }],
|
|
2748
2759
|
propValue: [{ type: Input, args: ['value',] }],
|
|
2749
2760
|
valueChange: [{ type: Output }]
|
|
@@ -2849,6 +2860,9 @@ class BaseRadio {
|
|
|
2849
2860
|
this._value = val;
|
|
2850
2861
|
this.value$$.next(val);
|
|
2851
2862
|
}
|
|
2863
|
+
get _testId() {
|
|
2864
|
+
return 'RADIO/' + this.value;
|
|
2865
|
+
}
|
|
2852
2866
|
ngOnInit() {
|
|
2853
2867
|
this.radioGroup.name$.pipe(takeUntil(this.destroy$$)).subscribe(name => {
|
|
2854
2868
|
this.name = name;
|
|
@@ -2889,6 +2903,7 @@ BaseRadio.ctorParameters = () => [
|
|
|
2889
2903
|
BaseRadio.propDecorators = {
|
|
2890
2904
|
disabled: [{ type: Input }],
|
|
2891
2905
|
value: [{ type: Input }],
|
|
2906
|
+
_testId: [{ type: HostBinding, args: ['attr.data-test',] }],
|
|
2892
2907
|
elRef: [{ type: ViewChild, args: ['elRef', { static: true },] }]
|
|
2893
2908
|
};
|
|
2894
2909
|
|
|
@@ -3080,8 +3095,8 @@ CheckboxGroupComponent.propDecorators = {
|
|
|
3080
3095
|
|
|
3081
3096
|
let uniqueId$2 = 0;
|
|
3082
3097
|
class CheckboxComponent extends CommonFormControl {
|
|
3083
|
-
constructor(cdr, checkboxGroup, focusMonitor) {
|
|
3084
|
-
super(cdr);
|
|
3098
|
+
constructor(cdr, checkboxGroup, focusMonitor, elementRef) {
|
|
3099
|
+
super(cdr, elementRef);
|
|
3085
3100
|
this.focusMonitor = focusMonitor;
|
|
3086
3101
|
this.id = `aui-checkbox-${uniqueId$2++}`;
|
|
3087
3102
|
this.name = '';
|
|
@@ -3166,12 +3181,13 @@ CheckboxComponent.decorators = [
|
|
|
3166
3181
|
CheckboxComponent.ctorParameters = () => [
|
|
3167
3182
|
{ type: ChangeDetectorRef },
|
|
3168
3183
|
{ type: CheckboxGroupComponent, decorators: [{ type: Optional }, { type: Inject, args: [forwardRef(() => CheckboxGroupComponent),] }] },
|
|
3169
|
-
{ type: FocusMonitor }
|
|
3184
|
+
{ type: FocusMonitor },
|
|
3185
|
+
{ type: ElementRef }
|
|
3170
3186
|
];
|
|
3171
3187
|
CheckboxComponent.propDecorators = {
|
|
3172
3188
|
name: [{ type: Input }],
|
|
3173
3189
|
type: [{ type: Input }],
|
|
3174
|
-
label: [{ type: Input }],
|
|
3190
|
+
label: [{ type: HostBinding, args: ['attr.data-test',] }, { type: Input }],
|
|
3175
3191
|
indeterminate: [{ type: Input }],
|
|
3176
3192
|
elRef: [{ type: ViewChild, args: ['elRef', { static: true },] }]
|
|
3177
3193
|
};
|
|
@@ -3201,6 +3217,11 @@ class InputComponent {
|
|
|
3201
3217
|
this.renderer.addClass(this.elementRef.nativeElement, 'aui-input');
|
|
3202
3218
|
this.renderer.addClass(this.elementRef.nativeElement, 'aui-input--' + this.size);
|
|
3203
3219
|
}
|
|
3220
|
+
get testId() {
|
|
3221
|
+
return (this.elementRef.nativeElement.getAttribute('formcontrolname') ||
|
|
3222
|
+
this.elementRef.nativeElement.getAttribute('name') ||
|
|
3223
|
+
'aui-input');
|
|
3224
|
+
}
|
|
3204
3225
|
get size() {
|
|
3205
3226
|
return this._size;
|
|
3206
3227
|
}
|
|
@@ -3247,6 +3268,7 @@ InputComponent.ctorParameters = () => [
|
|
|
3247
3268
|
{ type: Renderer2 }
|
|
3248
3269
|
];
|
|
3249
3270
|
InputComponent.propDecorators = {
|
|
3271
|
+
testId: [{ type: HostBinding, args: ['attr.data-test',] }],
|
|
3250
3272
|
size: [{ type: Input }],
|
|
3251
3273
|
disabled: [{ type: Input }]
|
|
3252
3274
|
};
|
|
@@ -3422,8 +3444,8 @@ function createWithMaxRowCount(component) {
|
|
|
3422
3444
|
|
|
3423
3445
|
const INPUT_ERROR_KEY = 'input_data_error';
|
|
3424
3446
|
class TagsInputComponent extends CommonFormControl {
|
|
3425
|
-
constructor(cdr, fb, renderer, injector) {
|
|
3426
|
-
super(cdr);
|
|
3447
|
+
constructor(cdr, fb, renderer, injector, elementRef) {
|
|
3448
|
+
super(cdr, elementRef);
|
|
3427
3449
|
this.fb = fb;
|
|
3428
3450
|
this.renderer = renderer;
|
|
3429
3451
|
this.injector = injector;
|
|
@@ -3646,7 +3668,8 @@ TagsInputComponent.ctorParameters = () => [
|
|
|
3646
3668
|
{ type: ChangeDetectorRef },
|
|
3647
3669
|
{ type: FormBuilder },
|
|
3648
3670
|
{ type: Renderer2 },
|
|
3649
|
-
{ type: Injector }
|
|
3671
|
+
{ type: Injector },
|
|
3672
|
+
{ type: ElementRef }
|
|
3650
3673
|
];
|
|
3651
3674
|
TagsInputComponent.propDecorators = {
|
|
3652
3675
|
placeholder: [{ type: Input }],
|
|
@@ -4546,6 +4569,9 @@ class OptionComponent {
|
|
|
4546
4569
|
this._label = val;
|
|
4547
4570
|
this.label$$.next(val);
|
|
4548
4571
|
}
|
|
4572
|
+
get testId() {
|
|
4573
|
+
return 'AUI-OPTION/' + (this.label || this.value);
|
|
4574
|
+
}
|
|
4549
4575
|
get labelContext() {
|
|
4550
4576
|
return this._labelContext;
|
|
4551
4577
|
}
|
|
@@ -4600,6 +4626,7 @@ OptionComponent.ctorParameters = () => [
|
|
|
4600
4626
|
];
|
|
4601
4627
|
OptionComponent.propDecorators = {
|
|
4602
4628
|
label: [{ type: Input }],
|
|
4629
|
+
testId: [{ type: HostBinding, args: ['attr.data-test',] }],
|
|
4603
4630
|
labelContext: [{ type: Input }],
|
|
4604
4631
|
value: [{ type: Input }],
|
|
4605
4632
|
disabled: [{ type: Input }],
|
|
@@ -4916,8 +4943,8 @@ var SelectAllStatus;
|
|
|
4916
4943
|
})(SelectAllStatus || (SelectAllStatus = {}));
|
|
4917
4944
|
|
|
4918
4945
|
class MultiSelectComponent extends BaseSelect {
|
|
4919
|
-
constructor(cdr, renderer) {
|
|
4920
|
-
super(cdr);
|
|
4946
|
+
constructor(cdr, renderer, elementRef) {
|
|
4947
|
+
super(cdr, elementRef);
|
|
4921
4948
|
this.renderer = renderer;
|
|
4922
4949
|
this.bem = buildBem('aui-multi-select');
|
|
4923
4950
|
this.bemSelectAll = buildBem('aui-option');
|
|
@@ -5149,7 +5176,7 @@ class MultiSelectComponent extends BaseSelect {
|
|
|
5149
5176
|
MultiSelectComponent.decorators = [
|
|
5150
5177
|
{ type: Component, args: [{
|
|
5151
5178
|
selector: 'aui-multi-select',
|
|
5152
|
-
template: "<div\n [class]=\"rootClass\"\n #selectRef\n #tooltipRef=\"auiTooltip\"\n [auiTooltip]=\"templateRef\"\n [auiTooltipDisabled]=\"disabled\"\n auiTooltipTrigger=\"click\"\n auiTooltipPosition=\"bottom start\"\n auiTooltipType=\"plain\"\n (auiTooltipShow)=\"onShowOptions()\"\n (auiTooltipHide)=\"onHideOptions()\"\n (mousedown)=\"$event.preventDefault()\"\n [style.max-height]=\"maxHeight\"\n>\n <div class=\"aui-multi-select__suffix\">\n <span class=\"aui-multi-select__icon-container\">\n <aui-icon\n class=\"aui-multi-select__indicator\"\n [icon]=\"loading ? 'spinner' : 'caret_down_s'\"\n ></aui-icon>\n <aui-icon\n class=\"aui-multi-select__clear\"\n icon=\"close_small\"\n (click)=\"clearValue($event)\"\n ></aui-icon>\n </span>\n </div>\n <span\n [hidden]=\"selectedValues.length || inputRef.value.length\"\n [class]=\"bem.element('placeholder')\"\n >\n {{ placeholder }}\n </span>\n <aui-tag\n *ngFor=\"let option of selectedOptions$ | async; trackBy: trackByValue\"\n type=\"info\"\n [round]=\"true\"\n [border]=\"true\"\n [size]=\"tagSize\"\n [closeable]=\"!disabled\"\n (close)=\"removeValue(option.value)\"\n [ngClass]=\"tagClassFn && tagClassFn(option.label, option.value)\"\n >\n <ng-container\n *ngIf=\"isTemplateRef(option.label); else label\"\n [ngTemplateOutlet]=\"option.label\"\n [ngTemplateOutletContext]=\"option.labelContext\"\n ></ng-container>\n <ng-template #label>\n {{ option.label }}\n </ng-template>\n </aui-tag>\n <input\n #inputRef\n autocomplete=\"off\"\n [readonly]=\"inputReadonly\"\n [class]=\"inputClass\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"onInput($event)\"\n />\n <span #inputValueMirror [class]=\"bem.element('mirror')\">\n {{ inputValue }}\n </span>\n</div>\n\n<ng-template #templateRef>\n <div\n class=\"aui-option-container\"\n [style.minWidth]=\"containerWidth\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <div #optionListRef class=\"aui-option-container__content\">\n <ng-container\n *ngIf=\"\n allowSelectAll &&\n (hasEnabledOptions$ | async) &&\n ((hasVisibleOption$ | async) ||\n (allowCreate && (customCreatedOptions$ | async).length) ||\n (allowCreate && filterString))\n \"\n >\n <div\n class=\"aui-option\"\n [class]=\"bemSelectAll.block(size$ | async)\"\n [class.isDisabled]=\"disabled\"\n [class.isSelected]=\"!!(selectAllStatus$ | async)\"\n [class.isMulti]=\"true\"\n (click)=\"onSelectAllClick()\"\n >\n <i class=\"aui-option__pointer\">\n <aui-icon\n [icon]=\"\n (selectAllStatus$ | async) === 'checked'\n ? 'check_s'\n : 'square_s'\n \"\n [hidden]=\"!(selectAllStatus$ | async)\"\n ></aui-icon>\n </i>\n {{ 'select_all' | auiI18n }}\n </div>\n <hr class=\"divider\" />\n </ng-container>\n <aui-option\n #inputtingOption\n *ngIf=\"allowCreate && filterString && !(hasMatchedOption$ | async)\"\n [value]=\"filterString\"\n >\n {{ filterString }}\n </aui-option>\n <ng-container *ngIf=\"allowCreate\">\n <aui-option\n *ngFor=\"let option of customCreatedOptions$ | async\"\n [label]=\"option.label\"\n [value]=\"option.value\"\n
|
|
5179
|
+
template: "<div\n [class]=\"rootClass\"\n #selectRef\n #tooltipRef=\"auiTooltip\"\n [auiTooltip]=\"templateRef\"\n [auiTooltipDisabled]=\"disabled\"\n auiTooltipTrigger=\"click\"\n auiTooltipPosition=\"bottom start\"\n auiTooltipType=\"plain\"\n (auiTooltipShow)=\"onShowOptions()\"\n (auiTooltipHide)=\"onHideOptions()\"\n (mousedown)=\"$event.preventDefault()\"\n [style.max-height]=\"maxHeight\"\n>\n <div class=\"aui-multi-select__suffix\">\n <span class=\"aui-multi-select__icon-container\">\n <aui-icon\n class=\"aui-multi-select__indicator\"\n [icon]=\"loading ? 'spinner' : 'caret_down_s'\"\n ></aui-icon>\n <aui-icon\n class=\"aui-multi-select__clear\"\n icon=\"close_small\"\n (click)=\"clearValue($event)\"\n ></aui-icon>\n </span>\n </div>\n <span\n [hidden]=\"selectedValues.length || inputRef.value.length\"\n [class]=\"bem.element('placeholder')\"\n >\n {{ placeholder }}\n </span>\n <aui-tag\n *ngFor=\"let option of selectedOptions$ | async; trackBy: trackByValue\"\n type=\"info\"\n [round]=\"true\"\n [border]=\"true\"\n [size]=\"tagSize\"\n [closeable]=\"!disabled\"\n (close)=\"removeValue(option.value)\"\n [ngClass]=\"tagClassFn && tagClassFn(option.label, option.value)\"\n >\n <ng-container\n *ngIf=\"isTemplateRef(option.label); else label\"\n [ngTemplateOutlet]=\"option.label\"\n [ngTemplateOutletContext]=\"option.labelContext\"\n ></ng-container>\n <ng-template #label>\n {{ option.label }}\n </ng-template>\n </aui-tag>\n <input\n #inputRef\n autocomplete=\"off\"\n [readonly]=\"inputReadonly\"\n [class]=\"inputClass\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"onInput($event)\"\n />\n <span #inputValueMirror [class]=\"bem.element('mirror')\">\n {{ inputValue }}\n </span>\n</div>\n\n<ng-template #templateRef>\n <div\n class=\"aui-option-container\"\n [style.minWidth]=\"containerWidth\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <div #optionListRef class=\"aui-option-container__content\">\n <ng-container\n *ngIf=\"\n allowSelectAll &&\n (hasEnabledOptions$ | async) &&\n ((hasVisibleOption$ | async) ||\n (allowCreate && (customCreatedOptions$ | async).length) ||\n (allowCreate && filterString))\n \"\n >\n <div\n class=\"aui-option\"\n [class]=\"bemSelectAll.block(size$ | async)\"\n [class.isDisabled]=\"disabled\"\n [class.isSelected]=\"!!(selectAllStatus$ | async)\"\n [class.isMulti]=\"true\"\n (click)=\"onSelectAllClick()\"\n >\n <i class=\"aui-option__pointer\">\n <aui-icon\n [icon]=\"\n (selectAllStatus$ | async) === 'checked'\n ? 'check_s'\n : 'square_s'\n \"\n [hidden]=\"!(selectAllStatus$ | async)\"\n ></aui-icon>\n </i>\n {{ 'select_all' | auiI18n }}\n </div>\n <hr class=\"divider\" />\n </ng-container>\n <aui-option\n #inputtingOption\n *ngIf=\"allowCreate && filterString && !(hasMatchedOption$ | async)\"\n [value]=\"filterString\"\n >\n {{ filterString }}\n </aui-option>\n <ng-container *ngIf=\"allowCreate\">\n <aui-option\n *ngFor=\"let option of customCreatedOptions$ | async\"\n [label]=\"option.label\"\n [value]=\"option.value\"\n [attr.data-test]=\"'aui-option/' + option.label\"\n >AUI-FORM-CONTROL/\n {{ option.label }}\n </aui-option>\n </ng-container>\n <ng-content></ng-content>\n </div>\n <div\n *ngIf=\"\n !(\n (hasVisibleOption$ | async) ||\n (allowCreate && (customCreatedOptions$ | async).length) ||\n (allowCreate && filterString)\n )\n \"\n class=\"aui-option-container__placeholder\"\n >\n <ng-content select=\"aui-option-placeholder\"></ng-content>\n </div>\n </div>\n</ng-template>\n",
|
|
5153
5180
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5154
5181
|
encapsulation: ViewEncapsulation.None,
|
|
5155
5182
|
preserveWhitespaces: false,
|
|
@@ -5169,7 +5196,8 @@ MultiSelectComponent.decorators = [
|
|
|
5169
5196
|
];
|
|
5170
5197
|
MultiSelectComponent.ctorParameters = () => [
|
|
5171
5198
|
{ type: ChangeDetectorRef },
|
|
5172
|
-
{ type: Renderer2 }
|
|
5199
|
+
{ type: Renderer2 },
|
|
5200
|
+
{ type: ElementRef }
|
|
5173
5201
|
];
|
|
5174
5202
|
MultiSelectComponent.propDecorators = {
|
|
5175
5203
|
tagClassFn: [{ type: Input }],
|
|
@@ -5281,7 +5309,7 @@ class SelectComponent extends BaseSelect {
|
|
|
5281
5309
|
SelectComponent.decorators = [
|
|
5282
5310
|
{ type: Component, args: [{
|
|
5283
5311
|
selector: 'aui-select',
|
|
5284
|
-
template: "<div\n [class]=\"rootClass\"\n [class.isDisabled]=\"disabled\"\n [class.isClearable]=\"isClearable(hasSelected$ | async)\"\n [class.isFilterable]=\"filterable\"\n [class.isOpened]=\"opened\"\n #selectRef\n #tooltipRef=\"auiTooltip\"\n [auiTooltip]=\"templateRef\"\n [auiTooltipDisabled]=\"disabled\"\n auiTooltipTrigger=\"click\"\n auiTooltipPosition=\"bottom start\"\n auiTooltipType=\"plain\"\n (auiTooltipShow)=\"onShowOptions()\"\n (auiTooltipHide)=\"onHideOptions()\"\n>\n <aui-input-group>\n <input\n #inputRef\n class=\"aui-select__input\"\n autocomplete=\"off\"\n aui-input\n [disabled]=\"disabled\"\n [size]=\"size\"\n [readonly]=\"inputReadonly\"\n [placeholder]=\"!(hasSelected$ | async) ? placeholder : ''\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"closeOption()\"\n />\n <span auiInputSuffix class=\"aui-select__icon-container\">\n <aui-icon\n class=\"aui-select__indicator\"\n [icon]=\"loading ? 'spinner' : 'caret_down_s'\"\n ></aui-icon>\n <aui-icon\n class=\"aui-select__clear\"\n icon=\"close_small\"\n (click)=\"clearValue($event)\"\n ></aui-icon>\n </span>\n <div\n *ngIf=\"(selectedOption$ | async) && !filterString\"\n class=\"aui-select__label-container aui-input aui-input--{{ size }}\"\n [attr.disabled]=\"disabled ? true : null\"\n >\n <div class=\"aui-select__label\">\n <ng-container *ngIf=\"(selectedOption$ | async).label as optionLabel\">\n <ng-container\n *ngIf=\"isTemplateRef(optionLabel); else label\"\n [ngTemplateOutlet]=\"optionLabel\"\n [ngTemplateOutletContext]=\"(selectedOption$ | async).labelContext\"\n ></ng-container>\n <ng-template #label>{{ optionLabel }}</ng-template>\n </ng-container>\n </div>\n </div>\n </aui-input-group>\n</div>\n\n<ng-template #templateRef>\n <div\n [class]=\"containerClass\"\n [style.minWidth]=\"containerWidth\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <div #optionListRef class=\"aui-option-container__content\">\n <aui-option\n #inputtingOption\n *ngIf=\"allowCreate && filterString && !(hasMatchedOption$ | async)\"\n [value]=\"filterString\"\n >\n {{ filterString }}\n </aui-option>\n <ng-container *ngIf=\"allowCreate\">\n <aui-option\n *ngFor=\"let option of customCreatedOptions$ | async\"\n [label]=\"option.label\"\n [value]=\"option.value\"\n >\n {{ option.label }}\n </aui-option>\n </ng-container>\n <ng-content></ng-content>\n </div>\n <div\n *ngIf=\"\n !(\n (hasVisibleOption$ | async) ||\n (allowCreate && (customCreatedOptions$ | async).length) ||\n (allowCreate && filterString)\n )\n \"\n class=\"aui-option-container__placeholder\"\n >\n <ng-content select=\"aui-option-placeholder\"></ng-content>\n </div>\n </div>\n</ng-template>\n",
|
|
5312
|
+
template: "<div\n [class]=\"rootClass\"\n [class.isDisabled]=\"disabled\"\n [class.isClearable]=\"isClearable(hasSelected$ | async)\"\n [class.isFilterable]=\"filterable\"\n [class.isOpened]=\"opened\"\n #selectRef\n #tooltipRef=\"auiTooltip\"\n [auiTooltip]=\"templateRef\"\n [auiTooltipDisabled]=\"disabled\"\n auiTooltipTrigger=\"click\"\n auiTooltipPosition=\"bottom start\"\n auiTooltipType=\"plain\"\n (auiTooltipShow)=\"onShowOptions()\"\n (auiTooltipHide)=\"onHideOptions()\"\n>\n <aui-input-group>\n <input\n #inputRef\n class=\"aui-select__input\"\n autocomplete=\"off\"\n aui-input\n [disabled]=\"disabled\"\n [size]=\"size\"\n [readonly]=\"inputReadonly\"\n [placeholder]=\"!(hasSelected$ | async) ? placeholder : ''\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"closeOption()\"\n />\n <span auiInputSuffix class=\"aui-select__icon-container\">\n <aui-icon\n class=\"aui-select__indicator\"\n [icon]=\"loading ? 'spinner' : 'caret_down_s'\"\n ></aui-icon>\n <aui-icon\n class=\"aui-select__clear\"\n icon=\"close_small\"\n (click)=\"clearValue($event)\"\n ></aui-icon>\n </span>\n <div\n *ngIf=\"(selectedOption$ | async) && !filterString\"\n class=\"aui-select__label-container aui-input aui-input--{{ size }}\"\n [attr.disabled]=\"disabled ? true : null\"\n >\n <div class=\"aui-select__label\">\n <ng-container *ngIf=\"(selectedOption$ | async).label as optionLabel\">\n <ng-container\n *ngIf=\"isTemplateRef(optionLabel); else label\"\n [ngTemplateOutlet]=\"optionLabel\"\n [ngTemplateOutletContext]=\"(selectedOption$ | async).labelContext\"\n ></ng-container>\n <ng-template #label>{{ optionLabel }}</ng-template>\n </ng-container>\n </div>\n </div>\n </aui-input-group>\n</div>\n\n<ng-template #templateRef>\n <div\n [class]=\"containerClass\"\n [style.minWidth]=\"containerWidth\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <div #optionListRef class=\"aui-option-container__content\">\n <aui-option\n #inputtingOption\n *ngIf=\"allowCreate && filterString && !(hasMatchedOption$ | async)\"\n [value]=\"filterString\"\n >\n {{ filterString }}\n </aui-option>\n <ng-container *ngIf=\"allowCreate\">\n <aui-option\n *ngFor=\"let option of customCreatedOptions$ | async\"\n [label]=\"option.label\"\n [value]=\"option.value\"\n [attr.data-test]=\"'aui-option/' + option.label\"\n >\n {{ option.label }}\n </aui-option>\n </ng-container>\n <ng-content></ng-content>\n </div>\n <div\n *ngIf=\"\n !(\n (hasVisibleOption$ | async) ||\n (allowCreate && (customCreatedOptions$ | async).length) ||\n (allowCreate && filterString)\n )\n \"\n class=\"aui-option-container__placeholder\"\n >\n <ng-content select=\"aui-option-placeholder\"></ng-content>\n </div>\n </div>\n</ng-template>\n",
|
|
5285
5313
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5286
5314
|
encapsulation: ViewEncapsulation.None,
|
|
5287
5315
|
preserveWhitespaces: false,
|
|
@@ -9248,8 +9276,8 @@ const CONTROL_ITEM_HEIGHT = 28;
|
|
|
9248
9276
|
const TIME_PICKER_COLUMN_WIDTH = 80;
|
|
9249
9277
|
const bem$3 = buildBem('aui-time-picker-panel');
|
|
9250
9278
|
class TimePickerPanelComponent extends CommonFormControl {
|
|
9251
|
-
constructor(cdr) {
|
|
9252
|
-
super(cdr);
|
|
9279
|
+
constructor(cdr, elementRef) {
|
|
9280
|
+
super(cdr, elementRef);
|
|
9253
9281
|
this.cdr = cdr;
|
|
9254
9282
|
this.hourStep = 1;
|
|
9255
9283
|
this.minuteStep = 1;
|
|
@@ -9431,7 +9459,8 @@ TimePickerPanelComponent.decorators = [
|
|
|
9431
9459
|
},] }
|
|
9432
9460
|
];
|
|
9433
9461
|
TimePickerPanelComponent.ctorParameters = () => [
|
|
9434
|
-
{ type: ChangeDetectorRef }
|
|
9462
|
+
{ type: ChangeDetectorRef },
|
|
9463
|
+
{ type: ElementRef }
|
|
9435
9464
|
];
|
|
9436
9465
|
TimePickerPanelComponent.propDecorators = {
|
|
9437
9466
|
format: [{ type: Input }],
|