@alauda/ui 6.5.9-beta.7 → 6.5.9-beta.9
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/esm2020/input/number-input/number-input.component.mjs +9 -4
- package/esm2020/time-picker/panel/panel.component.mjs +6 -10
- package/fesm2015/alauda-ui.mjs +12 -11
- package/fesm2015/alauda-ui.mjs.map +1 -1
- package/fesm2020/alauda-ui.mjs +12 -11
- package/fesm2020/alauda-ui.mjs.map +1 -1
- package/input/number-input/number-input.component.d.ts +2 -1
- package/package.json +1 -1
- package/src/input/number-input/README.md +1 -0
- package/time-picker/panel/panel.component.d.ts +0 -1
package/fesm2020/alauda-ui.mjs
CHANGED
|
@@ -3888,9 +3888,6 @@ class TimePickerPanelComponent extends CommonFormControl {
|
|
|
3888
3888
|
get totalWidth() {
|
|
3889
3889
|
return this.enabledColumns * TIME_PICKER_COLUMN_WIDTH;
|
|
3890
3890
|
}
|
|
3891
|
-
onMousedown() {
|
|
3892
|
-
return false;
|
|
3893
|
-
}
|
|
3894
3891
|
isDisabled(value, type) {
|
|
3895
3892
|
const currentValue = this.model;
|
|
3896
3893
|
if (this.disabled) {
|
|
@@ -4013,7 +4010,7 @@ class TimePickerPanelComponent extends CommonFormControl {
|
|
|
4013
4010
|
}
|
|
4014
4011
|
}
|
|
4015
4012
|
TimePickerPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TimePickerPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4016
|
-
TimePickerPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: TimePickerPanelComponent, selector: "aui-time-picker-panel", inputs: { format: "format", hourStep: "hourStep", minuteStep: "minuteStep", secondStep: "secondStep", footerTemplate: "footerTemplate", disableHours: "disableHours", disableMinutes: "disableMinutes", disableSeconds: "disableSeconds" }, outputs: { confirm: "confirm" }, host: {
|
|
4013
|
+
TimePickerPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: TimePickerPanelComponent, selector: "aui-time-picker-panel", inputs: { format: "format", hourStep: "hourStep", minuteStep: "minuteStep", secondStep: "secondStep", footerTemplate: "footerTemplate", disableHours: "disableHours", disableMinutes: "disableMinutes", disableSeconds: "disableSeconds" }, outputs: { confirm: "confirm" }, host: { attributes: { "mousedown": "$event.preventDefault()" } }, providers: [
|
|
4017
4014
|
{
|
|
4018
4015
|
provide: NG_VALUE_ACCESSOR,
|
|
4019
4016
|
useExisting: forwardRef(() => TimePickerPanelComponent),
|
|
@@ -4028,12 +4025,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
4028
4025
|
useExisting: forwardRef(() => TimePickerPanelComponent),
|
|
4029
4026
|
multi: true,
|
|
4030
4027
|
},
|
|
4031
|
-
],
|
|
4028
|
+
], host: {
|
|
4029
|
+
mousedown: '$event.preventDefault()',
|
|
4030
|
+
}, template: "<div\n *ngIf=\"enabledColumns\"\n [class]=\"bem.block()\"\n [style.width.px]=\"totalWidth\"\n>\n <div [class]=\"bem.element('content')\">\n <div\n [class]=\"bem.element('column')\"\n #hourRef\n *ngIf=\"hourEnabled\"\n >\n <ul>\n <li\n *ngFor=\"let item of getControlTypeConfig(TimePickerControlType.Hour)\"\n [class]=\"bem.element('cell')\"\n [style.height.px]=\"CONTROL_ITEM_HEIGHT\"\n [ngClass]=\"{\n disabled: isDisabled(item, TimePickerControlType.Hour),\n selected: matchValue(item, TimePickerControlType.Hour, model)\n }\"\n (click)=\"selectValue(item, TimePickerControlType.Hour)\"\n >\n {{ item | number: '2.0-0' }}\n </li>\n </ul>\n <div [class]=\"bem.element('column-strut')\"></div>\n </div>\n <div\n [class]=\"bem.element('column')\"\n #minuteRef\n *ngIf=\"minuteEnabled\"\n >\n <ul>\n <li\n *ngFor=\"\n let item of getControlTypeConfig(TimePickerControlType.Minute);\n trackBy: trackBy\n \"\n [class]=\"bem.element('cell')\"\n [style.height.px]=\"CONTROL_ITEM_HEIGHT\"\n [ngClass]=\"{\n disabled: isDisabled(item, TimePickerControlType.Minute),\n selected: matchValue(item, TimePickerControlType.Minute, model)\n }\"\n (click)=\"selectValue(item, TimePickerControlType.Minute)\"\n >\n {{ item | number: '2.0-0' }}\n </li>\n </ul>\n <div [class]=\"bem.element('column-strut')\"></div>\n </div>\n <div\n [class]=\"bem.element('column')\"\n #secondRef\n *ngIf=\"secondEnabled\"\n >\n <ul>\n <li\n *ngFor=\"\n let item of getControlTypeConfig(TimePickerControlType.Second)\n \"\n [class]=\"bem.element('cell')\"\n [style.height.px]=\"CONTROL_ITEM_HEIGHT\"\n [ngClass]=\"{\n disabled: isDisabled(item, TimePickerControlType.Second),\n selected: matchValue(item, TimePickerControlType.Second, model)\n }\"\n (click)=\"selectValue(item, TimePickerControlType.Second)\"\n >\n {{ item | number: '2.0-0' }}\n </li>\n </ul>\n <div [class]=\"bem.element('column-strut')\"></div>\n </div>\n </div>\n\n <ng-container *ngIf=\"!footerTemplate; else customFooter\">\n <div [class]=\"bem.element('footer')\">\n <button\n aui-button=\"inline\"\n (click)=\"selectNow()\"\n [size]=\"ComponentSize.Small\"\n >\n {{ 'now' | auiI18n }}\n </button>\n <button\n aui-button=\"primary\"\n [size]=\"ComponentSize.Small\"\n (click)=\"$event.stopImmediatePropagation(); confirm.next()\"\n >\n {{ 'confirm' | auiI18n }}\n </button>\n </div>\n </ng-container>\n <ng-template #customFooter>\n <ng-container\n [ngTemplateOutlet]=\"footerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: this }\"\n ></ng-container>\n </ng-template>\n</div>\n", styles: [".aui-time-picker-panel{display:flex;flex-direction:column;background-color:rgb(var(--aui-color-n-10));border-radius:var(--aui-border-radius-m);overflow:hidden;font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);font-weight:var(--aui-font-weight-normal)}:root .aui-time-picker-panel{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}html[aui-theme-mode=light] .aui-time-picker-panel{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.2)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .aui-time-picker-panel{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.75)}}html[aui-theme-mode=dark] .aui-time-picker-panel{box-shadow:0 2px 8px 0 rgba(var(--aui-color-origin-shadow),.75)}.aui-time-picker-panel ul,.aui-time-picker-panel li{border:none}.aui-time-picker-panel__content{display:flex;flex-direction:row;height:252px;border-bottom:1px solid rgb(var(--aui-color-n-8))}.aui-time-picker-panel__footer{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:9px}.aui-time-picker-panel__column{flex:1;align-self:stretch;text-align:center;overflow:auto}.aui-time-picker-panel__column::-webkit-scrollbar{width:4px;height:4px}.aui-time-picker-panel__column::-webkit-scrollbar-thumb{border-radius:2px;background-color:rgba(var(--aui-color-n-1),.2)}.aui-time-picker-panel__column::-webkit-scrollbar-corner{background-color:transparent}.aui-time-picker-panel__column ul{min-height:252px;list-style:none;padding:0;margin:0}.aui-time-picker-panel__column-strut{height:224px;width:1px;visibility:hidden}.aui-time-picker-panel__column+.aui-time-picker-panel__column{border-left:1px solid rgb(var(--aui-color-n-8))}.aui-time-picker-panel__cell{flex:none;width:100%;height:28px;color:rgb(var(--aui-color-main-text));line-height:28px;cursor:pointer}.aui-time-picker-panel__cell:hover{background-color:rgb(var(--aui-color-p-6));color:rgb(var(--aui-color-primary))}.aui-time-picker-panel__cell.selected{background-color:rgb(var(--aui-color-p-7));color:rgb(var(--aui-color-primary));font-weight:var(--aui-font-weight-bold)}.aui-time-picker-panel__cell.disabled{background-color:rgb(var(--aui-color-n-8));color:rgb(var(--aui-color-disabled-text));cursor:not-allowed}\n"] }]
|
|
4032
4031
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { format: [{
|
|
4033
4032
|
type: Input
|
|
4034
|
-
}], onMousedown: [{
|
|
4035
|
-
type: HostListener,
|
|
4036
|
-
args: ['mousedown']
|
|
4037
4033
|
}], hourStep: [{
|
|
4038
4034
|
type: Input
|
|
4039
4035
|
}], minuteStep: [{
|
|
@@ -4847,6 +4843,7 @@ class NumberInputComponent extends CommonFormControl {
|
|
|
4847
4843
|
this.placeholder = '';
|
|
4848
4844
|
this.controlsPosition = '';
|
|
4849
4845
|
this.angleControls = false;
|
|
4846
|
+
this.clearable = false;
|
|
4850
4847
|
this.isFocus = false;
|
|
4851
4848
|
}
|
|
4852
4849
|
ngAfterContentInit() {
|
|
@@ -4863,10 +4860,12 @@ class NumberInputComponent extends CommonFormControl {
|
|
|
4863
4860
|
return v;
|
|
4864
4861
|
}
|
|
4865
4862
|
modelOut(value) {
|
|
4866
|
-
return
|
|
4863
|
+
return value === null && this.clearable
|
|
4864
|
+
? value
|
|
4865
|
+
: Math.max(coerceNumber(this.min, Number.MIN_SAFE_INTEGER), Math.min(coerceNumber(this.max, Number.MAX_SAFE_INTEGER), this.parsePrecision(value)));
|
|
4867
4866
|
}
|
|
4868
4867
|
inputChanged(value) {
|
|
4869
|
-
this.emitModel(coerceNumber(value, this.model));
|
|
4868
|
+
this.emitModel(coerceNumber(value, !value && this.clearable ? null : this.model));
|
|
4870
4869
|
}
|
|
4871
4870
|
takeOneStep(positive) {
|
|
4872
4871
|
if (positive) {
|
|
@@ -4887,7 +4886,7 @@ class NumberInputComponent extends CommonFormControl {
|
|
|
4887
4886
|
}
|
|
4888
4887
|
}
|
|
4889
4888
|
NumberInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: NumberInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
4890
|
-
NumberInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: NumberInputComponent, selector: "aui-number-input", inputs: { size: "size", min: "min", max: "max", step: "step", precision: "precision", controls: "controls", placeholder: "placeholder", controlsPosition: "controlsPosition", angleControls: "angleControls" }, providers: [
|
|
4889
|
+
NumberInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.8", type: NumberInputComponent, selector: "aui-number-input", inputs: { size: "size", min: "min", max: "max", step: "step", precision: "precision", controls: "controls", placeholder: "placeholder", controlsPosition: "controlsPosition", angleControls: "angleControls", clearable: "clearable" }, providers: [
|
|
4891
4890
|
{
|
|
4892
4891
|
provide: NG_VALUE_ACCESSOR,
|
|
4893
4892
|
useExisting: forwardRef(() => NumberInputComponent),
|
|
@@ -4921,6 +4920,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
|
|
|
4921
4920
|
type: Input
|
|
4922
4921
|
}], angleControls: [{
|
|
4923
4922
|
type: Input
|
|
4923
|
+
}], clearable: [{
|
|
4924
|
+
type: Input
|
|
4924
4925
|
}], inputRef: [{
|
|
4925
4926
|
type: ViewChild,
|
|
4926
4927
|
args: ['inputRef', { read: ElementRef }]
|