@alauda/ui 5.7.6-beta.6 → 5.7.6
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 +32 -22
- 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/esm2015/alauda-ui.ngsummary.json +1 -1
- package/esm2015/public-api.ngsummary.json +1 -1
- package/esm2015/select/multi-select/multi-select.component.js +22 -16
- package/esm2015/select/multi-select/multi-select.component.ngfactory.js +3 -3
- package/esm2015/select/public-api.ngsummary.json +1 -1
- package/esm2015/select/select.component.js +1 -1
- package/esm2015/select/select.types.js +1 -1
- package/esm2015/select/select.types.ngsummary.json +1 -1
- package/esm2015/tree-select/tree-select.component.js +1 -1
- package/esm2015/tree-select/tree-select.types.js +1 -1
- package/fesm2015/alauda-ui.js +21 -15
- package/fesm2015/alauda-ui.js.map +1 -1
- package/package.json +1 -1
- package/select/multi-select/multi-select.component.d.ts +3 -2
- package/select/select.component.d.ts +2 -2
- package/select/select.types.d.ts +0 -1
- package/tree-select/tree-select.component.d.ts +2 -2
- package/tree-select/tree-select.types.d.ts +1 -2
package/bundles/alauda-ui.umd.js
CHANGED
|
@@ -5688,28 +5688,38 @@
|
|
|
5688
5688
|
var _this = this;
|
|
5689
5689
|
_super.prototype.ngAfterViewInit.call(this);
|
|
5690
5690
|
this.selectAllStatus$ = rxjs.combineLatest([
|
|
5691
|
-
this.allOptions
|
|
5692
|
-
this.value$,
|
|
5691
|
+
this.allOptions$,
|
|
5693
5692
|
this.filterString$,
|
|
5694
|
-
]).pipe(operators.
|
|
5693
|
+
]).pipe(operators.switchMap(function (_b) {
|
|
5695
5694
|
var _c = __read(_b, 1), allOptions = _c[0];
|
|
5696
|
-
var
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5695
|
+
var _a;
|
|
5696
|
+
return rxjs.combineLatest(__spread((_a = allOptions
|
|
5697
|
+
.filter(function (_b) {
|
|
5698
|
+
var visible = _b.visible, disabled = _b.disabled;
|
|
5699
|
+
return visible && !disabled;
|
|
5700
|
+
})) === null || _a === void 0 ? void 0 : _a.map(function (_b) {
|
|
5701
|
+
var selected$ = _b.selected$;
|
|
5702
|
+
return selected$;
|
|
5703
|
+
})));
|
|
5704
|
+
}), operators.map(function (statuses) {
|
|
5705
|
+
var selected = statuses.filter(function (i) { return i; });
|
|
5706
|
+
return selected.length === 0
|
|
5707
|
+
? exports.SelectAllStatus.Empty
|
|
5708
|
+
: selected.length !== statuses.length
|
|
5709
|
+
? exports.SelectAllStatus.Indeterminate
|
|
5709
5710
|
: exports.SelectAllStatus.Checked;
|
|
5710
|
-
}), operators.startWith(exports.SelectAllStatus.Empty), operators.tap(function (selectAllStatus) {
|
|
5711
|
-
|
|
5712
|
-
|
|
5711
|
+
}), operators.startWith(exports.SelectAllStatus.Empty), operators.tap(function (selectAllStatus) { return (_this.selectAllStatus = selectAllStatus); }), operators.publishReplay(1), operators.refCount());
|
|
5712
|
+
this.hasEnabledOptions$ = rxjs.combineLatest([
|
|
5713
|
+
this.allOptions$,
|
|
5714
|
+
this.filterString$,
|
|
5715
|
+
]).pipe(operators.map(function (_b) {
|
|
5716
|
+
var _c = __read(_b, 1), allOptions = _c[0];
|
|
5717
|
+
return !!allOptions.filter(function (_b) {
|
|
5718
|
+
var visible = _b.visible, disabled = _b.disabled;
|
|
5719
|
+
return visible && !disabled;
|
|
5720
|
+
})
|
|
5721
|
+
.length;
|
|
5722
|
+
}));
|
|
5713
5723
|
};
|
|
5714
5724
|
MultiSelectComponent.prototype.onShowOptions = function () {
|
|
5715
5725
|
_super.prototype.onShowOptions.call(this);
|
|
@@ -5811,8 +5821,8 @@
|
|
|
5811
5821
|
}
|
|
5812
5822
|
var visibleOptionsValue = this.allOptions
|
|
5813
5823
|
.filter(function (_b) {
|
|
5814
|
-
var visible = _b.visible;
|
|
5815
|
-
return visible;
|
|
5824
|
+
var visible = _b.visible, disabled = _b.disabled;
|
|
5825
|
+
return visible && !disabled;
|
|
5816
5826
|
})
|
|
5817
5827
|
.map(function (_b) {
|
|
5818
5828
|
var value = _b.value;
|
|
@@ -5852,7 +5862,7 @@
|
|
|
5852
5862
|
MultiSelectComponent.decorators = [
|
|
5853
5863
|
{ type: i0.Component, args: [{
|
|
5854
5864
|
selector: 'aui-multi-select',
|
|
5855
|
-
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 <aui-icon\n *ngIf=\"displayClearBtn\"\n class=\"aui-multi-select__clear\"\n (click)=\"clearValue($event)\"\n icon=\"close_small\"\n ></aui-icon>\n <aui-icon\n class=\"aui-multi-select__indicator\"\n [icon]=\"loading ? 'spinner' : 'caret_down_s'\"\n ></aui-icon>\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 ((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' ? 'check_s' : 'minus_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 >\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",
|
|
5865
|
+
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 <aui-icon\n *ngIf=\"displayClearBtn\"\n class=\"aui-multi-select__clear\"\n (click)=\"clearValue($event)\"\n icon=\"close_small\"\n ></aui-icon>\n <aui-icon\n class=\"aui-multi-select__indicator\"\n [icon]=\"loading ? 'spinner' : 'caret_down_s'\"\n ></aui-icon>\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' ? 'check_s' : 'minus_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 >\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",
|
|
5856
5866
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5857
5867
|
encapsulation: i0.ViewEncapsulation.None,
|
|
5858
5868
|
preserveWhitespaces: false,
|