@ng-nest/ui 14.0.4 → 14.0.7
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/calendar/calendar.component.d.ts +1 -0
- package/calendar/calendar.property.d.ts +18 -4
- package/calendar/examples/en_US/default/card/README.md +6 -0
- package/calendar/examples/en_US/default/header/README.md +6 -0
- package/calendar/examples/zh_CN/default/card/README.md +6 -0
- package/calendar/examples/zh_CN/default/header/README.md +6 -0
- package/collapse/collapse.property.d.ts +6 -1
- package/collapse/examples/en_US/default/disabled/README.md +6 -0
- package/collapse/examples/zh_CN/default/disabled/README.md +6 -0
- package/core/config/config.d.ts +8 -0
- package/core/functions/convert.d.ts +1 -1
- package/dropdown/dropdown-portal.component.d.ts +3 -0
- package/dropdown/dropdown.property.d.ts +16 -1
- package/esm2020/badge/badge.component.mjs +3 -3
- package/esm2020/calendar/calendar.component.mjs +8 -4
- package/esm2020/calendar/calendar.property.mjs +11 -2
- package/esm2020/collapse/collapse-panel.component.mjs +3 -3
- package/esm2020/collapse/collapse.property.mjs +7 -2
- package/esm2020/core/config/config.mjs +1 -1
- package/esm2020/core/functions/convert.mjs +1 -1
- package/esm2020/date-picker/date-picker.component.mjs +5 -1
- package/esm2020/dropdown/dropdown-portal.component.mjs +6 -3
- package/esm2020/dropdown/dropdown.component.mjs +4 -1
- package/esm2020/dropdown/dropdown.property.mjs +8 -2
- package/esm2020/i18n/i18n.property.mjs +1 -1
- package/esm2020/i18n/languages/en_US.mjs +7 -2
- package/esm2020/i18n/languages/zh_CN.mjs +7 -2
- package/esm2020/i18n/languages/zh_TW.mjs +7 -2
- package/esm2020/image/image-group.component.mjs +18 -0
- package/esm2020/image/image-preview.component.mjs +136 -0
- package/esm2020/image/image.component.mjs +81 -0
- package/esm2020/image/image.module.mjs +26 -0
- package/esm2020/image/image.property.mjs +63 -0
- package/esm2020/image/ng-nest-ui-image.mjs +5 -0
- package/esm2020/image/public-api.mjs +6 -0
- package/esm2020/index.mjs +2 -1
- package/esm2020/input/input.component.mjs +2 -2
- package/esm2020/list/list.component.mjs +99 -13
- package/esm2020/list/list.module.mjs +8 -4
- package/esm2020/list/list.property.mjs +52 -2
- package/esm2020/loading/loading.component.mjs +3 -3
- package/esm2020/loading/loading.property.mjs +7 -2
- package/esm2020/popover/popover.directive.mjs +20 -3
- package/esm2020/popover/popover.property.mjs +1 -1
- package/esm2020/select/select.component.mjs +14 -6
- package/esm2020/slider/slider.component.mjs +27 -7
- package/esm2020/slider/slider.module.mjs +5 -4
- package/esm2020/slider/slider.property.mjs +13 -2
- package/esm2020/table/table-body.component.mjs +3 -3
- package/esm2020/table/table-head.component.mjs +4 -4
- package/esm2020/table/table.component.mjs +35 -4
- package/esm2020/table/table.property.mjs +8 -4
- package/esm2020/tabs/tabs.component.mjs +3 -3
- package/esm2020/tabs/tabs.property.mjs +13 -2
- package/esm2020/textarea/textarea.component.mjs +2 -2
- package/esm2020/timeline/timeline.component.mjs +6 -4
- package/fesm2015/ng-nest-ui-badge.mjs +2 -2
- package/fesm2015/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-calendar.mjs +17 -4
- package/fesm2015/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-collapse.mjs +8 -3
- package/fesm2015/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-date-picker.mjs +4 -0
- package/fesm2015/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-dropdown.mjs +15 -3
- package/fesm2015/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-i18n.mjs +18 -3
- package/fesm2015/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-image.mjs +312 -0
- package/fesm2015/ng-nest-ui-image.mjs.map +1 -0
- package/fesm2015/ng-nest-ui-input.mjs +2 -2
- package/fesm2015/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-list.mjs +155 -15
- package/fesm2015/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-loading.mjs +8 -3
- package/fesm2015/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-popover.mjs +19 -2
- package/fesm2015/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-select.mjs +14 -6
- package/fesm2015/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-slider.mjs +43 -11
- package/fesm2015/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-table.mjs +46 -11
- package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-tabs.mjs +14 -3
- package/fesm2015/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-textarea.mjs +2 -2
- package/fesm2015/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2015/ng-nest-ui-timeline.mjs +5 -3
- package/fesm2015/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2015/ng-nest-ui.mjs +1 -0
- package/fesm2015/ng-nest-ui.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-badge.mjs +2 -2
- package/fesm2020/ng-nest-ui-badge.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-calendar.mjs +17 -4
- package/fesm2020/ng-nest-ui-calendar.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-collapse.mjs +8 -3
- package/fesm2020/ng-nest-ui-collapse.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-date-picker.mjs +4 -0
- package/fesm2020/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-dropdown.mjs +15 -3
- package/fesm2020/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-i18n.mjs +18 -3
- package/fesm2020/ng-nest-ui-i18n.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-image.mjs +308 -0
- package/fesm2020/ng-nest-ui-image.mjs.map +1 -0
- package/fesm2020/ng-nest-ui-input.mjs +2 -2
- package/fesm2020/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-list.mjs +154 -15
- package/fesm2020/ng-nest-ui-list.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-loading.mjs +8 -3
- package/fesm2020/ng-nest-ui-loading.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-popover.mjs +19 -2
- package/fesm2020/ng-nest-ui-popover.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-select.mjs +14 -6
- package/fesm2020/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-slider.mjs +43 -11
- package/fesm2020/ng-nest-ui-slider.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-table.mjs +46 -11
- package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-tabs.mjs +14 -3
- package/fesm2020/ng-nest-ui-tabs.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-textarea.mjs +2 -2
- package/fesm2020/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2020/ng-nest-ui-timeline.mjs +5 -3
- package/fesm2020/ng-nest-ui-timeline.mjs.map +1 -1
- package/fesm2020/ng-nest-ui.mjs +1 -0
- package/fesm2020/ng-nest-ui.mjs.map +1 -1
- package/i18n/i18n.property.d.ts +6 -0
- package/i18n/languages/en_US.d.ts +5 -0
- package/i18n/languages/zh_CN.d.ts +5 -0
- package/i18n/languages/zh_TW.d.ts +5 -0
- package/image/examples/en_US/default/README.md +4 -0
- package/image/examples/en_US/default/default/README.md +6 -0
- package/image/examples/en_US/default/fallback/README.md +6 -0
- package/image/examples/en_US/default/group/README.md +6 -0
- package/image/examples/en_US/default/placeholder/README.md +6 -0
- package/image/examples/zh_CN/default/README.md +4 -0
- package/image/examples/zh_CN/default/default/README.md +6 -0
- package/image/examples/zh_CN/default/fallback/README.md +6 -0
- package/image/examples/zh_CN/default/group/README.md +6 -0
- package/image/examples/zh_CN/default/placeholder/README.md +6 -0
- package/image/image-group.component.d.ts +8 -0
- package/image/image-preview.component.d.ts +39 -0
- package/image/image.component.d.ts +29 -0
- package/image/image.module.d.ts +16 -0
- package/image/image.property.d.ts +96 -0
- package/image/index.d.ts +5 -0
- package/image/public-api.d.ts +5 -0
- package/index.d.ts +1 -0
- package/list/examples/en_US/default/load-more/README.md +8 -0
- package/list/examples/en_US/default/scroll/README.md +8 -0
- package/list/examples/zh_CN/default/load-more/README.md +8 -0
- package/list/examples/zh_CN/default/scroll/README.md +8 -0
- package/list/list.component.d.ts +19 -1
- package/list/list.module.d.ts +2 -1
- package/list/list.property.d.ts +59 -2
- package/loading/loading.property.d.ts +7 -2
- package/package.json +9 -1
- package/popover/popover.directive.d.ts +4 -3
- package/popover/popover.property.d.ts +1 -1
- package/slider/examples/en_US/default/expand/README.md +7 -0
- package/slider/examples/zh_CN/default/expand/README.md +7 -0
- package/slider/slider.component.d.ts +2 -0
- package/slider/slider.module.d.ts +2 -1
- package/slider/slider.property.d.ts +11 -1
- package/table/examples/en_US/default/edit/README.md +7 -0
- package/table/examples/en_US/default/header/README.md +2 -2
- package/table/examples/en_US/default/search/README.md +6 -0
- package/table/examples/zh_CN/default/edit/README.md +7 -0
- package/table/examples/zh_CN/default/header/README.md +2 -2
- package/table/examples/zh_CN/default/search/README.md +6 -0
- package/table/table.component.d.ts +5 -0
- package/table/table.property.d.ts +13 -3
- package/tabs/examples/en_US/default/expand/README.md +6 -0
- package/tabs/examples/zh_CN/default/expand/README.md +6 -0
- package/tabs/tabs.property.d.ts +11 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, Optional, NgModule } from '@angular/core';
|
|
3
|
+
import { __decorate } from 'tslib';
|
|
4
|
+
import * as i1 from '@ng-nest/ui/core';
|
|
5
|
+
import { XProperty, XWithConfig, XIsChange } from '@ng-nest/ui/core';
|
|
6
|
+
import * as i2$1 from '@ng-nest/ui/dialog';
|
|
7
|
+
import { X_DIALOG_DATA, XDialogModule } from '@ng-nest/ui/dialog';
|
|
8
|
+
import * as i2 from '@angular/common';
|
|
9
|
+
import { CommonModule } from '@angular/common';
|
|
10
|
+
import * as i3 from '@ng-nest/ui/icon';
|
|
11
|
+
import { XIconModule } from '@ng-nest/ui/icon';
|
|
12
|
+
import * as i5 from '@angular/cdk/drag-drop';
|
|
13
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
14
|
+
import { Subject, map } from 'rxjs';
|
|
15
|
+
import { takeUntil } from 'rxjs/operators';
|
|
16
|
+
import * as i3$1 from '@ng-nest/ui/i18n';
|
|
17
|
+
import { XI18nModule } from '@ng-nest/ui/i18n';
|
|
18
|
+
import { XButtonModule } from '@ng-nest/ui/button';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Image
|
|
22
|
+
* @selector x-image
|
|
23
|
+
* @decorator component
|
|
24
|
+
*/
|
|
25
|
+
const XImagePrefix = 'x-image';
|
|
26
|
+
const X_CONFIG_NAME = 'image';
|
|
27
|
+
/**
|
|
28
|
+
* Image Property
|
|
29
|
+
*/
|
|
30
|
+
class XImageProperty extends XProperty {
|
|
31
|
+
}
|
|
32
|
+
/** @nocollapse */ XImageProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImageProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
/** @nocollapse */ XImageProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XImageProperty, selector: "ng-component", inputs: { src: "src", width: "width", height: "height", alt: "alt", fallback: "fallback", previewText: "previewText", placeholder: "placeholder" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
34
|
+
__decorate([
|
|
35
|
+
XWithConfig(X_CONFIG_NAME)
|
|
36
|
+
], XImageProperty.prototype, "previewText", void 0);
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImageProperty, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{ template: '' }]
|
|
40
|
+
}], propDecorators: { src: [{
|
|
41
|
+
type: Input
|
|
42
|
+
}], width: [{
|
|
43
|
+
type: Input
|
|
44
|
+
}], height: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}], alt: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}], fallback: [{
|
|
49
|
+
type: Input
|
|
50
|
+
}], previewText: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], placeholder: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}] } });
|
|
55
|
+
/**
|
|
56
|
+
* Image Preview
|
|
57
|
+
* @selector x-image-preview
|
|
58
|
+
* @decorator component
|
|
59
|
+
*/
|
|
60
|
+
const XImagePreviewPrefix = 'x-image-preview';
|
|
61
|
+
/**
|
|
62
|
+
* Image Preview Property
|
|
63
|
+
*/
|
|
64
|
+
class XImagePreviewProperty extends XProperty {
|
|
65
|
+
}
|
|
66
|
+
/** @nocollapse */ XImagePreviewProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImagePreviewProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
/** @nocollapse */ XImagePreviewProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XImagePreviewProperty, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImagePreviewProperty, decorators: [{
|
|
69
|
+
type: Component,
|
|
70
|
+
args: [{ template: '' }]
|
|
71
|
+
}] });
|
|
72
|
+
/**
|
|
73
|
+
* Image Group
|
|
74
|
+
* @selector x-image-group
|
|
75
|
+
* @decorator component
|
|
76
|
+
*/
|
|
77
|
+
const XImageGroupPrefix = 'x-image-group';
|
|
78
|
+
|
|
79
|
+
class XImagePreviewComponent extends XImagePreviewProperty {
|
|
80
|
+
constructor(renderer, elementRef, cdr, configService, data) {
|
|
81
|
+
super();
|
|
82
|
+
this.renderer = renderer;
|
|
83
|
+
this.elementRef = elementRef;
|
|
84
|
+
this.cdr = cdr;
|
|
85
|
+
this.configService = configService;
|
|
86
|
+
this.data = data;
|
|
87
|
+
this.imgScale3d = {
|
|
88
|
+
x: 1,
|
|
89
|
+
y: 1,
|
|
90
|
+
z: 1
|
|
91
|
+
};
|
|
92
|
+
this.rotate = 0;
|
|
93
|
+
this.position = {
|
|
94
|
+
x: 0,
|
|
95
|
+
y: 0
|
|
96
|
+
};
|
|
97
|
+
this.total = 1;
|
|
98
|
+
this.current = 1;
|
|
99
|
+
}
|
|
100
|
+
get getWrapperTransform() {
|
|
101
|
+
return `translate3d(${this.position.x}px, ${this.position.y}px, 0)`;
|
|
102
|
+
}
|
|
103
|
+
get getImgTransform() {
|
|
104
|
+
return `scale3d(${this.imgScale3d.x}, ${this.imgScale3d.y}, ${this.imgScale3d.z}) rotate(${this.rotate}deg)`;
|
|
105
|
+
}
|
|
106
|
+
ngOnInit() {
|
|
107
|
+
this.setActivated();
|
|
108
|
+
}
|
|
109
|
+
ngOnChanges() { }
|
|
110
|
+
initialization() {
|
|
111
|
+
this.imgScale3d = {
|
|
112
|
+
x: 1,
|
|
113
|
+
y: 1,
|
|
114
|
+
z: 1
|
|
115
|
+
};
|
|
116
|
+
this.rotate = 0;
|
|
117
|
+
this.position = {
|
|
118
|
+
x: 0,
|
|
119
|
+
y: 0
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
setActivated() {
|
|
123
|
+
if (!this.data)
|
|
124
|
+
return;
|
|
125
|
+
if (this.data.length === 1) {
|
|
126
|
+
this.activated = this.data[0];
|
|
127
|
+
this.total = this.current = 1;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
this.total = this.data.length;
|
|
131
|
+
this.activated = this.data.find((x, index) => {
|
|
132
|
+
if (x.activated) {
|
|
133
|
+
this.current = index + 1;
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
onCurrentChange(num) {
|
|
141
|
+
this.current += num;
|
|
142
|
+
this.activated = this.data[this.current - 1];
|
|
143
|
+
this.initialization();
|
|
144
|
+
}
|
|
145
|
+
onRotate(deg) {
|
|
146
|
+
this.rotate += deg;
|
|
147
|
+
}
|
|
148
|
+
onScale(zoom) {
|
|
149
|
+
this.imgScale3d.x += zoom;
|
|
150
|
+
this.imgScale3d.y += zoom;
|
|
151
|
+
}
|
|
152
|
+
onDragReleased() {
|
|
153
|
+
let width = this.imageRef.nativeElement.offsetWidth * this.imgScale3d.x;
|
|
154
|
+
let height = this.imageRef.nativeElement.offsetHeight * this.imgScale3d.x;
|
|
155
|
+
const clientWidth = document.documentElement.clientWidth;
|
|
156
|
+
const clientHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
157
|
+
const isRotate = this.rotate % 180 !== 0;
|
|
158
|
+
const box = this.imageRef.nativeElement.getBoundingClientRect();
|
|
159
|
+
const docElem = document.documentElement;
|
|
160
|
+
const left = box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0);
|
|
161
|
+
const top = box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0);
|
|
162
|
+
width = isRotate ? height : width;
|
|
163
|
+
height = isRotate ? width : height;
|
|
164
|
+
let position = { x: 0, y: 0 };
|
|
165
|
+
if (width > clientWidth || height > clientHeight) {
|
|
166
|
+
const x = this.fitPoint(left, width, clientWidth);
|
|
167
|
+
const y = this.fitPoint(top, height, clientHeight);
|
|
168
|
+
position.x = x ? x : 0;
|
|
169
|
+
position.y = y ? y : 0;
|
|
170
|
+
}
|
|
171
|
+
this.position = Object.assign(Object.assign({}, this.position), position);
|
|
172
|
+
}
|
|
173
|
+
fitPoint(start, size, clientSize) {
|
|
174
|
+
const startAddSize = start + size;
|
|
175
|
+
const offsetStart = (size - clientSize) / 2;
|
|
176
|
+
let distance = null;
|
|
177
|
+
if (size > clientSize) {
|
|
178
|
+
if (start > 0) {
|
|
179
|
+
distance = offsetStart;
|
|
180
|
+
}
|
|
181
|
+
if (start < 0 && startAddSize < clientSize) {
|
|
182
|
+
distance = -offsetStart;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
if (start < 0 || startAddSize > clientSize) {
|
|
187
|
+
distance = start < 0 ? offsetStart : -offsetStart;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return distance;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/** @nocollapse */ XImagePreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImagePreviewComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }, { token: X_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
194
|
+
/** @nocollapse */ XImagePreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XImagePreviewComponent, selector: "x-image-preview", viewQueries: [{ propertyName: "imageRef", first: true, predicate: ["imageRef"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"x-image-preview\" [ngClass]=\"classMap\">\r\n <div class=\"x-image-preview-header\">\r\n <div class=\"x-image-preview-header-left\">\r\n <span class=\"x-image-preview-current\" *ngIf=\"total != 1\">{{ current }} / {{ total }}</span>\r\n </div>\r\n <div class=\"x-image-preview-header-center\">\r\n <x-icon type=\"fto-corner-up-left\" (click)=\"onRotate(-90)\"></x-icon>\r\n <x-icon type=\"fto-corner-up-right\" (click)=\"onRotate(90)\"></x-icon>\r\n <x-icon type=\"fto-zoom-out\" [class.x-image-preview-disabled]=\"imgScale3d.x === 1\" (click)=\"imgScale3d.x > 1 && onScale(-1)\"></x-icon>\r\n <x-icon type=\"fto-zoom-in\" (click)=\"onScale(1)\"></x-icon>\r\n </div>\r\n <div class=\"x-image-preview-header-right\">\r\n <x-icon type=\"fto-x\" x-dialog-close></x-icon>\r\n </div>\r\n </div>\r\n <div\r\n class=\"x-image-preview-wrapper\"\r\n cdkDrag\r\n [style.transform]=\"getWrapperTransform\"\r\n [cdkDragFreeDragPosition]=\"position\"\r\n (cdkDragReleased)=\"onDragReleased()\"\r\n >\r\n <img #imageRef [src]=\"activated?.src\" [attr.alt]=\"activated?.alt\" cdkDragHandle [style.transform]=\"getImgTransform\" />\r\n </div>\r\n <div\r\n *ngIf=\"data && data.length > 1\"\r\n [class.x-image-preview-disabled]=\"current === 1\"\r\n class=\"x-image-preview-left\"\r\n (click)=\"current > 1 && onCurrentChange(-1)\"\r\n >\r\n <x-icon type=\"fto-chevron-left\"></x-icon>\r\n </div>\r\n <div\r\n *ngIf=\"data && data.length > 1\"\r\n [class.x-image-preview-disabled]=\"current === total\"\r\n class=\"x-image-preview-right\"\r\n (click)=\"current != total && onCurrentChange(1)\"\r\n >\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </div>\r\n</div>\r\n", styles: ["x-image-preview{display:block;width:100%;height:100%}.x-image-preview{margin:0;padding:0;width:100%;height:100%}.x-image-preview-header{display:flex;align-items:center;justify-content:center;background-color:#0003;color:#fff;position:absolute;width:100%;z-index:1;height:2.75rem}.x-image-preview-header x-icon{font-size:1.25rem;padding:.75rem;cursor:pointer;transition:background-color var(--x-animation-duration-base)}.x-image-preview-header x-icon:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-header x-icon.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-header-center{position:absolute}.x-image-preview-header-right{position:absolute;right:0}.x-image-preview-header-left{position:absolute;left:0}.x-image-preview-current{padding:.75rem}.x-image-preview-wrapper{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform var(--x-animation-duration-base) ease-out 0s}.x-image-preview-wrapper>img{max-width:100%;max-height:100%;vertical-align:middle;cursor:grab;transition:transform var(--x-animation-duration-base) ease-out 0s}.x-image-preview-left,.x-image-preview-right{position:absolute;top:50%;z-index:1;display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;margin-top:-1.375rem;color:#fff;background-color:#0003;border-radius:50%;transition:background-color var(--x-animation-duration-base);cursor:pointer;font-size:1.25rem}.x-image-preview-left:hover:not(.x-image-preview-disabled),.x-image-preview-right:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-left.x-image-preview-disabled,.x-image-preview-right.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-left{left:1rem}.x-image-preview-right{right:1rem}.x-image-preview-portal .x-dialog-portal{background:transparent;box-shadow:none;padding:0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.XIconComponent, selector: "x-icon" }, { kind: "directive", type: i2$1.XDialogCloseDirective, selector: "[x-dialog-close]" }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i5.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImagePreviewComponent, decorators: [{
|
|
196
|
+
type: Component,
|
|
197
|
+
args: [{ selector: `${XImagePreviewPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-image-preview\" [ngClass]=\"classMap\">\r\n <div class=\"x-image-preview-header\">\r\n <div class=\"x-image-preview-header-left\">\r\n <span class=\"x-image-preview-current\" *ngIf=\"total != 1\">{{ current }} / {{ total }}</span>\r\n </div>\r\n <div class=\"x-image-preview-header-center\">\r\n <x-icon type=\"fto-corner-up-left\" (click)=\"onRotate(-90)\"></x-icon>\r\n <x-icon type=\"fto-corner-up-right\" (click)=\"onRotate(90)\"></x-icon>\r\n <x-icon type=\"fto-zoom-out\" [class.x-image-preview-disabled]=\"imgScale3d.x === 1\" (click)=\"imgScale3d.x > 1 && onScale(-1)\"></x-icon>\r\n <x-icon type=\"fto-zoom-in\" (click)=\"onScale(1)\"></x-icon>\r\n </div>\r\n <div class=\"x-image-preview-header-right\">\r\n <x-icon type=\"fto-x\" x-dialog-close></x-icon>\r\n </div>\r\n </div>\r\n <div\r\n class=\"x-image-preview-wrapper\"\r\n cdkDrag\r\n [style.transform]=\"getWrapperTransform\"\r\n [cdkDragFreeDragPosition]=\"position\"\r\n (cdkDragReleased)=\"onDragReleased()\"\r\n >\r\n <img #imageRef [src]=\"activated?.src\" [attr.alt]=\"activated?.alt\" cdkDragHandle [style.transform]=\"getImgTransform\" />\r\n </div>\r\n <div\r\n *ngIf=\"data && data.length > 1\"\r\n [class.x-image-preview-disabled]=\"current === 1\"\r\n class=\"x-image-preview-left\"\r\n (click)=\"current > 1 && onCurrentChange(-1)\"\r\n >\r\n <x-icon type=\"fto-chevron-left\"></x-icon>\r\n </div>\r\n <div\r\n *ngIf=\"data && data.length > 1\"\r\n [class.x-image-preview-disabled]=\"current === total\"\r\n class=\"x-image-preview-right\"\r\n (click)=\"current != total && onCurrentChange(1)\"\r\n >\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </div>\r\n</div>\r\n", styles: ["x-image-preview{display:block;width:100%;height:100%}.x-image-preview{margin:0;padding:0;width:100%;height:100%}.x-image-preview-header{display:flex;align-items:center;justify-content:center;background-color:#0003;color:#fff;position:absolute;width:100%;z-index:1;height:2.75rem}.x-image-preview-header x-icon{font-size:1.25rem;padding:.75rem;cursor:pointer;transition:background-color var(--x-animation-duration-base)}.x-image-preview-header x-icon:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-header x-icon.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-header-center{position:absolute}.x-image-preview-header-right{position:absolute;right:0}.x-image-preview-header-left{position:absolute;left:0}.x-image-preview-current{padding:.75rem}.x-image-preview-wrapper{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform var(--x-animation-duration-base) ease-out 0s}.x-image-preview-wrapper>img{max-width:100%;max-height:100%;vertical-align:middle;cursor:grab;transition:transform var(--x-animation-duration-base) ease-out 0s}.x-image-preview-left,.x-image-preview-right{position:absolute;top:50%;z-index:1;display:flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;margin-top:-1.375rem;color:#fff;background-color:#0003;border-radius:50%;transition:background-color var(--x-animation-duration-base);cursor:pointer;font-size:1.25rem}.x-image-preview-left:hover:not(.x-image-preview-disabled),.x-image-preview-right:hover:not(.x-image-preview-disabled){background-color:#0000001a}.x-image-preview-left.x-image-preview-disabled,.x-image-preview-right.x-image-preview-disabled{color:#ffffff80;cursor:default}.x-image-preview-left{left:1rem}.x-image-preview-right{right:1rem}.x-image-preview-portal .x-dialog-portal{background:transparent;box-shadow:none;padding:0}\n"] }]
|
|
198
|
+
}], ctorParameters: function () {
|
|
199
|
+
return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }, { type: undefined, decorators: [{
|
|
200
|
+
type: Inject,
|
|
201
|
+
args: [X_DIALOG_DATA]
|
|
202
|
+
}] }];
|
|
203
|
+
}, propDecorators: { imageRef: [{
|
|
204
|
+
type: ViewChild,
|
|
205
|
+
args: ['imageRef']
|
|
206
|
+
}] } });
|
|
207
|
+
|
|
208
|
+
class XImageGroupComponent {
|
|
209
|
+
constructor() {
|
|
210
|
+
this.images = [];
|
|
211
|
+
}
|
|
212
|
+
addImage(image) {
|
|
213
|
+
this.images.push(image);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
/** @nocollapse */ XImageGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImageGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
217
|
+
/** @nocollapse */ XImageGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XImageGroupComponent, selector: "x-image-group", ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: ["x-image-group{display:inline-block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImageGroupComponent, decorators: [{
|
|
219
|
+
type: Component,
|
|
220
|
+
args: [{ selector: `${XImageGroupPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\r\n", styles: ["x-image-group{display:inline-block}\n"] }]
|
|
221
|
+
}] });
|
|
222
|
+
|
|
223
|
+
class XImageComponent extends XImageProperty {
|
|
224
|
+
constructor(renderer, elementRef, cdr, configService, dialog, i18n, group) {
|
|
225
|
+
super();
|
|
226
|
+
this.renderer = renderer;
|
|
227
|
+
this.elementRef = elementRef;
|
|
228
|
+
this.cdr = cdr;
|
|
229
|
+
this.configService = configService;
|
|
230
|
+
this.dialog = dialog;
|
|
231
|
+
this.i18n = i18n;
|
|
232
|
+
this.group = group;
|
|
233
|
+
this.locale = {};
|
|
234
|
+
this.isError = false;
|
|
235
|
+
this.isLoaded = false;
|
|
236
|
+
this._unSubject = new Subject();
|
|
237
|
+
}
|
|
238
|
+
get getPreviewText() {
|
|
239
|
+
return this.previewText || this.locale.previewText;
|
|
240
|
+
}
|
|
241
|
+
ngOnInit() {
|
|
242
|
+
if (this.group) {
|
|
243
|
+
this.group.addImage(this);
|
|
244
|
+
}
|
|
245
|
+
this.i18n.localeChange
|
|
246
|
+
.pipe(map((x) => x.image), takeUntil(this._unSubject))
|
|
247
|
+
.subscribe((x) => {
|
|
248
|
+
this.locale = x;
|
|
249
|
+
this.cdr.markForCheck();
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
ngOnChanges(changes) {
|
|
253
|
+
let { src } = changes;
|
|
254
|
+
if (XIsChange(src)) {
|
|
255
|
+
this.isLoaded = false;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
onPreview() {
|
|
259
|
+
let data = [];
|
|
260
|
+
if (this.group) {
|
|
261
|
+
const activatedIndex = this.group.images.indexOf(this);
|
|
262
|
+
data = this.group.images.map((x, index) => ({ src: x.src, alt: x.alt, fallback: x.fallback, activated: index === activatedIndex }));
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
data = [{ src: this.src, alt: this.alt, fallback: this.fallback }];
|
|
266
|
+
}
|
|
267
|
+
this.dialog.create(XImagePreviewComponent, {
|
|
268
|
+
width: '100%',
|
|
269
|
+
height: '100%',
|
|
270
|
+
className: 'x-image-preview-portal',
|
|
271
|
+
data: data
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
onError() {
|
|
275
|
+
this.src = this.fallback;
|
|
276
|
+
this.isError = true;
|
|
277
|
+
}
|
|
278
|
+
onLoad() {
|
|
279
|
+
this.isLoaded = true;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/** @nocollapse */ XImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImageComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }, { token: i2$1.XDialogService }, { token: i3$1.XI18nService }, { token: XImageGroupComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
283
|
+
/** @nocollapse */ XImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XImageComponent, selector: "x-image", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"x-image\" [ngClass]=\"classMap\">\r\n <img\r\n [hidden]=\"placeholder && !isLoaded\"\r\n class=\"x-image-img\"\r\n [src]=\"src\"\r\n [style.width]=\"width\"\r\n [style.height]=\"height\"\r\n (error)=\"onError()\"\r\n (load)=\"onLoad()\"\r\n />\r\n <img *ngIf=\"placeholder && !isLoaded\" class=\"x-image-img\" [src]=\"placeholder\" [style.width]=\"width\" [style.height]=\"height\" />\r\n <div class=\"x-image-overlay\" *ngIf=\"!isError\" (click)=\"onPreview()\">\r\n <div class=\"x-image-text\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n <span>{{ getPreviewText }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["x-image{display:inline-block}.x-image{margin:0;padding:0;position:relative;display:inline-block}.x-image-img{width:100%;height:auto;vertical-align:middle}.x-image-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;background:rgba(0,0,0,.5);cursor:pointer;opacity:0;transition:opacity var(--x-animation-duration-base)}.x-image-overlay:hover{opacity:1}.x-image-text>span{margin-left:.25rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.XIconComponent, selector: "x-icon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImageComponent, decorators: [{
|
|
285
|
+
type: Component,
|
|
286
|
+
args: [{ selector: `${XImagePrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-image\" [ngClass]=\"classMap\">\r\n <img\r\n [hidden]=\"placeholder && !isLoaded\"\r\n class=\"x-image-img\"\r\n [src]=\"src\"\r\n [style.width]=\"width\"\r\n [style.height]=\"height\"\r\n (error)=\"onError()\"\r\n (load)=\"onLoad()\"\r\n />\r\n <img *ngIf=\"placeholder && !isLoaded\" class=\"x-image-img\" [src]=\"placeholder\" [style.width]=\"width\" [style.height]=\"height\" />\r\n <div class=\"x-image-overlay\" *ngIf=\"!isError\" (click)=\"onPreview()\">\r\n <div class=\"x-image-text\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n <span>{{ getPreviewText }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["x-image{display:inline-block}.x-image{margin:0;padding:0;position:relative;display:inline-block}.x-image-img{width:100%;height:auto;vertical-align:middle}.x-image-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;background:rgba(0,0,0,.5);cursor:pointer;opacity:0;transition:opacity var(--x-animation-duration-base)}.x-image-overlay:hover{opacity:1}.x-image-text>span{margin-left:.25rem}\n"] }]
|
|
287
|
+
}], ctorParameters: function () {
|
|
288
|
+
return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }, { type: i2$1.XDialogService }, { type: i3$1.XI18nService }, { type: XImageGroupComponent, decorators: [{
|
|
289
|
+
type: Optional
|
|
290
|
+
}] }];
|
|
291
|
+
} });
|
|
292
|
+
|
|
293
|
+
class XImageModule {
|
|
294
|
+
}
|
|
295
|
+
/** @nocollapse */ XImageModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
296
|
+
/** @nocollapse */ XImageModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: XImageModule, declarations: [XImageComponent, XImageProperty, XImagePreviewComponent, XImagePreviewProperty, XImageGroupComponent], imports: [CommonModule, XIconModule, XDialogModule, XButtonModule, XI18nModule, DragDropModule], exports: [XImageComponent, XImagePreviewComponent, XImageGroupComponent] });
|
|
297
|
+
/** @nocollapse */ XImageModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImageModule, imports: [CommonModule, XIconModule, XDialogModule, XButtonModule, XI18nModule, DragDropModule] });
|
|
298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XImageModule, decorators: [{
|
|
299
|
+
type: NgModule,
|
|
300
|
+
args: [{
|
|
301
|
+
declarations: [XImageComponent, XImageProperty, XImagePreviewComponent, XImagePreviewProperty, XImageGroupComponent],
|
|
302
|
+
exports: [XImageComponent, XImagePreviewComponent, XImageGroupComponent],
|
|
303
|
+
imports: [CommonModule, XIconModule, XDialogModule, XButtonModule, XI18nModule, DragDropModule]
|
|
304
|
+
}]
|
|
305
|
+
}] });
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Generated bundle index. Do not edit.
|
|
309
|
+
*/
|
|
310
|
+
|
|
311
|
+
export { XImageComponent, XImageGroupComponent, XImageGroupPrefix, XImageModule, XImagePrefix, XImagePreviewComponent, XImagePreviewPrefix, XImagePreviewProperty, XImageProperty };
|
|
312
|
+
//# sourceMappingURL=ng-nest-ui-image.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-nest-ui-image.mjs","sources":["../../../../lib/ng-nest/ui/image/image.property.ts","../../../../lib/ng-nest/ui/image/image-preview.component.ts","../../../../lib/ng-nest/ui/image/image-preview.component.html","../../../../lib/ng-nest/ui/image/image-group.component.ts","../../../../lib/ng-nest/ui/image/image-group.component.html","../../../../lib/ng-nest/ui/image/image.component.ts","../../../../lib/ng-nest/ui/image/image.component.html","../../../../lib/ng-nest/ui/image/image.module.ts","../../../../lib/ng-nest/ui/image/ng-nest-ui-image.ts"],"sourcesContent":["import { Input, Component } from '@angular/core';\r\nimport { XProperty, XWithConfig } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Image\r\n * @selector x-image\r\n * @decorator component\r\n */\r\nexport const XImagePrefix = 'x-image';\r\nconst X_CONFIG_NAME = 'image';\r\n\r\n/**\r\n * Image Property\r\n */\r\n@Component({ template: '' })\r\nexport class XImageProperty extends XProperty {\r\n /**\r\n * @zh_CN 图片显示地址\r\n * @en_US Picture display address\r\n */\r\n @Input() src!: string;\r\n /**\r\n * @zh_CN 图片宽度\r\n * @en_US Picture width\r\n */\r\n @Input() width!: string;\r\n /**\r\n * @zh_CN 图片高度\r\n * @en_US Picture height\r\n */\r\n @Input() height!: string;\r\n /**\r\n * @zh_CN 图像描述\r\n * @en_US Image description\r\n */\r\n @Input() alt!: string;\r\n /**\r\n * @zh_CN 加载失败显示的地址\r\n * @en_US Load fault tolerance address\r\n */\r\n @Input() fallback!: string;\r\n /**\r\n * @zh_CN 预览文字\r\n * @en_US Preview text\r\n * @default '预览'\r\n */\r\n @Input() @XWithConfig<string>(X_CONFIG_NAME) previewText?: string;\r\n /**\r\n * @zh_CN 渐进加载显示的图片\r\n * @en_US Gradually loaded the display of the display\r\n */\r\n @Input() placeholder?: string;\r\n}\r\n\r\n/**\r\n * @zh_CN 图片节点数据\r\n * @en_US Image node data\r\n */\r\nexport interface XImageNode {\r\n /**\r\n * @zh_CN 图片显示地址\r\n * @en_US Picture display address\r\n */\r\n src?: string;\r\n /**\r\n * @zh_CN 图像描述\r\n * @en_US Image description\r\n */\r\n alt?: string;\r\n /**\r\n * @zh_CN 加载失败显示的地址\r\n * @en_US Load fault tolerance address\r\n */\r\n fallback?: string;\r\n /**\r\n * @zh_CN 当前激活的图片\r\n * @en_US Current activated pictures\r\n */\r\n activated?: boolean;\r\n}\r\n\r\n/**\r\n * Image Preview\r\n * @selector x-image-preview\r\n * @decorator component\r\n */\r\nexport const XImagePreviewPrefix = 'x-image-preview';\r\n\r\n/**\r\n * Image Preview Property\r\n */\r\n@Component({ template: '' })\r\nexport class XImagePreviewProperty extends XProperty {}\r\n\r\n/**\r\n * Image Group\r\n * @selector x-image-group\r\n * @decorator component\r\n */\r\nexport const XImageGroupPrefix = 'x-image-group';\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n OnChanges,\r\n Inject,\r\n ViewChild\r\n} from '@angular/core';\r\nimport { XImageNode, XImagePreviewPrefix, XImagePreviewProperty } from './image.property';\r\nimport { XConfigService } from '@ng-nest/ui/core';\r\nimport { X_DIALOG_DATA } from '@ng-nest/ui/dialog';\r\n\r\n@Component({\r\n selector: `${XImagePreviewPrefix}`,\r\n templateUrl: './image-preview.component.html',\r\n styleUrls: ['./image-preview.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XImagePreviewComponent extends XImagePreviewProperty implements OnChanges {\r\n imgScale3d = {\r\n x: 1,\r\n y: 1,\r\n z: 1\r\n };\r\n rotate = 0;\r\n\r\n position = {\r\n x: 0,\r\n y: 0\r\n };\r\n\r\n activated?: XImageNode;\r\n total = 1;\r\n current = 1;\r\n\r\n get getWrapperTransform() {\r\n return `translate3d(${this.position.x}px, ${this.position.y}px, 0)`;\r\n }\r\n get getImgTransform() {\r\n return `scale3d(${this.imgScale3d.x}, ${this.imgScale3d.y}, ${this.imgScale3d.z}) rotate(${this.rotate}deg)`;\r\n }\r\n\r\n @ViewChild('imageRef') imageRef!: ElementRef<HTMLImageElement>;\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public configService: XConfigService,\r\n @Inject(X_DIALOG_DATA) public data: XImageNode[]\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setActivated();\r\n }\r\n\r\n ngOnChanges() {}\r\n\r\n initialization() {\r\n this.imgScale3d = {\r\n x: 1,\r\n y: 1,\r\n z: 1\r\n };\r\n this.rotate = 0;\r\n this.position = {\r\n x: 0,\r\n y: 0\r\n };\r\n }\r\n\r\n setActivated() {\r\n if (!this.data) return;\r\n if (this.data.length === 1) {\r\n this.activated = this.data[0];\r\n this.total = this.current = 1;\r\n } else {\r\n this.total = this.data.length;\r\n this.activated = this.data.find((x, index) => {\r\n if (x.activated) {\r\n this.current = index + 1;\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n }\r\n\r\n onCurrentChange(num: number) {\r\n this.current += num;\r\n this.activated = this.data[this.current - 1];\r\n this.initialization();\r\n }\r\n\r\n onRotate(deg: number) {\r\n this.rotate += deg;\r\n }\r\n\r\n onScale(zoom: number) {\r\n this.imgScale3d.x += zoom;\r\n this.imgScale3d.y += zoom;\r\n }\r\n\r\n onDragReleased() {\r\n let width = this.imageRef.nativeElement.offsetWidth * this.imgScale3d.x;\r\n let height = this.imageRef.nativeElement.offsetHeight * this.imgScale3d.x;\r\n const clientWidth = document.documentElement.clientWidth;\r\n const clientHeight = window.innerHeight || document.documentElement.clientHeight;\r\n const isRotate = this.rotate % 180 !== 0;\r\n const box = this.imageRef.nativeElement.getBoundingClientRect();\r\n const docElem = document.documentElement;\r\n const left = box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0);\r\n const top = box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0);\r\n width = isRotate ? height : width;\r\n height = isRotate ? width : height;\r\n\r\n let position = { x: 0, y: 0 };\r\n if (width > clientWidth || height > clientHeight) {\r\n const x = this.fitPoint(left, width, clientWidth);\r\n const y = this.fitPoint(top, height, clientHeight);\r\n position.x = x ? x : 0;\r\n position.y = y ? y : 0;\r\n }\r\n\r\n this.position = { ...this.position, ...position };\r\n }\r\n\r\n fitPoint(start: number, size: number, clientSize: number): number | null {\r\n const startAddSize = start + size;\r\n const offsetStart = (size - clientSize) / 2;\r\n let distance: number | null = null;\r\n\r\n if (size > clientSize) {\r\n if (start > 0) {\r\n distance = offsetStart;\r\n }\r\n if (start < 0 && startAddSize < clientSize) {\r\n distance = -offsetStart;\r\n }\r\n } else {\r\n if (start < 0 || startAddSize > clientSize) {\r\n distance = start < 0 ? offsetStart : -offsetStart;\r\n }\r\n }\r\n\r\n return distance;\r\n }\r\n}\r\n","<div class=\"x-image-preview\" [ngClass]=\"classMap\">\r\n <div class=\"x-image-preview-header\">\r\n <div class=\"x-image-preview-header-left\">\r\n <span class=\"x-image-preview-current\" *ngIf=\"total != 1\">{{ current }} / {{ total }}</span>\r\n </div>\r\n <div class=\"x-image-preview-header-center\">\r\n <x-icon type=\"fto-corner-up-left\" (click)=\"onRotate(-90)\"></x-icon>\r\n <x-icon type=\"fto-corner-up-right\" (click)=\"onRotate(90)\"></x-icon>\r\n <x-icon type=\"fto-zoom-out\" [class.x-image-preview-disabled]=\"imgScale3d.x === 1\" (click)=\"imgScale3d.x > 1 && onScale(-1)\"></x-icon>\r\n <x-icon type=\"fto-zoom-in\" (click)=\"onScale(1)\"></x-icon>\r\n </div>\r\n <div class=\"x-image-preview-header-right\">\r\n <x-icon type=\"fto-x\" x-dialog-close></x-icon>\r\n </div>\r\n </div>\r\n <div\r\n class=\"x-image-preview-wrapper\"\r\n cdkDrag\r\n [style.transform]=\"getWrapperTransform\"\r\n [cdkDragFreeDragPosition]=\"position\"\r\n (cdkDragReleased)=\"onDragReleased()\"\r\n >\r\n <img #imageRef [src]=\"activated?.src\" [attr.alt]=\"activated?.alt\" cdkDragHandle [style.transform]=\"getImgTransform\" />\r\n </div>\r\n <div\r\n *ngIf=\"data && data.length > 1\"\r\n [class.x-image-preview-disabled]=\"current === 1\"\r\n class=\"x-image-preview-left\"\r\n (click)=\"current > 1 && onCurrentChange(-1)\"\r\n >\r\n <x-icon type=\"fto-chevron-left\"></x-icon>\r\n </div>\r\n <div\r\n *ngIf=\"data && data.length > 1\"\r\n [class.x-image-preview-disabled]=\"current === total\"\r\n class=\"x-image-preview-right\"\r\n (click)=\"current != total && onCurrentChange(1)\"\r\n >\r\n <x-icon type=\"fto-chevron-right\"></x-icon>\r\n </div>\r\n</div>\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\r\nimport { XImageComponent } from './image.component';\r\nimport { XImageGroupPrefix } from './image.property';\r\n\r\n@Component({\r\n selector: `${XImageGroupPrefix}`,\r\n templateUrl: './image-group.component.html',\r\n styleUrls: ['./image-group.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XImageGroupComponent {\r\n images: XImageComponent[] = [];\r\n\r\n addImage(image: XImageComponent): void {\r\n this.images.push(image);\r\n }\r\n}\r\n","<ng-content></ng-content>\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n OnInit,\r\n Optional,\r\n OnChanges,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport { XImageNode, XImagePrefix, XImageProperty } from './image.property';\r\nimport { XConfigService, XIsChange } from '@ng-nest/ui/core';\r\nimport { XDialogService } from '@ng-nest/ui/dialog';\r\nimport { XImagePreviewComponent } from './image-preview.component';\r\nimport { XI18nImage, XI18nService } from '@ng-nest/ui/i18n';\r\nimport { map, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { XImageGroupComponent } from './image-group.component';\r\n\r\n@Component({\r\n selector: `${XImagePrefix}`,\r\n templateUrl: './image.component.html',\r\n styleUrls: ['./image.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XImageComponent extends XImageProperty implements OnInit, OnChanges {\r\n locale: XI18nImage = {};\r\n isError = false;\r\n isLoaded = false;\r\n private _unSubject = new Subject<void>();\r\n\r\n get getPreviewText() {\r\n return this.previewText || this.locale.previewText;\r\n }\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public configService: XConfigService,\r\n public dialog: XDialogService,\r\n public i18n: XI18nService,\r\n @Optional() public group: XImageGroupComponent\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.group) {\r\n this.group.addImage(this);\r\n }\r\n this.i18n.localeChange\r\n .pipe(\r\n map((x) => x.image as XI18nImage),\r\n takeUntil(this._unSubject)\r\n )\r\n .subscribe((x) => {\r\n this.locale = x;\r\n this.cdr.markForCheck();\r\n });\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n let { src } = changes;\r\n if (XIsChange(src)) {\r\n this.isLoaded = false;\r\n }\r\n }\r\n\r\n onPreview() {\r\n let data: XImageNode[] = [];\r\n if (this.group) {\r\n const activatedIndex = this.group.images.indexOf(this);\r\n data = this.group.images.map((x, index) => ({ src: x.src, alt: x.alt, fallback: x.fallback, activated: index === activatedIndex }));\r\n } else {\r\n data = [{ src: this.src, alt: this.alt, fallback: this.fallback }];\r\n }\r\n this.dialog.create(XImagePreviewComponent, {\r\n width: '100%',\r\n height: '100%',\r\n className: 'x-image-preview-portal',\r\n data: data\r\n });\r\n }\r\n\r\n onError() {\r\n this.src = this.fallback;\r\n this.isError = true;\r\n }\r\n\r\n onLoad() {\r\n this.isLoaded = true;\r\n }\r\n}\r\n","<div class=\"x-image\" [ngClass]=\"classMap\">\r\n <img\r\n [hidden]=\"placeholder && !isLoaded\"\r\n class=\"x-image-img\"\r\n [src]=\"src\"\r\n [style.width]=\"width\"\r\n [style.height]=\"height\"\r\n (error)=\"onError()\"\r\n (load)=\"onLoad()\"\r\n />\r\n <img *ngIf=\"placeholder && !isLoaded\" class=\"x-image-img\" [src]=\"placeholder\" [style.width]=\"width\" [style.height]=\"height\" />\r\n <div class=\"x-image-overlay\" *ngIf=\"!isError\" (click)=\"onPreview()\">\r\n <div class=\"x-image-text\">\r\n <x-icon type=\"fto-eye\"></x-icon>\r\n <span>{{ getPreviewText }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XImageComponent } from './image.component';\r\nimport { XIconModule } from '@ng-nest/ui/icon';\r\nimport { XImagePreviewProperty, XImageProperty } from './image.property';\r\nimport { XDialogModule } from '@ng-nest/ui/dialog';\r\nimport { XImagePreviewComponent } from './image-preview.component';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { XI18nModule } from '@ng-nest/ui/i18n';\r\nimport { XImageGroupComponent } from './image-group.component';\r\n\r\n@NgModule({\r\n declarations: [XImageComponent, XImageProperty, XImagePreviewComponent, XImagePreviewProperty, XImageGroupComponent],\r\n exports: [XImageComponent, XImagePreviewComponent, XImageGroupComponent],\r\n imports: [CommonModule, XIconModule, XDialogModule, XButtonModule, XI18nModule, DragDropModule]\r\n})\r\nexport class XImageModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i4","i2","i3","i4.XImageGroupComponent","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,YAAY,GAAG,UAAU;AACtC,MAAM,aAAa,GAAG,OAAO,CAAC;AAE9B;;AAEG;AAEG,MAAO,cAAe,SAAQ,SAAS,CAAA;;8HA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,EAAA,YAAA,EAAA,CAJR,eAAe,EAAE,cAAc,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAEzG,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CADpF,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA;6HAG5D,YAAY,EAAA,OAAA,EAAA,CAFb,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;2FAEnF,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,oBAAoB,CAAC;AACpH,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,CAAC;AACxE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,CAAC;iBAChG,CAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -389,10 +389,10 @@ class XInputComponent extends XInputProperty {
|
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
/** @nocollapse */ XInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XInputComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.XConfigService }, { token: XInputGroupComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
392
|
-
/** @nocollapse */ XInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XInputComponent, selector: "x-input", host: { properties: { "style.width.px": "this.getWidth" } }, providers: [XValueAccessor(XInputComponent)], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }, { propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, static: true }, { propertyName: "inputValueRef", first: true, predicate: ["inputValueRef"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #inputElement\r\n class=\"x-input\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-clearable]=\"clearable\"\r\n [class.x-clear-show]=\"clearShow\"\r\n [class.x-input-icon]=\"getIcon\"\r\n [class.x-input-active]=\"active\"\r\n [class.x-input-pointer]=\"pointer\"\r\n [class.x-input-bordered]=\"bordered\"\r\n [class.x-input-icon-left]=\"getIconLayoutLeft\"\r\n [class.x-input-icon-right]=\"getIconLayoutRight\"\r\n [class.x-input-after]=\"after\"\r\n [class.x-input-before]=\"before\"\r\n [class.x-input-after-template]=\"afterIsTemplate\"\r\n [class.x-input-before-template]=\"beforeIsTemplate\"\r\n [class.x-input-value-template]=\"valueTpl\"\r\n [ngClass]=\"classMap\"\r\n>\r\n <label *ngIf=\"label\" [class.x-input-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-input-row\">\r\n <div class=\"x-input-row-before\" *ngIf=\"before\" [class.x-input-row-before-template]=\"beforeIsTemplate\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-input-input\" (mouseenter)=\"xMouseenter.emit($event)\" (mouseleave)=\"xMouseleave.emit($event)\">\r\n <div\r\n #inputValueRef\r\n class=\"x-input-value-template-value\"\r\n [style.left.rem]=\"paddingLeft\"\r\n [style.padding-left]=\"0\"\r\n [style.padding-right]=\"0\"\r\n [style.width]=\"getTemplateWidth\"\r\n (click)=\"xClick.emit($event)\"\r\n *ngIf=\"valueTpl\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"valueTpl; context: valueTplContext ? valueTplContext : { $value: value }\"></ng-container>\r\n </div>\r\n <input\r\n #inputRef\r\n [class.x-input-has-value-template]=\"valueTpl\"\r\n [ngStyle]=\"inputStyle\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n [maxlength]=\"maxlength\"\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"change($event)\"\r\n [style.padding-left.rem]=\"paddingLeft\"\r\n [style.padding-right.rem]=\"paddingRight\"\r\n (focus)=\"xFocus.emit($event)\"\r\n (blur)=\"xBlur.emit($event)\"\r\n (input)=\"formControlValidator(); xInput.emit($event)\"\r\n (keydown)=\"xKeydown.emit($event)\"\r\n (click)=\"xClick.emit($event)\"\r\n (compositionstart)=\"xComposition.next(true)\"\r\n (compositionend)=\"xComposition.next(false)\"\r\n />\r\n <x-icon *ngIf=\"clearShow && !iconSpin\" class=\"x-input-clear\" type=\"fto-x\" (click)=\"onClear()\"></x-icon>\r\n <x-icon\r\n *ngIf=\"icon && ((!clearShow && getIconLayoutRight) || getIconLayoutLeft || iconSpin)\"\r\n [type]=\"icon\"\r\n [spin]=\"iconSpin\"\r\n (click)=\"xClick.emit($event)\"\r\n ></x-icon>\r\n <span class=\"x-input-max-length\" *ngIf=\"maxlength\">{{ lengthTotal }}</span>\r\n <span class=\"x-input-error-message\" *ngIf=\"invalid\">{{ invalidMessage }}</span>\r\n <ng-container *ngIf=\"requiredIsEmpty || invalid\">\r\n <div class=\"x-border-error x-top-left\"></div>\r\n <div class=\"x-border-error x-top-right\"></div>\r\n <div class=\"x-border-error x-bottom-left\"></div>\r\n <div class=\"x-border-error x-bottom-right\"></div>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-input-row-after\" *ngIf=\"after\" [class.x-input-row-after-template]=\"afterIsTemplate\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-input{display:inline-block;width:12rem}.x-input{width:100%;margin:0;padding:0}.x-input.x-flex{display:flex}.x-input.x-justify-start{justify-content:flex-start}.x-input.x-justify-center{justify-content:center}.x-input.x-justify-end{justify-content:flex-end}.x-input.x-justify-space-between{justify-content:space-between}.x-input.x-justify-space-around{justify-content:space-around}.x-input.x-align-start{align-items:flex-start}.x-input.x-align-center{align-items:center}.x-input.x-align-end{align-items:flex-end}.x-input.x-direction-column{flex-direction:column}.x-input.x-direction-column-reverse{flex-direction:column-reverse}.x-input.x-direction-row{flex-direction:row}.x-input.x-direction-row-reverse{flex-direction:row-reverse}.x-input>label{display:inline-block;white-space:nowrap;position:relative;color:var(--x-text-300);font-weight:600}.x-input>label.x-text-align-start{text-align:start}.x-input>label.x-text-align-center{text-align:center}.x-input>label.x-text-align-end{text-align:end}.x-input-row{flex:1;display:flex;align-items:center}.x-input-row .x-input-row-before:not(.x-input-row-before-template),.x-input-row .x-input-row-after:not(.x-input-row-after-template){border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);border-width:0}.x-input-row .x-input-row-before-template{display:contents}.x-input-row .x-input-row-before-template input,.x-input-row .x-input-row-before-template .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-input-row .x-input-row-after-template{display:contents}.x-input-row .x-input-row-after-template input,.x-input-row .x-input-row-after-template .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-input-row .x-input-row-before-template:hover,.x-input-row .x-input-row-before-template:focus{z-index:1}.x-input-row .x-input-row-before-template input:hover,.x-input-row .x-input-row-before-template input:focus,.x-input-row .x-input-row-before-template .x-button:hover,.x-input-row .x-input-row-before-template .x-button:focus,.x-input-row .x-input-row-after-template input:hover,.x-input-row .x-input-row-after-template input:focus,.x-input-row .x-input-row-after-template .x-button:hover,.x-input-row .x-input-row-after-template .x-button:focus{z-index:1}.x-input-row>.x-input-input{position:relative;width:100%;display:inline-flex;align-items:center}.x-input-row>.x-input-input>input{flex:1;width:100%;font-size:var(--x-font-size);background-color:var(--x-background);background-image:none;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);border-width:0;box-shadow:var(--x-box-shadow) transparent;transition-property:background-color,border-color;transition-duration:var(--x-animation-duration-slow)}.x-input-row>.x-input-input>input::-moz-placeholder{color:var(--x-text-700);opacity:1}.x-input-row>.x-input-input>input:-ms-input-placeholder{color:var(--x-text-700)}.x-input-row>.x-input-input>input::-webkit-input-placeholder{color:var(--x-text-700)}.x-input-row>.x-input-input>input[disabled]{color:var(--x-text-500)}.x-input-row>.x-input-input>input:focus{border-color:var(--x-primary);outline:0}.x-input-row>.x-input-input>x-icon{color:var(--x-text-400);transition:all var(--x-animation-duration-base);z-index:2}.x-input-row>.x-input-input:hover>input{border-color:var(--x-primary-300)}.x-input-row>.x-input-input:focus>input{border-color:var(--x-primary);outline:0}.x-input-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-input-value-template .x-input-input>input.x-input-has-value-template{color:transparent}.x-input-value-template-value{position:absolute;display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.x-input-value-template-value:hover+input{border-color:var(--x-primary-300)}.x-input-error-message{position:absolute;bottom:0;left:0;font-size:var(--x-font-size)-.125rem;color:var(--x-danger);margin-bottom:calc((var(--x-font-size) + .45rem) * -1);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-input.x-invalid>label,.x-input.x-required>label{color:var(--x-danger)}.x-input.x-invalid .x-input-input>x-icon,.x-input.x-required .x-input-input>x-icon{color:var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error,.x-input.x-required .x-input-input .x-border-error{position:absolute;height:.5rem;width:.5rem;z-index:10}.x-input.x-invalid .x-input-input .x-border-error.x-top-left,.x-input.x-required .x-input-input .x-border-error.x-top-left{border-top-left-radius:var(--x-border-radius);top:0;left:0;border-top:var(--x-border-width) solid var(--x-danger);border-left:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-top-right,.x-input.x-required .x-input-input .x-border-error.x-top-right{border-top-right-radius:var(--x-border-radius);top:0;right:0;border-top:var(--x-border-width) solid var(--x-danger);border-right:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-bottom-left,.x-input.x-required .x-input-input .x-border-error.x-bottom-left{border-bottom-left-radius:var(--x-border-radius);bottom:0;left:0;border-bottom:var(--x-border-width) solid var(--x-danger);border-left:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-bottom-right,.x-input.x-required .x-input-input .x-border-error.x-bottom-right{border-bottom-right-radius:var(--x-border-radius);bottom:0;right:0;border-bottom:var(--x-border-width) solid var(--x-danger);border-right:var(--x-border-width) solid var(--x-danger)}.x-input.x-disabled>.x-input-row>.x-input-input>x-icon{color:var(--x-text-400)}.x-input.x-disabled>.x-input-row>.x-input-input>input,.x-input.x-disabled>.x-input-row>.x-input-input>.x-input-value-template-value{color:var(--x-text-400);cursor:not-allowed;border-color:var(--x-border-100);background-color:var(--x-background-a100)}.x-input.x-clearable>.x-input-row>.x-input-input>.x-input-clear{position:absolute;color:var(--x-text-400);font-size:var(--x-font-size-medium);padding:.4rem;right:0;left:inherit;opacity:0;cursor:pointer;z-index:2}.x-input.x-clearable>.x-input-row>.x-input-input>.x-input-clear:hover{color:var(--x-text-300)}.x-input.x-clearable>.x-input-row>.x-input-input:hover>input .x-input-clear,.x-input.x-clearable>.x-input-row>.x-input-input:hover>.x-input-value-template-value .x-input-clear{opacity:1}.x-input.x-clearable.x-clear-show>.x-input-row>.x-input-input>.x-input-clear{opacity:1}.x-input.x-clearable.x-clear-show>.x-input-row>.x-input-input>input{padding-right:calc(var(--x-font-size-medium) + .4rem * 2)!important}.x-input-max-length{position:absolute;font-size:var(--x-font-size-small);color:var(--x-text-400);padding:0 .4rem;right:0}.x-input.x-direction-row>label{padding:0 .5rem 0 0}.x-input.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-input.x-direction-column,.x-input.x-direction-column-reverse{align-items:inherit}.x-input-icon>.x-input-row>.x-input-input>x-icon{position:absolute;font-size:var(--x-font-size-medium);padding:.4rem}.x-input-icon>.x-input-row>.x-input-input>x-icon.x-icon-spin{padding:0;margin:.4rem}.x-input-icon-left>.x-input-row>.x-input-input>input,.x-input-icon-left>.x-input-row>.x-input-input>.x-input-value-template-value{padding-left:calc(var(--x-font-size-medium) + .8rem)}.x-input-icon-left>.x-input-row>.x-input-input>x-icon{left:0}.x-input-icon-right>.x-input-row>.x-input-input>input,.x-input-icon-right>.x-input-row>.x-input-input>.x-input-value-template-value{padding-right:calc(var(--x-font-size-medium) + .8rem)}.x-input-icon-right>.x-input-row>.x-input-input>x-icon{right:0}.x-input-icon-right>.x-input-row>.x-input-input>.x-input-max-length{right:inherit;left:0}.x-input-bordered>.x-input-row>.x-input-input>input{border-width:var(--x-border-width)}.x-input-bordered .x-input-row .x-input-row-before:not(.x-input-row-before-template){border-width:var(--x-border-width);border-right-width:0}.x-input-bordered .x-input-row .x-input-row-after:not(.x-input-row-after-template){border-width:var(--x-border-width);border-left-width:0}.x-input-before>.x-input-row>.x-input-input>input{border-top-left-radius:0;border-bottom-left-radius:0}.x-input-before-template .x-input-input>input{margin-left:calc(var(--x-border-width) * -1)}.x-input-before-template .x-input-input>input:hover,.x-input-before-template .x-input-input>input:focus{z-index:1}.x-input-after>.x-input-row>.x-input-input>input{border-top-right-radius:0;border-bottom-right-radius:0}.x-input-after-template>.x-input-row>.x-input-input>input{margin-right:calc(var(--x-border-width) * -1)}.x-input-after-template>.x-input-row>.x-input-input>input:hover,.x-input-after-template>.x-input-row>.x-input-input>input:focus{z-index:1}.x-input-active .x-input-row>.x-input-input>input{border-color:var(--x-primary)}.x-input-pointer .x-input-row>.x-input-input>input,.x-input-pointer .x-input-row>.x-input-input>x-icon,.x-input-pointer .x-input-row>.x-input-input>.x-input-value-template-value{cursor:pointer}.x-input-big>.x-input-row>.x-input-input>input,.x-input-big>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-big>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-big);line-height:var(--x-height-big)}.x-input-big>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-big>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>label{height:var(--x-height-big);line-height:var(--x-height-big)}.x-input-large>.x-input-row>.x-input-input>input,.x-input-large>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-large>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-large);line-height:var(--x-height-large)}.x-input-large>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-large>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>label{height:var(--x-height-large);line-height:var(--x-height-large)}.x-input-medium>.x-input-row>.x-input-input>input,.x-input-medium>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-medium>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-input-medium>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-medium>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>label{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-input-small>.x-input-row>.x-input-input>input,.x-input-small>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-small>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-small);line-height:var(--x-height-small)}.x-input-small>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-small>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>label{height:var(--x-height-small);line-height:var(--x-height-small)}.x-input-mini>.x-input-row>.x-input-input>input,.x-input-mini>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-mini>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-input-mini>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-mini>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>label{height:var(--x-height-mini);line-height:var(--x-height-mini)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.XIconComponent, selector: "x-icon" }, { kind: "directive", type: i6.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
392
|
+
/** @nocollapse */ XInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: XInputComponent, selector: "x-input", host: { properties: { "style.width.px": "this.getWidth" } }, providers: [XValueAccessor(XInputComponent)], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }, { propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, static: true }, { propertyName: "inputValueRef", first: true, predicate: ["inputValueRef"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\r\n #inputElement\r\n class=\"x-input\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-clearable]=\"clearable\"\r\n [class.x-clear-show]=\"clearShow\"\r\n [class.x-input-icon]=\"getIcon\"\r\n [class.x-input-active]=\"active\"\r\n [class.x-input-pointer]=\"pointer\"\r\n [class.x-input-bordered]=\"bordered\"\r\n [class.x-input-icon-left]=\"getIconLayoutLeft\"\r\n [class.x-input-icon-right]=\"getIconLayoutRight\"\r\n [class.x-input-after]=\"after\"\r\n [class.x-input-before]=\"before\"\r\n [class.x-input-after-template]=\"afterIsTemplate\"\r\n [class.x-input-before-template]=\"beforeIsTemplate\"\r\n [class.x-input-value-template]=\"valueTpl\"\r\n [ngClass]=\"classMap\"\r\n>\r\n <label *ngIf=\"label\" [class.x-input-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-input-row\">\r\n <div class=\"x-input-row-before\" *ngIf=\"before\" [class.x-input-row-before-template]=\"beforeIsTemplate\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-input-input\" (mouseenter)=\"xMouseenter.emit($event)\" (mouseleave)=\"xMouseleave.emit($event)\">\r\n <div\r\n #inputValueRef\r\n class=\"x-input-value-template-value\"\r\n [style.left.rem]=\"paddingLeft\"\r\n [style.padding-left]=\"0\"\r\n [style.padding-right]=\"0\"\r\n [style.width]=\"getTemplateWidth\"\r\n (click)=\"xClick.emit($event)\"\r\n *ngIf=\"valueTpl\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"valueTpl; context: valueTplContext ? valueTplContext : { $value: value }\"></ng-container>\r\n </div>\r\n <input\r\n #inputRef\r\n [class.x-input-has-value-template]=\"valueTpl\"\r\n [ngStyle]=\"inputStyle\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n [maxlength]=\"maxlength\"\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"change($event)\"\r\n [style.padding-left.rem]=\"paddingLeft\"\r\n [style.padding-right.rem]=\"paddingRight\"\r\n (focus)=\"xFocus.emit($event)\"\r\n (blur)=\"xBlur.emit($event)\"\r\n (input)=\"formControlValidator(); xInput.emit($event)\"\r\n (keydown)=\"xKeydown.emit($event)\"\r\n (click)=\"xClick.emit($event)\"\r\n (compositionstart)=\"xComposition.next(true)\"\r\n (compositionend)=\"xComposition.next(false)\"\r\n />\r\n <x-icon *ngIf=\"clearShow && !iconSpin\" class=\"x-input-clear\" type=\"fto-x\" (click)=\"onClear()\"></x-icon>\r\n <x-icon\r\n *ngIf=\"icon && ((!clearShow && getIconLayoutRight) || getIconLayoutLeft || iconSpin)\"\r\n [type]=\"icon\"\r\n [spin]=\"iconSpin\"\r\n (click)=\"xClick.emit($event)\"\r\n ></x-icon>\r\n <span class=\"x-input-max-length\" *ngIf=\"maxlength\">{{ lengthTotal }}</span>\r\n <span class=\"x-input-error-message\" *ngIf=\"invalid\">{{ invalidMessage }}</span>\r\n <ng-container *ngIf=\"requiredIsEmpty || invalid\">\r\n <div class=\"x-border-error x-top-left\"></div>\r\n <div class=\"x-border-error x-top-right\"></div>\r\n <div class=\"x-border-error x-bottom-left\"></div>\r\n <div class=\"x-border-error x-bottom-right\"></div>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-input-row-after\" *ngIf=\"after\" [class.x-input-row-after-template]=\"afterIsTemplate\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-input{display:inline-block;width:12rem}.x-input{width:100%;margin:0;padding:0}.x-input.x-flex{display:flex}.x-input.x-justify-start{justify-content:flex-start}.x-input.x-justify-center{justify-content:center}.x-input.x-justify-end{justify-content:flex-end}.x-input.x-justify-space-between{justify-content:space-between}.x-input.x-justify-space-around{justify-content:space-around}.x-input.x-align-start{align-items:flex-start}.x-input.x-align-center{align-items:center}.x-input.x-align-end{align-items:flex-end}.x-input.x-direction-column{flex-direction:column}.x-input.x-direction-column-reverse{flex-direction:column-reverse}.x-input.x-direction-row{flex-direction:row}.x-input.x-direction-row-reverse{flex-direction:row-reverse}.x-input>label{display:inline-block;white-space:nowrap;position:relative;color:var(--x-text-300);font-weight:600}.x-input>label.x-text-align-start{text-align:start}.x-input>label.x-text-align-center{text-align:center}.x-input>label.x-text-align-end{text-align:end}.x-input-row{flex:1;display:flex;align-items:center}.x-input-row .x-input-row-before:not(.x-input-row-before-template),.x-input-row .x-input-row-after:not(.x-input-row-after-template){border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);border-width:0}.x-input-row .x-input-row-before-template{display:contents}.x-input-row .x-input-row-before-template input,.x-input-row .x-input-row-before-template .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-input-row .x-input-row-after-template{display:contents}.x-input-row .x-input-row-after-template input,.x-input-row .x-input-row-after-template .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-input-row .x-input-row-before-template:hover,.x-input-row .x-input-row-before-template:focus{z-index:1}.x-input-row .x-input-row-before-template input:hover,.x-input-row .x-input-row-before-template input:focus,.x-input-row .x-input-row-before-template .x-button:hover,.x-input-row .x-input-row-before-template .x-button:focus,.x-input-row .x-input-row-after-template input:hover,.x-input-row .x-input-row-after-template input:focus,.x-input-row .x-input-row-after-template .x-button:hover,.x-input-row .x-input-row-after-template .x-button:focus{z-index:1}.x-input-row>.x-input-input{position:relative;width:100%;display:inline-flex;align-items:center}.x-input-row>.x-input-input>input{flex:1;width:100%;font-size:var(--x-font-size);background-color:var(--x-background);background-image:none;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);border-width:0;box-shadow:var(--x-box-shadow) transparent;transition-property:background-color,border-color;transition-duration:var(--x-animation-duration-slow)}.x-input-row>.x-input-input>input::-moz-placeholder{color:var(--x-text-700);opacity:1}.x-input-row>.x-input-input>input:-ms-input-placeholder{color:var(--x-text-700)}.x-input-row>.x-input-input>input::-webkit-input-placeholder{color:var(--x-text-700)}.x-input-row>.x-input-input>input[disabled]{color:var(--x-text-500)}.x-input-row>.x-input-input>input:focus{border-color:var(--x-primary);outline:0}.x-input-row>.x-input-input>x-icon{color:var(--x-text-400);transition:all var(--x-animation-duration-base);z-index:2}.x-input-row>.x-input-input:hover>input{border-color:var(--x-primary-300)}.x-input-row>.x-input-input:focus>input{border-color:var(--x-primary);outline:0}.x-input-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-input-value-template .x-input-input>input.x-input-has-value-template{color:transparent!important}.x-input-value-template-value{position:absolute;display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.x-input-value-template-value:hover+input{border-color:var(--x-primary-300)}.x-input-error-message{position:absolute;bottom:0;left:0;font-size:var(--x-font-size)-.125rem;color:var(--x-danger);margin-bottom:calc((var(--x-font-size) + .45rem) * -1);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-input.x-invalid>label,.x-input.x-required>label{color:var(--x-danger)}.x-input.x-invalid .x-input-input>x-icon,.x-input.x-required .x-input-input>x-icon{color:var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error,.x-input.x-required .x-input-input .x-border-error{position:absolute;height:.5rem;width:.5rem;z-index:10}.x-input.x-invalid .x-input-input .x-border-error.x-top-left,.x-input.x-required .x-input-input .x-border-error.x-top-left{border-top-left-radius:var(--x-border-radius);top:0;left:0;border-top:var(--x-border-width) solid var(--x-danger);border-left:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-top-right,.x-input.x-required .x-input-input .x-border-error.x-top-right{border-top-right-radius:var(--x-border-radius);top:0;right:0;border-top:var(--x-border-width) solid var(--x-danger);border-right:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-bottom-left,.x-input.x-required .x-input-input .x-border-error.x-bottom-left{border-bottom-left-radius:var(--x-border-radius);bottom:0;left:0;border-bottom:var(--x-border-width) solid var(--x-danger);border-left:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-bottom-right,.x-input.x-required .x-input-input .x-border-error.x-bottom-right{border-bottom-right-radius:var(--x-border-radius);bottom:0;right:0;border-bottom:var(--x-border-width) solid var(--x-danger);border-right:var(--x-border-width) solid var(--x-danger)}.x-input.x-disabled>.x-input-row>.x-input-input>x-icon{color:var(--x-text-400);cursor:not-allowed}.x-input.x-disabled>.x-input-row>.x-input-input>input{color:var(--x-text-400);cursor:not-allowed;border-color:var(--x-border-100);background-color:var(--x-background-a100)}.x-input.x-disabled>.x-input-row>.x-input-input>.x-input-value-template-value{color:var(--x-text-400);cursor:not-allowed}.x-input.x-clearable>.x-input-row>.x-input-input>.x-input-clear{position:absolute;color:var(--x-text-400);font-size:var(--x-font-size-medium);padding:.4rem;right:0;left:inherit;opacity:0;cursor:pointer;z-index:2}.x-input.x-clearable>.x-input-row>.x-input-input>.x-input-clear:hover{color:var(--x-text-300)}.x-input.x-clearable>.x-input-row>.x-input-input:hover>input .x-input-clear,.x-input.x-clearable>.x-input-row>.x-input-input:hover>.x-input-value-template-value .x-input-clear{opacity:1}.x-input.x-clearable.x-clear-show>.x-input-row>.x-input-input>.x-input-clear{opacity:1}.x-input.x-clearable.x-clear-show>.x-input-row>.x-input-input>input{padding-right:calc(var(--x-font-size-medium) + .4rem * 2)!important}.x-input-max-length{position:absolute;font-size:var(--x-font-size-small);color:var(--x-text-400);padding:0 .4rem;right:0}.x-input.x-direction-row>label{padding:0 .5rem 0 0}.x-input.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-input.x-direction-column,.x-input.x-direction-column-reverse{align-items:inherit}.x-input-icon>.x-input-row>.x-input-input>x-icon{position:absolute;font-size:var(--x-font-size-medium);padding:.4rem}.x-input-icon>.x-input-row>.x-input-input>x-icon.x-icon-spin{padding:0;margin:.4rem}.x-input-icon-left>.x-input-row>.x-input-input>input,.x-input-icon-left>.x-input-row>.x-input-input>.x-input-value-template-value{padding-left:calc(var(--x-font-size-medium) + .8rem)}.x-input-icon-left>.x-input-row>.x-input-input>x-icon{left:0}.x-input-icon-right>.x-input-row>.x-input-input>input,.x-input-icon-right>.x-input-row>.x-input-input>.x-input-value-template-value{padding-right:calc(var(--x-font-size-medium) + .8rem)}.x-input-icon-right>.x-input-row>.x-input-input>x-icon{right:0}.x-input-icon-right>.x-input-row>.x-input-input>.x-input-max-length{right:inherit;left:0}.x-input-bordered>.x-input-row>.x-input-input>input{border-width:var(--x-border-width)}.x-input-bordered .x-input-row .x-input-row-before:not(.x-input-row-before-template){border-width:var(--x-border-width);border-right-width:0}.x-input-bordered .x-input-row .x-input-row-after:not(.x-input-row-after-template){border-width:var(--x-border-width);border-left-width:0}.x-input-before>.x-input-row>.x-input-input>input{border-top-left-radius:0;border-bottom-left-radius:0}.x-input-before-template .x-input-input>input{margin-left:calc(var(--x-border-width) * -1)}.x-input-before-template .x-input-input>input:hover,.x-input-before-template .x-input-input>input:focus{z-index:1}.x-input-after>.x-input-row>.x-input-input>input{border-top-right-radius:0;border-bottom-right-radius:0}.x-input-after-template>.x-input-row>.x-input-input>input{margin-right:calc(var(--x-border-width) * -1)}.x-input-after-template>.x-input-row>.x-input-input>input:hover,.x-input-after-template>.x-input-row>.x-input-input>input:focus{z-index:1}.x-input-active .x-input-row>.x-input-input>input{border-color:var(--x-primary)}.x-input-pointer .x-input-row>.x-input-input>input,.x-input-pointer .x-input-row>.x-input-input>x-icon,.x-input-pointer .x-input-row>.x-input-input>.x-input-value-template-value{cursor:pointer}.x-input-big>.x-input-row>.x-input-input>input,.x-input-big>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-big>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-big);line-height:var(--x-height-big)}.x-input-big>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-big>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>label{height:var(--x-height-big);line-height:var(--x-height-big)}.x-input-large>.x-input-row>.x-input-input>input,.x-input-large>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-large>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-large);line-height:var(--x-height-large)}.x-input-large>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-large>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>label{height:var(--x-height-large);line-height:var(--x-height-large)}.x-input-medium>.x-input-row>.x-input-input>input,.x-input-medium>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-medium>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-input-medium>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-medium>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>label{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-input-small>.x-input-row>.x-input-input>input,.x-input-small>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-small>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-small);line-height:var(--x-height-small)}.x-input-small>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-small>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>label{height:var(--x-height-small);line-height:var(--x-height-small)}.x-input-mini>.x-input-row>.x-input-input>input,.x-input-mini>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-mini>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-input-mini>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-mini>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>label{height:var(--x-height-mini);line-height:var(--x-height-mini)}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.XIconComponent, selector: "x-icon" }, { kind: "directive", type: i6.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
393
393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: XInputComponent, decorators: [{
|
|
394
394
|
type: Component,
|
|
395
|
-
args: [{ selector: `${XInputPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XInputComponent)], template: "<div\r\n #inputElement\r\n class=\"x-input\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-clearable]=\"clearable\"\r\n [class.x-clear-show]=\"clearShow\"\r\n [class.x-input-icon]=\"getIcon\"\r\n [class.x-input-active]=\"active\"\r\n [class.x-input-pointer]=\"pointer\"\r\n [class.x-input-bordered]=\"bordered\"\r\n [class.x-input-icon-left]=\"getIconLayoutLeft\"\r\n [class.x-input-icon-right]=\"getIconLayoutRight\"\r\n [class.x-input-after]=\"after\"\r\n [class.x-input-before]=\"before\"\r\n [class.x-input-after-template]=\"afterIsTemplate\"\r\n [class.x-input-before-template]=\"beforeIsTemplate\"\r\n [class.x-input-value-template]=\"valueTpl\"\r\n [ngClass]=\"classMap\"\r\n>\r\n <label *ngIf=\"label\" [class.x-input-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-input-row\">\r\n <div class=\"x-input-row-before\" *ngIf=\"before\" [class.x-input-row-before-template]=\"beforeIsTemplate\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-input-input\" (mouseenter)=\"xMouseenter.emit($event)\" (mouseleave)=\"xMouseleave.emit($event)\">\r\n <div\r\n #inputValueRef\r\n class=\"x-input-value-template-value\"\r\n [style.left.rem]=\"paddingLeft\"\r\n [style.padding-left]=\"0\"\r\n [style.padding-right]=\"0\"\r\n [style.width]=\"getTemplateWidth\"\r\n (click)=\"xClick.emit($event)\"\r\n *ngIf=\"valueTpl\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"valueTpl; context: valueTplContext ? valueTplContext : { $value: value }\"></ng-container>\r\n </div>\r\n <input\r\n #inputRef\r\n [class.x-input-has-value-template]=\"valueTpl\"\r\n [ngStyle]=\"inputStyle\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n [maxlength]=\"maxlength\"\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"change($event)\"\r\n [style.padding-left.rem]=\"paddingLeft\"\r\n [style.padding-right.rem]=\"paddingRight\"\r\n (focus)=\"xFocus.emit($event)\"\r\n (blur)=\"xBlur.emit($event)\"\r\n (input)=\"formControlValidator(); xInput.emit($event)\"\r\n (keydown)=\"xKeydown.emit($event)\"\r\n (click)=\"xClick.emit($event)\"\r\n (compositionstart)=\"xComposition.next(true)\"\r\n (compositionend)=\"xComposition.next(false)\"\r\n />\r\n <x-icon *ngIf=\"clearShow && !iconSpin\" class=\"x-input-clear\" type=\"fto-x\" (click)=\"onClear()\"></x-icon>\r\n <x-icon\r\n *ngIf=\"icon && ((!clearShow && getIconLayoutRight) || getIconLayoutLeft || iconSpin)\"\r\n [type]=\"icon\"\r\n [spin]=\"iconSpin\"\r\n (click)=\"xClick.emit($event)\"\r\n ></x-icon>\r\n <span class=\"x-input-max-length\" *ngIf=\"maxlength\">{{ lengthTotal }}</span>\r\n <span class=\"x-input-error-message\" *ngIf=\"invalid\">{{ invalidMessage }}</span>\r\n <ng-container *ngIf=\"requiredIsEmpty || invalid\">\r\n <div class=\"x-border-error x-top-left\"></div>\r\n <div class=\"x-border-error x-top-right\"></div>\r\n <div class=\"x-border-error x-bottom-left\"></div>\r\n <div class=\"x-border-error x-bottom-right\"></div>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-input-row-after\" *ngIf=\"after\" [class.x-input-row-after-template]=\"afterIsTemplate\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-input{display:inline-block;width:12rem}.x-input{width:100%;margin:0;padding:0}.x-input.x-flex{display:flex}.x-input.x-justify-start{justify-content:flex-start}.x-input.x-justify-center{justify-content:center}.x-input.x-justify-end{justify-content:flex-end}.x-input.x-justify-space-between{justify-content:space-between}.x-input.x-justify-space-around{justify-content:space-around}.x-input.x-align-start{align-items:flex-start}.x-input.x-align-center{align-items:center}.x-input.x-align-end{align-items:flex-end}.x-input.x-direction-column{flex-direction:column}.x-input.x-direction-column-reverse{flex-direction:column-reverse}.x-input.x-direction-row{flex-direction:row}.x-input.x-direction-row-reverse{flex-direction:row-reverse}.x-input>label{display:inline-block;white-space:nowrap;position:relative;color:var(--x-text-300);font-weight:600}.x-input>label.x-text-align-start{text-align:start}.x-input>label.x-text-align-center{text-align:center}.x-input>label.x-text-align-end{text-align:end}.x-input-row{flex:1;display:flex;align-items:center}.x-input-row .x-input-row-before:not(.x-input-row-before-template),.x-input-row .x-input-row-after:not(.x-input-row-after-template){border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);border-width:0}.x-input-row .x-input-row-before-template{display:contents}.x-input-row .x-input-row-before-template input,.x-input-row .x-input-row-before-template .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-input-row .x-input-row-after-template{display:contents}.x-input-row .x-input-row-after-template input,.x-input-row .x-input-row-after-template .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-input-row .x-input-row-before-template:hover,.x-input-row .x-input-row-before-template:focus{z-index:1}.x-input-row .x-input-row-before-template input:hover,.x-input-row .x-input-row-before-template input:focus,.x-input-row .x-input-row-before-template .x-button:hover,.x-input-row .x-input-row-before-template .x-button:focus,.x-input-row .x-input-row-after-template input:hover,.x-input-row .x-input-row-after-template input:focus,.x-input-row .x-input-row-after-template .x-button:hover,.x-input-row .x-input-row-after-template .x-button:focus{z-index:1}.x-input-row>.x-input-input{position:relative;width:100%;display:inline-flex;align-items:center}.x-input-row>.x-input-input>input{flex:1;width:100%;font-size:var(--x-font-size);background-color:var(--x-background);background-image:none;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);border-width:0;box-shadow:var(--x-box-shadow) transparent;transition-property:background-color,border-color;transition-duration:var(--x-animation-duration-slow)}.x-input-row>.x-input-input>input::-moz-placeholder{color:var(--x-text-700);opacity:1}.x-input-row>.x-input-input>input:-ms-input-placeholder{color:var(--x-text-700)}.x-input-row>.x-input-input>input::-webkit-input-placeholder{color:var(--x-text-700)}.x-input-row>.x-input-input>input[disabled]{color:var(--x-text-500)}.x-input-row>.x-input-input>input:focus{border-color:var(--x-primary);outline:0}.x-input-row>.x-input-input>x-icon{color:var(--x-text-400);transition:all var(--x-animation-duration-base);z-index:2}.x-input-row>.x-input-input:hover>input{border-color:var(--x-primary-300)}.x-input-row>.x-input-input:focus>input{border-color:var(--x-primary);outline:0}.x-input-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-input-value-template .x-input-input>input.x-input-has-value-template{color:transparent}.x-input-value-template-value{position:absolute;display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.x-input-value-template-value:hover+input{border-color:var(--x-primary-300)}.x-input-error-message{position:absolute;bottom:0;left:0;font-size:var(--x-font-size)-.125rem;color:var(--x-danger);margin-bottom:calc((var(--x-font-size) + .45rem) * -1);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-input.x-invalid>label,.x-input.x-required>label{color:var(--x-danger)}.x-input.x-invalid .x-input-input>x-icon,.x-input.x-required .x-input-input>x-icon{color:var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error,.x-input.x-required .x-input-input .x-border-error{position:absolute;height:.5rem;width:.5rem;z-index:10}.x-input.x-invalid .x-input-input .x-border-error.x-top-left,.x-input.x-required .x-input-input .x-border-error.x-top-left{border-top-left-radius:var(--x-border-radius);top:0;left:0;border-top:var(--x-border-width) solid var(--x-danger);border-left:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-top-right,.x-input.x-required .x-input-input .x-border-error.x-top-right{border-top-right-radius:var(--x-border-radius);top:0;right:0;border-top:var(--x-border-width) solid var(--x-danger);border-right:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-bottom-left,.x-input.x-required .x-input-input .x-border-error.x-bottom-left{border-bottom-left-radius:var(--x-border-radius);bottom:0;left:0;border-bottom:var(--x-border-width) solid var(--x-danger);border-left:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-bottom-right,.x-input.x-required .x-input-input .x-border-error.x-bottom-right{border-bottom-right-radius:var(--x-border-radius);bottom:0;right:0;border-bottom:var(--x-border-width) solid var(--x-danger);border-right:var(--x-border-width) solid var(--x-danger)}.x-input.x-disabled>.x-input-row>.x-input-input>x-icon{color:var(--x-text-400)}.x-input.x-disabled>.x-input-row>.x-input-input>input,.x-input.x-disabled>.x-input-row>.x-input-input>.x-input-value-template-value{color:var(--x-text-400);cursor:not-allowed;border-color:var(--x-border-100);background-color:var(--x-background-a100)}.x-input.x-clearable>.x-input-row>.x-input-input>.x-input-clear{position:absolute;color:var(--x-text-400);font-size:var(--x-font-size-medium);padding:.4rem;right:0;left:inherit;opacity:0;cursor:pointer;z-index:2}.x-input.x-clearable>.x-input-row>.x-input-input>.x-input-clear:hover{color:var(--x-text-300)}.x-input.x-clearable>.x-input-row>.x-input-input:hover>input .x-input-clear,.x-input.x-clearable>.x-input-row>.x-input-input:hover>.x-input-value-template-value .x-input-clear{opacity:1}.x-input.x-clearable.x-clear-show>.x-input-row>.x-input-input>.x-input-clear{opacity:1}.x-input.x-clearable.x-clear-show>.x-input-row>.x-input-input>input{padding-right:calc(var(--x-font-size-medium) + .4rem * 2)!important}.x-input-max-length{position:absolute;font-size:var(--x-font-size-small);color:var(--x-text-400);padding:0 .4rem;right:0}.x-input.x-direction-row>label{padding:0 .5rem 0 0}.x-input.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-input.x-direction-column,.x-input.x-direction-column-reverse{align-items:inherit}.x-input-icon>.x-input-row>.x-input-input>x-icon{position:absolute;font-size:var(--x-font-size-medium);padding:.4rem}.x-input-icon>.x-input-row>.x-input-input>x-icon.x-icon-spin{padding:0;margin:.4rem}.x-input-icon-left>.x-input-row>.x-input-input>input,.x-input-icon-left>.x-input-row>.x-input-input>.x-input-value-template-value{padding-left:calc(var(--x-font-size-medium) + .8rem)}.x-input-icon-left>.x-input-row>.x-input-input>x-icon{left:0}.x-input-icon-right>.x-input-row>.x-input-input>input,.x-input-icon-right>.x-input-row>.x-input-input>.x-input-value-template-value{padding-right:calc(var(--x-font-size-medium) + .8rem)}.x-input-icon-right>.x-input-row>.x-input-input>x-icon{right:0}.x-input-icon-right>.x-input-row>.x-input-input>.x-input-max-length{right:inherit;left:0}.x-input-bordered>.x-input-row>.x-input-input>input{border-width:var(--x-border-width)}.x-input-bordered .x-input-row .x-input-row-before:not(.x-input-row-before-template){border-width:var(--x-border-width);border-right-width:0}.x-input-bordered .x-input-row .x-input-row-after:not(.x-input-row-after-template){border-width:var(--x-border-width);border-left-width:0}.x-input-before>.x-input-row>.x-input-input>input{border-top-left-radius:0;border-bottom-left-radius:0}.x-input-before-template .x-input-input>input{margin-left:calc(var(--x-border-width) * -1)}.x-input-before-template .x-input-input>input:hover,.x-input-before-template .x-input-input>input:focus{z-index:1}.x-input-after>.x-input-row>.x-input-input>input{border-top-right-radius:0;border-bottom-right-radius:0}.x-input-after-template>.x-input-row>.x-input-input>input{margin-right:calc(var(--x-border-width) * -1)}.x-input-after-template>.x-input-row>.x-input-input>input:hover,.x-input-after-template>.x-input-row>.x-input-input>input:focus{z-index:1}.x-input-active .x-input-row>.x-input-input>input{border-color:var(--x-primary)}.x-input-pointer .x-input-row>.x-input-input>input,.x-input-pointer .x-input-row>.x-input-input>x-icon,.x-input-pointer .x-input-row>.x-input-input>.x-input-value-template-value{cursor:pointer}.x-input-big>.x-input-row>.x-input-input>input,.x-input-big>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-big>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-big);line-height:var(--x-height-big)}.x-input-big>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-big>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>label{height:var(--x-height-big);line-height:var(--x-height-big)}.x-input-large>.x-input-row>.x-input-input>input,.x-input-large>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-large>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-large);line-height:var(--x-height-large)}.x-input-large>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-large>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>label{height:var(--x-height-large);line-height:var(--x-height-large)}.x-input-medium>.x-input-row>.x-input-input>input,.x-input-medium>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-medium>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-input-medium>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-medium>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>label{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-input-small>.x-input-row>.x-input-input>input,.x-input-small>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-small>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-small);line-height:var(--x-height-small)}.x-input-small>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-small>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>label{height:var(--x-height-small);line-height:var(--x-height-small)}.x-input-mini>.x-input-row>.x-input-input>input,.x-input-mini>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-mini>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-input-mini>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-mini>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>label{height:var(--x-height-mini);line-height:var(--x-height-mini)}\n"] }]
|
|
395
|
+
args: [{ selector: `${XInputPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XInputComponent)], template: "<div\r\n #inputElement\r\n class=\"x-input\"\r\n [class.x-flex]=\"justify || align || direction\"\r\n [class.x-disabled]=\"disabled\"\r\n [class.x-required]=\"requiredIsEmpty\"\r\n [class.x-invalid]=\"invalid\"\r\n [class.x-clearable]=\"clearable\"\r\n [class.x-clear-show]=\"clearShow\"\r\n [class.x-input-icon]=\"getIcon\"\r\n [class.x-input-active]=\"active\"\r\n [class.x-input-pointer]=\"pointer\"\r\n [class.x-input-bordered]=\"bordered\"\r\n [class.x-input-icon-left]=\"getIconLayoutLeft\"\r\n [class.x-input-icon-right]=\"getIconLayoutRight\"\r\n [class.x-input-after]=\"after\"\r\n [class.x-input-before]=\"before\"\r\n [class.x-input-after-template]=\"afterIsTemplate\"\r\n [class.x-input-before-template]=\"beforeIsTemplate\"\r\n [class.x-input-value-template]=\"valueTpl\"\r\n [ngClass]=\"classMap\"\r\n>\r\n <label *ngIf=\"label\" [class.x-input-label-required]=\"required\" [style.width]=\"labelWidth\" [ngClass]=\"labelMap\">{{ label }}</label>\r\n <div class=\"x-input-row\">\r\n <div class=\"x-input-row-before\" *ngIf=\"before\" [class.x-input-row-before-template]=\"beforeIsTemplate\">\r\n <ng-container *xOutlet=\"before\">{{ before }}</ng-container>\r\n </div>\r\n <div class=\"x-input-input\" (mouseenter)=\"xMouseenter.emit($event)\" (mouseleave)=\"xMouseleave.emit($event)\">\r\n <div\r\n #inputValueRef\r\n class=\"x-input-value-template-value\"\r\n [style.left.rem]=\"paddingLeft\"\r\n [style.padding-left]=\"0\"\r\n [style.padding-right]=\"0\"\r\n [style.width]=\"getTemplateWidth\"\r\n (click)=\"xClick.emit($event)\"\r\n *ngIf=\"valueTpl\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"valueTpl; context: valueTplContext ? valueTplContext : { $value: value }\"></ng-container>\r\n </div>\r\n <input\r\n #inputRef\r\n [class.x-input-has-value-template]=\"valueTpl\"\r\n [ngStyle]=\"inputStyle\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n [maxlength]=\"maxlength\"\r\n [(ngModel)]=\"value\"\r\n (ngModelChange)=\"change($event)\"\r\n [style.padding-left.rem]=\"paddingLeft\"\r\n [style.padding-right.rem]=\"paddingRight\"\r\n (focus)=\"xFocus.emit($event)\"\r\n (blur)=\"xBlur.emit($event)\"\r\n (input)=\"formControlValidator(); xInput.emit($event)\"\r\n (keydown)=\"xKeydown.emit($event)\"\r\n (click)=\"xClick.emit($event)\"\r\n (compositionstart)=\"xComposition.next(true)\"\r\n (compositionend)=\"xComposition.next(false)\"\r\n />\r\n <x-icon *ngIf=\"clearShow && !iconSpin\" class=\"x-input-clear\" type=\"fto-x\" (click)=\"onClear()\"></x-icon>\r\n <x-icon\r\n *ngIf=\"icon && ((!clearShow && getIconLayoutRight) || getIconLayoutLeft || iconSpin)\"\r\n [type]=\"icon\"\r\n [spin]=\"iconSpin\"\r\n (click)=\"xClick.emit($event)\"\r\n ></x-icon>\r\n <span class=\"x-input-max-length\" *ngIf=\"maxlength\">{{ lengthTotal }}</span>\r\n <span class=\"x-input-error-message\" *ngIf=\"invalid\">{{ invalidMessage }}</span>\r\n <ng-container *ngIf=\"requiredIsEmpty || invalid\">\r\n <div class=\"x-border-error x-top-left\"></div>\r\n <div class=\"x-border-error x-top-right\"></div>\r\n <div class=\"x-border-error x-bottom-left\"></div>\r\n <div class=\"x-border-error x-bottom-right\"></div>\r\n </ng-container>\r\n </div>\r\n <div class=\"x-input-row-after\" *ngIf=\"after\" [class.x-input-row-after-template]=\"afterIsTemplate\">\r\n <ng-container *xOutlet=\"after\">{{ after }}</ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-input{display:inline-block;width:12rem}.x-input{width:100%;margin:0;padding:0}.x-input.x-flex{display:flex}.x-input.x-justify-start{justify-content:flex-start}.x-input.x-justify-center{justify-content:center}.x-input.x-justify-end{justify-content:flex-end}.x-input.x-justify-space-between{justify-content:space-between}.x-input.x-justify-space-around{justify-content:space-around}.x-input.x-align-start{align-items:flex-start}.x-input.x-align-center{align-items:center}.x-input.x-align-end{align-items:flex-end}.x-input.x-direction-column{flex-direction:column}.x-input.x-direction-column-reverse{flex-direction:column-reverse}.x-input.x-direction-row{flex-direction:row}.x-input.x-direction-row-reverse{flex-direction:row-reverse}.x-input>label{display:inline-block;white-space:nowrap;position:relative;color:var(--x-text-300);font-weight:600}.x-input>label.x-text-align-start{text-align:start}.x-input>label.x-text-align-center{text-align:center}.x-input>label.x-text-align-end{text-align:end}.x-input-row{flex:1;display:flex;align-items:center}.x-input-row .x-input-row-before:not(.x-input-row-before-template),.x-input-row .x-input-row-after:not(.x-input-row-after-template){border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);background-color:var(--x-background-a100);border-width:0}.x-input-row .x-input-row-before-template{display:contents}.x-input-row .x-input-row-before-template input,.x-input-row .x-input-row-before-template .x-button{border-top-right-radius:0;border-bottom-right-radius:0}.x-input-row .x-input-row-after-template{display:contents}.x-input-row .x-input-row-after-template input,.x-input-row .x-input-row-after-template .x-button{border-top-left-radius:0;border-bottom-left-radius:0}.x-input-row .x-input-row-before-template:hover,.x-input-row .x-input-row-before-template:focus{z-index:1}.x-input-row .x-input-row-before-template input:hover,.x-input-row .x-input-row-before-template input:focus,.x-input-row .x-input-row-before-template .x-button:hover,.x-input-row .x-input-row-before-template .x-button:focus,.x-input-row .x-input-row-after-template input:hover,.x-input-row .x-input-row-after-template input:focus,.x-input-row .x-input-row-after-template .x-button:hover,.x-input-row .x-input-row-after-template .x-button:focus{z-index:1}.x-input-row>.x-input-input{position:relative;width:100%;display:inline-flex;align-items:center}.x-input-row>.x-input-input>input{flex:1;width:100%;font-size:var(--x-font-size);background-color:var(--x-background);background-image:none;border:var(--x-border-width) var(--x-border-style) var(--x-border);border-radius:var(--x-border-radius);border-width:0;box-shadow:var(--x-box-shadow) transparent;transition-property:background-color,border-color;transition-duration:var(--x-animation-duration-slow)}.x-input-row>.x-input-input>input::-moz-placeholder{color:var(--x-text-700);opacity:1}.x-input-row>.x-input-input>input:-ms-input-placeholder{color:var(--x-text-700)}.x-input-row>.x-input-input>input::-webkit-input-placeholder{color:var(--x-text-700)}.x-input-row>.x-input-input>input[disabled]{color:var(--x-text-500)}.x-input-row>.x-input-input>input:focus{border-color:var(--x-primary);outline:0}.x-input-row>.x-input-input>x-icon{color:var(--x-text-400);transition:all var(--x-animation-duration-base);z-index:2}.x-input-row>.x-input-input:hover>input{border-color:var(--x-primary-300)}.x-input-row>.x-input-input:focus>input{border-color:var(--x-primary);outline:0}.x-input-label-required:before{display:inline-block;margin-right:.25rem;color:var(--x-danger);line-height:1;font-size:var(--x-font-size-small);content:\"*\"}.x-input-value-template .x-input-input>input.x-input-has-value-template{color:transparent!important}.x-input-value-template-value{position:absolute;display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.x-input-value-template-value:hover+input{border-color:var(--x-primary-300)}.x-input-error-message{position:absolute;bottom:0;left:0;font-size:var(--x-font-size)-.125rem;color:var(--x-danger);margin-bottom:calc((var(--x-font-size) + .45rem) * -1);width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.x-input.x-invalid>label,.x-input.x-required>label{color:var(--x-danger)}.x-input.x-invalid .x-input-input>x-icon,.x-input.x-required .x-input-input>x-icon{color:var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error,.x-input.x-required .x-input-input .x-border-error{position:absolute;height:.5rem;width:.5rem;z-index:10}.x-input.x-invalid .x-input-input .x-border-error.x-top-left,.x-input.x-required .x-input-input .x-border-error.x-top-left{border-top-left-radius:var(--x-border-radius);top:0;left:0;border-top:var(--x-border-width) solid var(--x-danger);border-left:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-top-right,.x-input.x-required .x-input-input .x-border-error.x-top-right{border-top-right-radius:var(--x-border-radius);top:0;right:0;border-top:var(--x-border-width) solid var(--x-danger);border-right:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-bottom-left,.x-input.x-required .x-input-input .x-border-error.x-bottom-left{border-bottom-left-radius:var(--x-border-radius);bottom:0;left:0;border-bottom:var(--x-border-width) solid var(--x-danger);border-left:var(--x-border-width) solid var(--x-danger)}.x-input.x-invalid .x-input-input .x-border-error.x-bottom-right,.x-input.x-required .x-input-input .x-border-error.x-bottom-right{border-bottom-right-radius:var(--x-border-radius);bottom:0;right:0;border-bottom:var(--x-border-width) solid var(--x-danger);border-right:var(--x-border-width) solid var(--x-danger)}.x-input.x-disabled>.x-input-row>.x-input-input>x-icon{color:var(--x-text-400);cursor:not-allowed}.x-input.x-disabled>.x-input-row>.x-input-input>input{color:var(--x-text-400);cursor:not-allowed;border-color:var(--x-border-100);background-color:var(--x-background-a100)}.x-input.x-disabled>.x-input-row>.x-input-input>.x-input-value-template-value{color:var(--x-text-400);cursor:not-allowed}.x-input.x-clearable>.x-input-row>.x-input-input>.x-input-clear{position:absolute;color:var(--x-text-400);font-size:var(--x-font-size-medium);padding:.4rem;right:0;left:inherit;opacity:0;cursor:pointer;z-index:2}.x-input.x-clearable>.x-input-row>.x-input-input>.x-input-clear:hover{color:var(--x-text-300)}.x-input.x-clearable>.x-input-row>.x-input-input:hover>input .x-input-clear,.x-input.x-clearable>.x-input-row>.x-input-input:hover>.x-input-value-template-value .x-input-clear{opacity:1}.x-input.x-clearable.x-clear-show>.x-input-row>.x-input-input>.x-input-clear{opacity:1}.x-input.x-clearable.x-clear-show>.x-input-row>.x-input-input>input{padding-right:calc(var(--x-font-size-medium) + .4rem * 2)!important}.x-input-max-length{position:absolute;font-size:var(--x-font-size-small);color:var(--x-text-400);padding:0 .4rem;right:0}.x-input.x-direction-row>label{padding:0 .5rem 0 0}.x-input.x-direction-row-reverse>label{padding:0 0 0 .5rem}.x-input.x-direction-column,.x-input.x-direction-column-reverse{align-items:inherit}.x-input-icon>.x-input-row>.x-input-input>x-icon{position:absolute;font-size:var(--x-font-size-medium);padding:.4rem}.x-input-icon>.x-input-row>.x-input-input>x-icon.x-icon-spin{padding:0;margin:.4rem}.x-input-icon-left>.x-input-row>.x-input-input>input,.x-input-icon-left>.x-input-row>.x-input-input>.x-input-value-template-value{padding-left:calc(var(--x-font-size-medium) + .8rem)}.x-input-icon-left>.x-input-row>.x-input-input>x-icon{left:0}.x-input-icon-right>.x-input-row>.x-input-input>input,.x-input-icon-right>.x-input-row>.x-input-input>.x-input-value-template-value{padding-right:calc(var(--x-font-size-medium) + .8rem)}.x-input-icon-right>.x-input-row>.x-input-input>x-icon{right:0}.x-input-icon-right>.x-input-row>.x-input-input>.x-input-max-length{right:inherit;left:0}.x-input-bordered>.x-input-row>.x-input-input>input{border-width:var(--x-border-width)}.x-input-bordered .x-input-row .x-input-row-before:not(.x-input-row-before-template){border-width:var(--x-border-width);border-right-width:0}.x-input-bordered .x-input-row .x-input-row-after:not(.x-input-row-after-template){border-width:var(--x-border-width);border-left-width:0}.x-input-before>.x-input-row>.x-input-input>input{border-top-left-radius:0;border-bottom-left-radius:0}.x-input-before-template .x-input-input>input{margin-left:calc(var(--x-border-width) * -1)}.x-input-before-template .x-input-input>input:hover,.x-input-before-template .x-input-input>input:focus{z-index:1}.x-input-after>.x-input-row>.x-input-input>input{border-top-right-radius:0;border-bottom-right-radius:0}.x-input-after-template>.x-input-row>.x-input-input>input{margin-right:calc(var(--x-border-width) * -1)}.x-input-after-template>.x-input-row>.x-input-input>input:hover,.x-input-after-template>.x-input-row>.x-input-input>input:focus{z-index:1}.x-input-active .x-input-row>.x-input-input>input{border-color:var(--x-primary)}.x-input-pointer .x-input-row>.x-input-input>input,.x-input-pointer .x-input-row>.x-input-input>x-icon,.x-input-pointer .x-input-row>.x-input-input>.x-input-value-template-value{cursor:pointer}.x-input-big>.x-input-row>.x-input-input>input,.x-input-big>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-big>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-big);line-height:var(--x-height-big)}.x-input-big>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-big>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-big);line-height:var(--x-height-big);padding:0 var(--x-padding-big)}.x-input-big>label{height:var(--x-height-big);line-height:var(--x-height-big)}.x-input-large>.x-input-row>.x-input-input>input,.x-input-large>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-large>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-large);line-height:var(--x-height-large)}.x-input-large>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-large>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-large);line-height:var(--x-height-large);padding:0 var(--x-padding-large)}.x-input-large>label{height:var(--x-height-large);line-height:var(--x-height-large)}.x-input-medium>.x-input-row>.x-input-input>input,.x-input-medium>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-medium>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-input-medium>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-medium>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-medium);line-height:var(--x-height-medium);padding:0 var(--x-padding-medium)}.x-input-medium>label{height:var(--x-height-medium);line-height:var(--x-height-medium)}.x-input-small>.x-input-row>.x-input-input>input,.x-input-small>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-small>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-small);line-height:var(--x-height-small)}.x-input-small>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-small>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-small);line-height:var(--x-height-small);padding:0 var(--x-padding-small)}.x-input-small>label{height:var(--x-height-small);line-height:var(--x-height-small)}.x-input-mini>.x-input-row>.x-input-input>input,.x-input-mini>.x-input-row>.x-input-input>.x-input-row-before:not(.x-input-row-before-template),.x-input-mini>.x-input-row>.x-input-input>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>.x-input-row>.x-input-input>.x-input-value-template-value{min-height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>.x-input-row>.x-input-input>.x-input-max-length{height:var(--x-height-mini);line-height:var(--x-height-mini)}.x-input-mini>.x-input-row>.x-input-row-before:not(.x-input-row-before-template),.x-input-mini>.x-input-row>.x-input-row-after:not(.x-input-row-after-template){height:var(--x-height-mini);line-height:var(--x-height-mini);padding:0 var(--x-padding-mini)}.x-input-mini>label{height:var(--x-height-mini);line-height:var(--x-height-mini)}\n"] }]
|
|
396
396
|
}], ctorParameters: function () {
|
|
397
397
|
return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.XConfigService }, { type: XInputGroupComponent, decorators: [{
|
|
398
398
|
type: Optional
|