@ng-nest/ui 12.0.11 → 12.1.0

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.
Files changed (90) hide show
  1. package/bundles/ng-nest-ui-alert.umd.js +1 -1
  2. package/bundles/ng-nest-ui-alert.umd.js.map +1 -1
  3. package/bundles/ng-nest-ui-core.umd.js.map +1 -1
  4. package/bundles/ng-nest-ui-dialog.umd.js +284 -32
  5. package/bundles/ng-nest-ui-dialog.umd.js.map +1 -1
  6. package/bundles/ng-nest-ui-drawer.umd.js +245 -14
  7. package/bundles/ng-nest-ui-drawer.umd.js.map +1 -1
  8. package/bundles/ng-nest-ui-input.umd.js +2 -1
  9. package/bundles/ng-nest-ui-input.umd.js.map +1 -1
  10. package/bundles/ng-nest-ui-message.umd.js +3 -3
  11. package/bundles/ng-nest-ui-message.umd.js.map +1 -1
  12. package/bundles/ng-nest-ui-portal.umd.js +8 -8
  13. package/bundles/ng-nest-ui-portal.umd.js.map +1 -1
  14. package/bundles/ng-nest-ui-progress.umd.js +235 -20
  15. package/bundles/ng-nest-ui-progress.umd.js.map +1 -1
  16. package/bundles/ng-nest-ui-select.umd.js +1 -1
  17. package/bundles/ng-nest-ui-steps.umd.js +19 -7
  18. package/bundles/ng-nest-ui-steps.umd.js.map +1 -1
  19. package/bundles/ng-nest-ui-table.umd.js.map +1 -1
  20. package/core/config/config.d.ts +4 -0
  21. package/dialog/dialog-container.component.d.ts +18 -0
  22. package/dialog/dialog-container.directives.d.ts +24 -0
  23. package/dialog/dialog-ref.d.ts +9 -0
  24. package/dialog/dialog.module.d.ts +13 -11
  25. package/dialog/dialog.property.d.ts +84 -6
  26. package/dialog/dialog.service.d.ts +19 -0
  27. package/dialog/public-api.d.ts +4 -0
  28. package/drawer/drawer-container.component.d.ts +18 -0
  29. package/drawer/drawer-container.directives.d.ts +19 -0
  30. package/drawer/drawer-ref.d.ts +9 -0
  31. package/drawer/drawer.module.d.ts +8 -6
  32. package/drawer/drawer.property.d.ts +83 -2
  33. package/drawer/drawer.service.d.ts +19 -0
  34. package/drawer/public-api.d.ts +5 -0
  35. package/esm2015/alert/alert.component.js +2 -2
  36. package/esm2015/core/config/config.js +1 -1
  37. package/esm2015/dialog/dialog-container.component.js +59 -0
  38. package/esm2015/dialog/dialog-container.directives.js +73 -0
  39. package/esm2015/dialog/dialog-ref.js +17 -0
  40. package/esm2015/dialog/dialog.component.js +2 -2
  41. package/esm2015/dialog/dialog.module.js +37 -7
  42. package/esm2015/dialog/dialog.property.js +17 -16
  43. package/esm2015/dialog/dialog.service.js +67 -0
  44. package/esm2015/dialog/public-api.js +5 -1
  45. package/esm2015/drawer/drawer-container.component.js +59 -0
  46. package/esm2015/drawer/drawer-container.directives.js +57 -0
  47. package/esm2015/drawer/drawer-ref.js +17 -0
  48. package/esm2015/drawer/drawer.component.js +2 -2
  49. package/esm2015/drawer/drawer.module.js +22 -6
  50. package/esm2015/drawer/drawer.property.js +22 -6
  51. package/esm2015/drawer/drawer.service.js +65 -0
  52. package/esm2015/drawer/public-api.js +6 -1
  53. package/esm2015/input/input.component.js +3 -2
  54. package/esm2015/message/message.property.js +2 -2
  55. package/esm2015/message/message.service.js +3 -3
  56. package/esm2015/portal/portal.module.js +4 -3
  57. package/esm2015/portal/portal.service.js +8 -9
  58. package/esm2015/progress/progress.component.js +177 -15
  59. package/esm2015/progress/progress.property.js +50 -3
  60. package/esm2015/select/select.component.js +1 -1
  61. package/esm2015/steps/steps.component.js +14 -7
  62. package/esm2015/steps/steps.property.js +8 -3
  63. package/esm2015/table/table.property.js +1 -1
  64. package/fesm2015/ng-nest-ui-alert.js +1 -1
  65. package/fesm2015/ng-nest-ui-alert.js.map +1 -1
  66. package/fesm2015/ng-nest-ui-core.js.map +1 -1
  67. package/fesm2015/ng-nest-ui-dialog.js +254 -25
  68. package/fesm2015/ng-nest-ui-dialog.js.map +1 -1
  69. package/fesm2015/ng-nest-ui-drawer.js +224 -13
  70. package/fesm2015/ng-nest-ui-drawer.js.map +1 -1
  71. package/fesm2015/ng-nest-ui-input.js +2 -1
  72. package/fesm2015/ng-nest-ui-input.js.map +1 -1
  73. package/fesm2015/ng-nest-ui-message.js +3 -3
  74. package/fesm2015/ng-nest-ui-message.js.map +1 -1
  75. package/fesm2015/ng-nest-ui-portal.js +10 -10
  76. package/fesm2015/ng-nest-ui-portal.js.map +1 -1
  77. package/fesm2015/ng-nest-ui-progress.js +225 -17
  78. package/fesm2015/ng-nest-ui-progress.js.map +1 -1
  79. package/fesm2015/ng-nest-ui-select.js +1 -1
  80. package/fesm2015/ng-nest-ui-steps.js +20 -8
  81. package/fesm2015/ng-nest-ui-steps.js.map +1 -1
  82. package/fesm2015/ng-nest-ui-table.js.map +1 -1
  83. package/message/message.property.d.ts +1 -1
  84. package/package.json +1 -1
  85. package/portal/portal.module.d.ts +1 -1
  86. package/portal/portal.service.d.ts +2 -3
  87. package/progress/progress.component.d.ts +31 -3
  88. package/progress/progress.property.d.ts +80 -5
  89. package/steps/steps.property.d.ts +7 -2
  90. package/table/table.property.d.ts +1 -1
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
2
+ import { InjectionToken, EventEmitter, Component, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, HostBinding, HostListener, Directive, Optional, TemplateRef, Injectable, NgModule } from '@angular/core';
3
3
  import { __decorate } from 'tslib';
4
4
  import * as i3 from '@ng-nest/ui/core';
5
- import { XProperty, XInputBoolean, XWithConfig, XIsChange, XIsEmpty, XSlideAnimation } from '@ng-nest/ui/core';
5
+ import { XProperty, XInputBoolean, XWithConfig, XIsChange, XIsEmpty, XSlideAnimation, fillDefault } from '@ng-nest/ui/core';
6
6
  import * as i1 from '@angular/cdk/overlay';
7
7
  import * as i2 from '@ng-nest/ui/portal';
8
8
  import { XPortalModule } from '@ng-nest/ui/portal';
@@ -12,6 +12,9 @@ import * as i5 from '@angular/common';
12
12
  import { CommonModule } from '@angular/common';
13
13
  import * as i6 from '@ng-nest/ui/outlet';
14
14
  import { XOutletModule } from '@ng-nest/ui/outlet';
15
+ import * as i1$1 from '@angular/cdk/portal';
16
+ import { BasePortalOutlet, CdkPortalOutlet, TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
17
+ import { filter, take } from 'rxjs/operators';
15
18
 
16
19
  /**
17
20
  * Drawer
@@ -19,7 +22,8 @@ import { XOutletModule } from '@ng-nest/ui/outlet';
19
22
  * @decorator component
20
23
  */
21
24
  const XDrawerPrefix = 'x-drawer';
22
- const X_CONFIG_NAME = 'drawer';
25
+ const X_DRAWER_CONFIG_NAME = 'drawer';
26
+ const X_DRAWER_DATA = new InjectionToken('XDrawerData');
23
27
  /**
24
28
  * Drawer Property
25
29
  */
@@ -39,16 +43,25 @@ class XDrawerProperty extends XProperty {
39
43
  }
40
44
  }
41
45
  /** @nocollapse */ XDrawerProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
42
- /** @nocollapse */ XDrawerProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XDrawerProperty, selector: "ng-component", inputs: { title: "title", visible: "visible", placement: "placement", size: "size" }, outputs: { close: "close", visibleChange: "visibleChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
46
+ /** @nocollapse */ XDrawerProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XDrawerProperty, selector: "ng-component", inputs: { title: "title", visible: "visible", placement: "placement", size: "size", backdropClose: "backdropClose", hasBackdrop: "hasBackdrop", className: "className" }, outputs: { close: "close", visibleChange: "visibleChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
43
47
  __decorate([
44
48
  XInputBoolean()
45
49
  ], XDrawerProperty.prototype, "visible", void 0);
46
50
  __decorate([
47
- XWithConfig(X_CONFIG_NAME, 'right')
51
+ XWithConfig(X_DRAWER_CONFIG_NAME, 'right')
48
52
  ], XDrawerProperty.prototype, "placement", void 0);
49
53
  __decorate([
50
- XWithConfig(X_CONFIG_NAME, '30%')
54
+ XWithConfig(X_DRAWER_CONFIG_NAME, '30%')
51
55
  ], XDrawerProperty.prototype, "size", void 0);
56
+ __decorate([
57
+ XWithConfig(X_DRAWER_CONFIG_NAME, true)
58
+ ], XDrawerProperty.prototype, "backdropClose", void 0);
59
+ __decorate([
60
+ XWithConfig(X_DRAWER_CONFIG_NAME, true)
61
+ ], XDrawerProperty.prototype, "hasBackdrop", void 0);
62
+ __decorate([
63
+ XWithConfig(X_DRAWER_CONFIG_NAME, '')
64
+ ], XDrawerProperty.prototype, "className", void 0);
52
65
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerProperty, decorators: [{
53
66
  type: Component,
54
67
  args: [{ template: '' }]
@@ -60,6 +73,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImpor
60
73
  type: Input
61
74
  }], size: [{
62
75
  type: Input
76
+ }], backdropClose: [{
77
+ type: Input
78
+ }], hasBackdrop: [{
79
+ type: Input
80
+ }], className: [{
81
+ type: Input
63
82
  }], close: [{
64
83
  type: Output
65
84
  }], visibleChange: [{
@@ -138,7 +157,7 @@ class XDrawerComponent extends XDrawerProperty {
138
157
  }
139
158
  }
140
159
  /** @nocollapse */ XDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Overlay }, { token: i2.XPortalService }, { token: i0.ViewContainerRef }, { token: i3.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
141
- /** @nocollapse */ XDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XDrawerComponent, selector: "x-drawer", viewQueries: [{ propertyName: "drawerTpl", first: true, predicate: ["drawerTpl"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-template #drawerTpl>\r\n <div class=\"x-drawer\" [ngClass]=\"classMap\" [@x-slide-animation]=\"placement\">\r\n <div class=\"x-drawer-header\" *ngIf=\"title\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title\">{{ title }}</ng-container>\r\n </div>\r\n <x-button class=\"x-drawer-close\" icon=\"fto-x\" (click)=\"closePortal()\" onlyIcon closable></x-button>\r\n </div>\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-drawer{margin:0;padding:0;height:100%;width:100%;background-color:var(--x-background);position:relative;box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color)}.x-drawer-header{padding:.5rem 1rem}.x-drawer-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-close{position:absolute;top:.425rem;right:.25rem}.x-drawer-title{padding:0}.x-drawer-content{padding:0 1rem .5rem;height:calc(100% - 2.5rem);overflow:auto}.x-drawer-no-title .x-drawer-content{padding:.5rem 1rem}\n"], components: [{ type: i4.XButtonComponent, selector: "x-button" }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], animations: [XSlideAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
160
+ /** @nocollapse */ XDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XDrawerComponent, selector: "x-drawer", viewQueries: [{ propertyName: "drawerTpl", first: true, predicate: ["drawerTpl"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-template #drawerTpl>\r\n <div class=\"x-drawer\" [ngClass]=\"classMap\" [@x-slide-animation]=\"placement\">\r\n <div class=\"x-drawer-header\" *ngIf=\"title\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title\">{{ title }}</ng-container>\r\n </div>\r\n <x-button class=\"x-drawer-close\" icon=\"fto-x\" (click)=\"closePortal()\" onlyIcon closable></x-button>\r\n </div>\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-drawer{margin:0;padding:0;height:100%;width:100%;background-color:var(--x-background);position:relative;box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color)}.x-drawer-header{padding:1rem 1rem .5rem}.x-drawer-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-close{position:absolute;top:.425rem;right:.425rem}.x-drawer-title{padding:0}.x-drawer-content{padding:0 1rem 1rem;height:calc(100% - 3rem);overflow:auto}.x-drawer-no-title .x-drawer-content{padding:.5rem 1rem}\n"], components: [{ type: i4.XButtonComponent, selector: "x-button" }], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], animations: [XSlideAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
142
161
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerComponent, decorators: [{
143
162
  type: Component,
144
163
  args: [{
@@ -154,17 +173,209 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImpor
154
173
  args: ['drawerTpl', { static: true }]
155
174
  }] } });
156
175
 
176
+ class XDrawerContainerComponent extends BasePortalOutlet {
177
+ constructor() {
178
+ super();
179
+ this._has = true;
180
+ this.animationChanged = new EventEmitter();
181
+ }
182
+ done({ toState, totalTime }) {
183
+ this.animationChanged.next({ action: 'done', state: toState, totalTime });
184
+ }
185
+ start({ toState, totalTime }) {
186
+ this.animationChanged.next({ action: 'start', state: toState, totalTime });
187
+ }
188
+ attachComponentPortal(portal) {
189
+ if (this.portalOutlet.hasAttached()) {
190
+ throw Error('drawer portal has attached');
191
+ }
192
+ return this.portalOutlet.attachComponentPortal(portal);
193
+ }
194
+ attachTemplatePortal(portal) {
195
+ if (this.portalOutlet.hasAttached()) {
196
+ throw Error('drawer portal has attached');
197
+ }
198
+ return this.portalOutlet.attachTemplatePortal(portal);
199
+ }
200
+ }
201
+ /** @nocollapse */ XDrawerContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
202
+ /** @nocollapse */ XDrawerContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XDrawerContainerComponent, selector: "x-drawer-container", host: { listeners: { "@x-slide-animation.done": "done($event)", "@x-slide-animation.start": "start($event)" }, properties: { "class.x-drawer-container": "this._has", "@x-slide-animation": "this.placement" } }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\r\n", styles: [".x-drawer-container{margin:0;height:100%;width:100%;background-color:var(--x-background);position:relative;box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);overflow:auto;padding:1rem}.x-drawer-container-title{display:block;margin:0 0 .5rem;font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-container-content{display:block;margin:0 -1rem;padding:0 1rem;overflow:auto}\n"], directives: [{ type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [XSlideAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
203
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerContainerComponent, decorators: [{
204
+ type: Component,
205
+ args: [{
206
+ selector: 'x-drawer-container',
207
+ templateUrl: './drawer-container.component.html',
208
+ styleUrls: ['./drawer-container.component.scss'],
209
+ encapsulation: ViewEncapsulation.None,
210
+ changeDetection: ChangeDetectionStrategy.OnPush,
211
+ animations: [XSlideAnimation]
212
+ }]
213
+ }], ctorParameters: function () { return []; }, propDecorators: { _has: [{
214
+ type: HostBinding,
215
+ args: ['class.x-drawer-container']
216
+ }], placement: [{
217
+ type: HostBinding,
218
+ args: ['@x-slide-animation']
219
+ }], done: [{
220
+ type: HostListener,
221
+ args: ['@x-slide-animation.done', ['$event']]
222
+ }], start: [{
223
+ type: HostListener,
224
+ args: ['@x-slide-animation.start', ['$event']]
225
+ }], portalOutlet: [{
226
+ type: ViewChild,
227
+ args: [CdkPortalOutlet, { static: true }]
228
+ }] } });
229
+
230
+ // TODO: add more function
231
+ class XDrawerRef {
232
+ constructor(overlayRef, containerInstance) {
233
+ this.overlayRef = overlayRef;
234
+ this.containerInstance = containerInstance;
235
+ }
236
+ close() {
237
+ this.containerInstance.animationChanged
238
+ .pipe(filter((event) => event.state === 'void' && event.action === 'done'), take(1))
239
+ .subscribe(() => {
240
+ this.overlayRef.detach();
241
+ });
242
+ this.containerInstance.placement = 'void';
243
+ }
244
+ }
245
+
246
+ class XDrawerCloseDirective {
247
+ constructor(drawerRef) {
248
+ this.drawerRef = drawerRef;
249
+ }
250
+ onCloseClick() {
251
+ this.drawerRef && this.drawerRef.close();
252
+ }
253
+ }
254
+ /** @nocollapse */ XDrawerCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerCloseDirective, deps: [{ token: XDrawerRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
255
+ /** @nocollapse */ XDrawerCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.5", type: XDrawerCloseDirective, selector: "[x-drawer-close]", host: { listeners: { "click": "onCloseClick($event)" } }, ngImport: i0 });
256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerCloseDirective, decorators: [{
257
+ type: Directive,
258
+ args: [{
259
+ selector: `[x-drawer-close]`
260
+ }]
261
+ }], ctorParameters: function () { return [{ type: XDrawerRef, decorators: [{
262
+ type: Optional
263
+ }] }]; }, propDecorators: { onCloseClick: [{
264
+ type: HostListener,
265
+ args: ['click', ['$event']]
266
+ }] } });
267
+ class XDrawerTitleDirective {
268
+ constructor() {
269
+ this._has = true;
270
+ }
271
+ }
272
+ /** @nocollapse */ XDrawerTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
273
+ /** @nocollapse */ XDrawerTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.5", type: XDrawerTitleDirective, selector: "[x-drawer-title]", host: { properties: { "class.x-drawer-container-title": "this._has" } }, ngImport: i0 });
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerTitleDirective, decorators: [{
275
+ type: Directive,
276
+ args: [{
277
+ selector: `[x-drawer-title]`
278
+ }]
279
+ }], propDecorators: { _has: [{
280
+ type: HostBinding,
281
+ args: ['class.x-drawer-container-title']
282
+ }] } });
283
+ class XDrawerContentDirective {
284
+ constructor() {
285
+ this._has = true;
286
+ }
287
+ }
288
+ /** @nocollapse */ XDrawerContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
289
+ /** @nocollapse */ XDrawerContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.5", type: XDrawerContentDirective, selector: "[x-drawer-content], x-drawer-content", host: { properties: { "class.x-drawer-container-content": "this._has" } }, ngImport: i0 });
290
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerContentDirective, decorators: [{
291
+ type: Directive,
292
+ args: [{
293
+ selector: `[x-drawer-content], x-drawer-content`
294
+ }]
295
+ }], propDecorators: { _has: [{
296
+ type: HostBinding,
297
+ args: ['class.x-drawer-container-content']
298
+ }] } });
299
+
300
+ class XDrawerService {
301
+ constructor(portalService, configService, overlay) {
302
+ this.portalService = portalService;
303
+ this.configService = configService;
304
+ this.overlay = overlay;
305
+ this.default = {
306
+ placement: 'right',
307
+ size: '30%',
308
+ hasBackdrop: true,
309
+ backdropClose: true
310
+ };
311
+ this.configDefault = this.configService.getConfigForComponent(X_DRAWER_CONFIG_NAME);
312
+ Object.assign(this.default, this.configDefault);
313
+ }
314
+ create(content, option = {}) {
315
+ fillDefault(option, this.default);
316
+ const width = ['left', 'right'].includes(option.placement) ? option.size : '100%';
317
+ const height = ['top', 'bottom'].includes(option.placement) ? option.size : '100%';
318
+ const portal = this.portalService.attach({
319
+ content: XDrawerContainerComponent,
320
+ viewContainerRef: option.viewContainerRef,
321
+ overlayConfig: {
322
+ hasBackdrop: option.hasBackdrop,
323
+ panelClass: option.className,
324
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
325
+ positionStrategy: this.portalService.setPosition(option.placement, width, height)
326
+ }
327
+ });
328
+ const { overlayRef, componentRef } = portal || {};
329
+ const { instance } = componentRef || {};
330
+ instance.placement = option.placement;
331
+ const drawerRef = new XDrawerRef(overlayRef, instance);
332
+ if (content instanceof TemplateRef) {
333
+ instance.attachTemplatePortal(new TemplatePortal(content, option.viewContainerRef, { $implicit: option.data, drawerRef: drawerRef }));
334
+ }
335
+ else {
336
+ const injector = this.portalService.createInjector([
337
+ { provide: X_DRAWER_DATA, useValue: option.data },
338
+ { provide: XDrawerRef, useValue: drawerRef }
339
+ ]);
340
+ instance.attachComponentPortal(new ComponentPortal(content, option.viewContainerRef, injector));
341
+ }
342
+ if (option.hasBackdrop && option.backdropClose && overlayRef)
343
+ overlayRef.backdropClick().subscribe(() => {
344
+ drawerRef.close();
345
+ });
346
+ return drawerRef;
347
+ }
348
+ }
349
+ /** @nocollapse */ XDrawerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerService, deps: [{ token: i2.XPortalService }, { token: i3.XConfigService }, { token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
350
+ /** @nocollapse */ XDrawerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerService });
351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerService, decorators: [{
352
+ type: Injectable
353
+ }], ctorParameters: function () { return [{ type: i2.XPortalService }, { type: i3.XConfigService }, { type: i1.Overlay }]; } });
354
+
157
355
  class XDrawerModule {
158
356
  }
159
357
  /** @nocollapse */ XDrawerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
160
- /** @nocollapse */ XDrawerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerModule, declarations: [XDrawerComponent, XDrawerProperty], imports: [CommonModule, XOutletModule, XButtonModule, XPortalModule], exports: [XDrawerComponent] });
161
- /** @nocollapse */ XDrawerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerModule, imports: [[CommonModule, XOutletModule, XButtonModule, XPortalModule]] });
358
+ /** @nocollapse */ XDrawerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerModule, declarations: [XDrawerComponent,
359
+ XDrawerCloseDirective,
360
+ XDrawerTitleDirective,
361
+ XDrawerContentDirective,
362
+ XDrawerContainerComponent,
363
+ XDrawerProperty], imports: [CommonModule, XOutletModule, XButtonModule, XPortalModule], exports: [XDrawerComponent, XDrawerCloseDirective, XDrawerTitleDirective, XDrawerContentDirective, XDrawerContainerComponent] });
364
+ /** @nocollapse */ XDrawerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerModule, providers: [XDrawerService], imports: [[CommonModule, XOutletModule, XButtonModule, XPortalModule]] });
162
365
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XDrawerModule, decorators: [{
163
366
  type: NgModule,
164
367
  args: [{
165
- declarations: [XDrawerComponent, XDrawerProperty],
166
- exports: [XDrawerComponent],
167
- imports: [CommonModule, XOutletModule, XButtonModule, XPortalModule]
368
+ declarations: [
369
+ XDrawerComponent,
370
+ XDrawerCloseDirective,
371
+ XDrawerTitleDirective,
372
+ XDrawerContentDirective,
373
+ XDrawerContainerComponent,
374
+ XDrawerProperty
375
+ ],
376
+ exports: [XDrawerComponent, XDrawerCloseDirective, XDrawerTitleDirective, XDrawerContentDirective, XDrawerContainerComponent],
377
+ imports: [CommonModule, XOutletModule, XButtonModule, XPortalModule],
378
+ providers: [XDrawerService]
168
379
  }]
169
380
  }] });
170
381
 
@@ -172,5 +383,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImpor
172
383
  * Generated bundle index. Do not edit.
173
384
  */
174
385
 
175
- export { XDrawerComponent, XDrawerModule, XDrawerPrefix, XDrawerProperty };
386
+ export { XDrawerCloseDirective, XDrawerComponent, XDrawerContainerComponent, XDrawerContentDirective, XDrawerModule, XDrawerPrefix, XDrawerProperty, XDrawerRef, XDrawerService, XDrawerTitleDirective, X_DRAWER_CONFIG_NAME, X_DRAWER_DATA };
176
387
  //# sourceMappingURL=ng-nest-ui-drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-drawer.js","sources":["../../../../lib/ng-nest/ui/drawer/drawer.property.ts","../../../../lib/ng-nest/ui/drawer/drawer.component.ts","../../../../lib/ng-nest/ui/drawer/drawer.component.html","../../../../lib/ng-nest/ui/drawer/drawer.module.ts","../../../../lib/ng-nest/ui/drawer/ng-nest-ui-drawer.ts"],"sourcesContent":["import { XTemplate, XPosition, XProperty, XInputBoolean, XBoolean, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Output, EventEmitter, Component } from '@angular/core';\r\n\r\n/**\r\n * Drawer\r\n * @selector x-drawer\r\n * @decorator component\r\n */\r\nexport const XDrawerPrefix = 'x-drawer';\r\nconst X_CONFIG_NAME = 'drawer';\r\n\r\n/**\r\n * Drawer Property\r\n */\r\n@Component({ template: '' })\r\nexport class XDrawerProperty extends XProperty {\r\n /**\r\n * @zh_CN 标题\r\n * @en_US Title\r\n */\r\n @Input() title?: XTemplate;\r\n /**\r\n * @zh_CN 显示/隐藏\r\n * @en_US Show/hide\r\n */\r\n @Input() @XInputBoolean() visible?: XBoolean;\r\n /**\r\n * @zh_CN 展示方向\r\n * @en_US Display direction\r\n */\r\n @Input() @XWithConfig<XPosition>(X_CONFIG_NAME, 'right') placement?: XPosition;\r\n /**\r\n * @zh_CN 尺寸,支持固定值\r\n * @en_US Size, supports fixed value\r\n */\r\n @Input() @XWithConfig<string>(X_CONFIG_NAME, '30%') size?: string;\r\n /**\r\n * @zh_CN 关闭的事件\r\n * @en_US Closed event\r\n */\r\n @Output() close = new EventEmitter();\r\n /**\r\n * @zh_CN 显示/隐藏的事件\r\n * @en_US Show/hide event\r\n */\r\n @Output() visibleChange = new EventEmitter<boolean>();\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n ViewChild,\r\n SimpleChanges,\r\n OnChanges,\r\n TemplateRef,\r\n ViewContainerRef\r\n} from '@angular/core';\r\nimport { XDrawerPrefix, XDrawerProperty } from './drawer.property';\r\nimport { XIsChange, XIsEmpty, XSlideAnimation, XConfigService } from '@ng-nest/ui/core';\r\nimport { XPortalService, XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { Subscription } from 'rxjs';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\n\r\n@Component({\r\n selector: `${XDrawerPrefix}`,\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XSlideAnimation]\r\n})\r\nexport class XDrawerComponent extends XDrawerProperty implements OnInit, OnChanges {\r\n @ViewChild('drawerTpl', { static: true }) drawerTpl!: TemplateRef<void>;\r\n portal!: XPortalOverlayRef<any>;\r\n back$: Subscription | null = null;\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public overlay: Overlay,\r\n public portalService: XPortalService,\r\n public viewContainerRef: ViewContainerRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setClassMap();\r\n }\r\n\r\n ngOnChanges(simples: SimpleChanges) {\r\n const { visible } = simples;\r\n XIsChange(visible) && this.setVisible();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unsubscribe();\r\n }\r\n\r\n unsubscribe() {\r\n this.back$?.unsubscribe();\r\n }\r\n\r\n setClassMap() {\r\n this.classMap = {\r\n [`${XDrawerPrefix}-${this.placement}`]: !XIsEmpty(this.placement),\r\n [`${XDrawerPrefix}-no-title`]: XIsEmpty(this.title)\r\n };\r\n }\r\n\r\n setVisible() {\r\n if (this.visible) {\r\n this.createPortal();\r\n } else {\r\n this.closePortal();\r\n }\r\n }\r\n\r\n createPortal() {\r\n const width = this.placement === 'left' || this.placement === 'right' ? this.size : '100%';\r\n const height = this.placement === 'top' || this.placement === 'bottom' ? this.size : '100%';\r\n this.portal = this.portalService.attach({\r\n content: this.drawerTpl,\r\n viewContainerRef: this.viewContainerRef,\r\n overlayConfig: {\r\n hasBackdrop: true,\r\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\r\n positionStrategy: this.portalService.setPosition(this.placement, width, height)\r\n }\r\n });\r\n if (this.portal.overlayRef) this.back$ = this.portal.overlayRef.backdropClick().subscribe(() => this.closePortal());\r\n }\r\n\r\n portalAttached() {\r\n return this.portal?.overlayRef?.hasAttached();\r\n }\r\n\r\n closePortal() {\r\n if (this.portalAttached()) {\r\n this.portal?.overlayRef?.detach();\r\n this.unsubscribe();\r\n this.visibleChange.emit(this.visible as boolean);\r\n this.close.emit();\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n","<ng-template #drawerTpl>\r\n <div class=\"x-drawer\" [ngClass]=\"classMap\" [@x-slide-animation]=\"placement\">\r\n <div class=\"x-drawer-header\" *ngIf=\"title\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title\">{{ title }}</ng-container>\r\n </div>\r\n <x-button class=\"x-drawer-close\" icon=\"fto-x\" (click)=\"closePortal()\" onlyIcon closable></x-button>\r\n </div>\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XDrawerComponent } from './drawer.component';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\nimport { XDrawerProperty } from './drawer.property';\r\n\r\n@NgModule({\r\n declarations: [XDrawerComponent, XDrawerProperty],\r\n exports: [XDrawerComponent],\r\n imports: [CommonModule, XOutletModule, XButtonModule, XPortalModule]\r\n})\r\nexport class XDrawerModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA;;;;;MAKa,aAAa,GAAG,WAAW;AACxC,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B;;;MAIa,eAAgB,SAAQ,SAAS;IAD9C;;;;;;QA0BY,UAAK,GAAG,IAAI,YAAY,EAAE,CAAC;;;;;QAK3B,kBAAa,GAAG,IAAI,YAAY,EAAW,CAAC;KACvD;;+HA/BY,eAAe;mHAAf,eAAe,8NADL,EAAE;AAWG;IAAhB,aAAa,EAAE;gDAAoB;AAKY;IAA/C,WAAW,CAAY,aAAa,EAAE,OAAO,CAAC;kDAAuB;AAK3B;IAA1C,WAAW,CAAS,aAAa,EAAE,KAAK,CAAC;6CAAe;2FApBvD,eAAe;kBAD3B,SAAS;mBAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;8BAMhB,KAAK;sBAAb,KAAK;gBAKoB,OAAO;sBAAhC,KAAK;gBAKmD,SAAS;sBAAjE,KAAK;gBAK8C,IAAI;sBAAvD,KAAK;gBAKI,KAAK;sBAAd,MAAM;gBAKG,aAAa;sBAAtB,MAAM;;;MCjBI,gBAAiB,SAAQ,eAAe;IAKnD,YACS,QAAmB,EACnB,UAAsB,EACtB,GAAsB,EACtB,OAAgB,EAChB,aAA6B,EAC7B,gBAAkC,EAClC,aAA6B;QAEpC,KAAK,EAAE,CAAC;QARD,aAAQ,GAAR,QAAQ,CAAW;QACnB,eAAU,GAAV,UAAU,CAAY;QACtB,QAAG,GAAH,GAAG,CAAmB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C/C,UAAU,EAAE,CAAC,eAAe,CAAC;iBAC9B;wQAE2C,SAAS;sBAAlD,SAAS;uBAAC,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MEhB7B,aAAa;;6HAAb,aAAa;8HAAb,aAAa,iBAJT,gBAAgB,EAAE,eAAe,aAEtC,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,aADzD,gBAAgB;8HAGf,aAAa,YAFf,CAAC,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,CAAC;2FAEzD,aAAa;kBALzB,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC;oBACjD,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,CAAC;iBACrE;;;ACZD;;;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-drawer.js","sources":["../../../../lib/ng-nest/ui/drawer/drawer.property.ts","../../../../lib/ng-nest/ui/drawer/drawer.component.ts","../../../../lib/ng-nest/ui/drawer/drawer.component.html","../../../../lib/ng-nest/ui/drawer/drawer-container.component.ts","../../../../lib/ng-nest/ui/drawer/drawer-container.component.html","../../../../lib/ng-nest/ui/drawer/drawer-ref.ts","../../../../lib/ng-nest/ui/drawer/drawer-container.directives.ts","../../../../lib/ng-nest/ui/drawer/drawer.service.ts","../../../../lib/ng-nest/ui/drawer/drawer.module.ts","../../../../lib/ng-nest/ui/drawer/ng-nest-ui-drawer.ts"],"sourcesContent":["import { XTemplate, XPosition, XProperty, XInputBoolean, XBoolean, XWithConfig } from '@ng-nest/ui/core';\r\nimport { Input, Output, EventEmitter, Component, InjectionToken, ViewContainerRef } from '@angular/core';\r\nimport { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { XDrawerContainerComponent } from './drawer-container.component';\r\nimport { XDrawerRef } from './drawer-ref';\r\n\r\n/**\r\n * Drawer\r\n * @selector x-drawer\r\n * @decorator component\r\n */\r\nexport const XDrawerPrefix = 'x-drawer';\r\nexport const X_DRAWER_CONFIG_NAME = 'drawer';\r\nexport const X_DRAWER_DATA = new InjectionToken<any>('XDrawerData');\r\n\r\n/**\r\n * Drawer Property\r\n */\r\n@Component({ template: '' })\r\nexport class XDrawerProperty extends XProperty {\r\n /**\r\n * @zh_CN 标题\r\n * @en_US Title\r\n */\r\n @Input() title?: XTemplate;\r\n /**\r\n * @zh_CN 显示/隐藏\r\n * @en_US Show/hide\r\n */\r\n @Input() @XInputBoolean() visible?: XBoolean;\r\n /**\r\n * @zh_CN 展示方向\r\n * @en_US Display direction\r\n */\r\n @Input() @XWithConfig<XPosition>(X_DRAWER_CONFIG_NAME, 'right') placement?: XPosition;\r\n /**\r\n * @zh_CN 尺寸,支持固定值\r\n * @en_US Size, supports fixed value\r\n */\r\n @Input() @XWithConfig<string>(X_DRAWER_CONFIG_NAME, '30%') size?: string;\r\n /**\r\n * @zh_CN 点击遮罩关闭\r\n * @en_US Click the mask to close\r\n */\r\n @Input() @XWithConfig<XBoolean>(X_DRAWER_CONFIG_NAME, true) backdropClose!: XBoolean;\r\n /**\r\n * @zh_CN 是否显示背景遮罩\r\n * @en_US Whether to display the background mask\r\n */\r\n @Input() @XWithConfig<XBoolean>(X_DRAWER_CONFIG_NAME, true) hasBackdrop!: XBoolean;\r\n /**\r\n * @zh_CN 自定义样式名\r\n * @en_US Custom style name\r\n */\r\n @Input() @XWithConfig<string>(X_DRAWER_CONFIG_NAME, '') className!: string;\r\n /**\r\n * @zh_CN 关闭的事件\r\n * @en_US Closed event\r\n */\r\n @Output() close = new EventEmitter();\r\n /**\r\n * @zh_CN 显示/隐藏的事件\r\n * @en_US Show/hide event\r\n */\r\n @Output() visibleChange = new EventEmitter<boolean>();\r\n}\r\n\r\n/**\r\n * Drawer Option\r\n */\r\nexport interface XDrawerOption {\r\n /**\r\n * @zh_CN 展示方向\r\n * @en_US Display direction\r\n * @default 'right'\r\n * @withConfig true\r\n */\r\n placement?: XPosition;\r\n /**\r\n * @zh_CN 尺寸,支持固定值\r\n * @en_US Size, supports fixed value\r\n * @default '30%'\r\n * @withConfig true\r\n */\r\n size?: string;\r\n /**\r\n * @zh_CN 自定义样式名\r\n * @en_US Custom style name\r\n */\r\n className?: string;\r\n /**\r\n * @zh_CN 点击遮罩关闭\r\n * @en_US Click the mask to close\r\n * @default true\r\n * @withConfig true\r\n */\r\n backdropClose?: boolean;\r\n /**\r\n * @zh_CN 是否显示背景遮罩\r\n * @en_US Whether to display the background mask\r\n * @default true\r\n * @withConfig true\r\n */\r\n hasBackdrop?: boolean;\r\n /**\r\n * @zh_CN 数据,通过 \"@Inject(X_DRAWER_DATA)\" 来接收数据\r\n * @en_US Data. Receive data by \"@Inject(X_DRAWER_DATA)\"\r\n */\r\n data?: any;\r\n /**\r\n * @en_US 视图容器实例可以包含其他视图容器。\r\n * @en_US A view container instance can contain other view containers.\r\n */\r\n viewContainerRef?: ViewContainerRef;\r\n}\r\n\r\n/**\r\n * @zh_CN 创建的抽屉对象\r\n * @en_US Drawer object created\r\n */\r\nexport interface XDrawerOverlayRef extends XPortalOverlayRef<XDrawerContainerComponent> {\r\n drawerRef?: XDrawerRef<any>;\r\n}\r\n\r\nexport type XDrawerAnimationState = XPosition | 'void';\r\n\r\nexport interface XDrawerAnimationEvent {\r\n state: XDrawerAnimationState;\r\n action: 'start' | 'done';\r\n totalTime: number;\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n ViewChild,\r\n SimpleChanges,\r\n OnChanges,\r\n TemplateRef,\r\n ViewContainerRef\r\n} from '@angular/core';\r\nimport { XDrawerPrefix, XDrawerProperty } from './drawer.property';\r\nimport { XIsChange, XIsEmpty, XSlideAnimation, XConfigService } from '@ng-nest/ui/core';\r\nimport { XPortalService, XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { Subscription } from 'rxjs';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\n\r\n@Component({\r\n selector: `${XDrawerPrefix}`,\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XSlideAnimation]\r\n})\r\nexport class XDrawerComponent extends XDrawerProperty implements OnInit, OnChanges {\r\n @ViewChild('drawerTpl', { static: true }) drawerTpl!: TemplateRef<void>;\r\n portal!: XPortalOverlayRef<any>;\r\n back$: Subscription | null = null;\r\n\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef,\r\n public cdr: ChangeDetectorRef,\r\n public overlay: Overlay,\r\n public portalService: XPortalService,\r\n public viewContainerRef: ViewContainerRef,\r\n public configService: XConfigService\r\n ) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setClassMap();\r\n }\r\n\r\n ngOnChanges(simples: SimpleChanges) {\r\n const { visible } = simples;\r\n XIsChange(visible) && this.setVisible();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unsubscribe();\r\n }\r\n\r\n unsubscribe() {\r\n this.back$?.unsubscribe();\r\n }\r\n\r\n setClassMap() {\r\n this.classMap = {\r\n [`${XDrawerPrefix}-${this.placement}`]: !XIsEmpty(this.placement),\r\n [`${XDrawerPrefix}-no-title`]: XIsEmpty(this.title)\r\n };\r\n }\r\n\r\n setVisible() {\r\n if (this.visible) {\r\n this.createPortal();\r\n } else {\r\n this.closePortal();\r\n }\r\n }\r\n\r\n createPortal() {\r\n const width = this.placement === 'left' || this.placement === 'right' ? this.size : '100%';\r\n const height = this.placement === 'top' || this.placement === 'bottom' ? this.size : '100%';\r\n this.portal = this.portalService.attach({\r\n content: this.drawerTpl,\r\n viewContainerRef: this.viewContainerRef,\r\n overlayConfig: {\r\n hasBackdrop: true,\r\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\r\n positionStrategy: this.portalService.setPosition(this.placement, width, height)\r\n }\r\n });\r\n if (this.portal.overlayRef) this.back$ = this.portal.overlayRef.backdropClick().subscribe(() => this.closePortal());\r\n }\r\n\r\n portalAttached() {\r\n return this.portal?.overlayRef?.hasAttached();\r\n }\r\n\r\n closePortal() {\r\n if (this.portalAttached()) {\r\n this.portal?.overlayRef?.detach();\r\n this.unsubscribe();\r\n this.visibleChange.emit(this.visible as boolean);\r\n this.close.emit();\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n","<ng-template #drawerTpl>\r\n <div class=\"x-drawer\" [ngClass]=\"classMap\" [@x-slide-animation]=\"placement\">\r\n <div class=\"x-drawer-header\" *ngIf=\"title\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title\">{{ title }}</ng-container>\r\n </div>\r\n <x-button class=\"x-drawer-close\" icon=\"fto-x\" (click)=\"closePortal()\" onlyIcon closable></x-button>\r\n </div>\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n","import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ComponentRef,\r\n EmbeddedViewRef,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\nimport { XSlideAnimation } from '@ng-nest/ui/core';\r\nimport { XDrawerAnimationEvent, XDrawerAnimationState } from './drawer.property';\r\nimport { AnimationEvent } from '@angular/animations';\r\n\r\n@Component({\r\n selector: 'x-drawer-container',\r\n templateUrl: './drawer-container.component.html',\r\n styleUrls: ['./drawer-container.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XSlideAnimation]\r\n})\r\nexport class XDrawerContainerComponent extends BasePortalOutlet {\r\n @HostBinding('class.x-drawer-container') _has = true;\r\n @HostBinding('@x-slide-animation') public placement?: XDrawerAnimationState;\r\n @HostListener('@x-slide-animation.done', ['$event']) done({ toState, totalTime }: AnimationEvent) {\r\n this.animationChanged.next({ action: 'done', state: toState as XDrawerAnimationState, totalTime });\r\n }\r\n @HostListener('@x-slide-animation.start', ['$event']) start({ toState, totalTime }: AnimationEvent) {\r\n this.animationChanged.next({ action: 'start', state: toState as XDrawerAnimationState, totalTime });\r\n }\r\n @ViewChild(CdkPortalOutlet, { static: true }) portalOutlet!: CdkPortalOutlet;\r\n\r\n animationChanged = new EventEmitter<XDrawerAnimationEvent>();\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\r\n if (this.portalOutlet.hasAttached()) {\r\n throw Error('drawer portal has attached');\r\n }\r\n return this.portalOutlet.attachComponentPortal(portal);\r\n }\r\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\r\n if (this.portalOutlet.hasAttached()) {\r\n throw Error('drawer portal has attached');\r\n }\r\n return this.portalOutlet.attachTemplatePortal(portal);\r\n }\r\n}\r\n","<ng-template cdkPortalOutlet></ng-template>\r\n","import { OverlayRef } from '@angular/cdk/overlay';\r\nimport { filter, take } from 'rxjs/operators';\r\nimport { XDrawerContainerComponent } from './drawer-container.component';\r\n\r\n// TODO: add more function\r\nexport class XDrawerRef<C> {\r\n componentInstance!: C;\r\n constructor(public overlayRef: OverlayRef, public containerInstance: XDrawerContainerComponent) {}\r\n close() {\r\n this.containerInstance.animationChanged\r\n .pipe(\r\n filter((event) => event.state === 'void' && event.action === 'done'),\r\n take(1)\r\n )\r\n .subscribe(() => {\r\n this.overlayRef.detach();\r\n });\r\n this.containerInstance.placement = 'void';\r\n }\r\n}\r\n","import { Directive, HostBinding, HostListener, Optional } from '@angular/core';\r\nimport { XDrawerRef } from './drawer-ref';\r\n\r\n@Directive({\r\n selector: `[x-drawer-close]`\r\n})\r\nexport class XDrawerCloseDirective {\r\n @HostListener('click', ['$event']) onCloseClick() {\r\n this.drawerRef && this.drawerRef.close();\r\n }\r\n constructor(@Optional() public drawerRef: XDrawerRef<any>) {}\r\n}\r\n\r\n@Directive({\r\n selector: `[x-drawer-title]`\r\n})\r\nexport class XDrawerTitleDirective {\r\n @HostBinding('class.x-drawer-container-title') _has = true;\r\n}\r\n\r\n@Directive({\r\n selector: `[x-drawer-content], x-drawer-content`\r\n})\r\nexport class XDrawerContentDirective {\r\n @HostBinding('class.x-drawer-container-content') _has = true;\r\n}\r\n","import { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal, ComponentType, TemplatePortal } from '@angular/cdk/portal';\r\nimport { Injectable, TemplateRef } from '@angular/core';\r\nimport { fillDefault, XConfigService, XDrawerConfig } from '@ng-nest/ui/core';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\nimport { XDrawerContainerComponent } from './drawer-container.component';\r\nimport { XDrawerRef } from './drawer-ref';\r\nimport { XDrawerOption, X_DRAWER_CONFIG_NAME, X_DRAWER_DATA } from './drawer.property';\r\n\r\n@Injectable()\r\nexport class XDrawerService {\r\n default: XDrawerOption = {\r\n placement: 'right',\r\n size: '30%',\r\n hasBackdrop: true,\r\n backdropClose: true\r\n };\r\n configDefault?: XDrawerConfig;\r\n\r\n constructor(public portalService: XPortalService, public configService: XConfigService, public overlay: Overlay) {\r\n this.configDefault = this.configService.getConfigForComponent(X_DRAWER_CONFIG_NAME);\r\n Object.assign(this.default, this.configDefault);\r\n }\r\n\r\n create<T>(content: TemplateRef<any> | ComponentType<T>, option: XDrawerOption = {}): XDrawerRef<T> {\r\n fillDefault(option, this.default);\r\n const width = ['left', 'right'].includes(option.placement as string) ? option.size : '100%';\r\n const height = ['top', 'bottom'].includes(option.placement as string) ? option.size : '100%';\r\n const portal = this.portalService.attach<XDrawerContainerComponent>({\r\n content: XDrawerContainerComponent,\r\n viewContainerRef: option.viewContainerRef,\r\n overlayConfig: {\r\n hasBackdrop: option.hasBackdrop,\r\n panelClass: option.className,\r\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\r\n positionStrategy: this.portalService.setPosition(option.placement, width, height)\r\n }\r\n });\r\n const { overlayRef, componentRef } = portal || {};\r\n const { instance } = componentRef! || {};\r\n instance.placement = option.placement;\r\n const drawerRef = new XDrawerRef<T>(overlayRef!, instance);\r\n if (content instanceof TemplateRef) {\r\n instance.attachTemplatePortal(\r\n new TemplatePortal(content, option.viewContainerRef!, { $implicit: option.data, drawerRef: drawerRef })\r\n );\r\n } else {\r\n const injector = this.portalService.createInjector([\r\n { provide: X_DRAWER_DATA, useValue: option.data },\r\n { provide: XDrawerRef, useValue: drawerRef }\r\n ]);\r\n\r\n instance.attachComponentPortal(new ComponentPortal(content, option.viewContainerRef, injector));\r\n }\r\n if (option.hasBackdrop && option.backdropClose && overlayRef)\r\n overlayRef.backdropClick().subscribe(() => {\r\n drawerRef.close();\r\n });\r\n\r\n return drawerRef;\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { XDrawerComponent } from './drawer.component';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XButtonModule } from '@ng-nest/ui/button';\r\nimport { XPortalModule } from '@ng-nest/ui/portal';\r\nimport { XDrawerProperty } from './drawer.property';\r\nimport { XDrawerService } from './drawer.service';\r\nimport { XDrawerContainerComponent } from './drawer-container.component';\r\nimport { XDrawerCloseDirective, XDrawerContentDirective, XDrawerTitleDirective } from './drawer-container.directives';\r\n\r\n@NgModule({\r\n declarations: [\r\n XDrawerComponent,\r\n XDrawerCloseDirective,\r\n XDrawerTitleDirective,\r\n XDrawerContentDirective,\r\n XDrawerContainerComponent,\r\n XDrawerProperty\r\n ],\r\n exports: [XDrawerComponent, XDrawerCloseDirective, XDrawerTitleDirective, XDrawerContentDirective, XDrawerContainerComponent],\r\n imports: [CommonModule, XOutletModule, XButtonModule, XPortalModule],\r\n providers: [XDrawerService]\r\n})\r\nexport class XDrawerModule {}\r\n","/**\n * Generated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Show = false;
298
298
  }
299
+ this.setPadding();
299
300
  }
300
301
  setInheritedValue() {
301
302
  if (!this.inputGroup)
@@ -349,7 +350,7 @@ class XInputComponent extends XInputProperty {
349
350
  }
350
351
  }
351
352
  /** @nocollapse */ XInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", 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 });
352
- /** @nocollapse */ XInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XInputComponent, selector: "x-input", providers: [XValueAccessor(XInputComponent)], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }, { propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, static: 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\" [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 class=\"x-input-value-template-value\"\r\n [style.padding-left.rem]=\"paddingLeft\"\r\n [style.padding-right.rem]=\"paddingRight\"\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 [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)=\"xInput.emit($event)\"\r\n (keydown)=\"xKeydown.emit($event)\"\r\n (click)=\"xClick.emit($event)\"\r\n />\r\n <x-icon *ngIf=\"clearShow\" class=\"x-input-clear\" type=\"fto-x\" (click)=\"onClear()\"></x-icon>\r\n <x-icon *ngIf=\"icon && ((!clearShow && getIconLayoutRight) || getIconLayoutLeft)\" [type]=\"icon\" [spin]=\"iconSpin\"></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}.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:all 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-value-template .x-input-input>input{color:transparent}.x-input-value-template-value{position:absolute;display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;left:0}.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(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{align-items:inherit}.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($--x-input-icon-font-size + $--x-input-icon-padding * 2)}.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($--x-input-icon-font-size + $--x-input-icon-padding * 2)}.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-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),.x-input-big>.x-input-row>.x-input-input>.x-input-value-template-value{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),.x-input-large>.x-input-row>.x-input-input>.x-input-value-template-value{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),.x-input-medium>.x-input-row>.x-input-input>.x-input-value-template-value{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),.x-input-small>.x-input-row>.x-input-input>.x-input-value-template-value{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),.x-input-mini>.x-input-row>.x-input-input>.x-input-value-template-value{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"], components: [{ type: i3.XIconComponent, selector: "x-icon" }], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i6.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
353
+ /** @nocollapse */ XInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: XInputComponent, selector: "x-input", providers: [XValueAccessor(XInputComponent)], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true, static: true }, { propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, static: 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\" [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 class=\"x-input-value-template-value\"\r\n [style.padding-left.rem]=\"paddingLeft\"\r\n [style.padding-right.rem]=\"paddingRight\"\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 [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)=\"xInput.emit($event)\"\r\n (keydown)=\"xKeydown.emit($event)\"\r\n (click)=\"xClick.emit($event)\"\r\n />\r\n <x-icon *ngIf=\"clearShow\" class=\"x-input-clear\" type=\"fto-x\" (click)=\"onClear()\"></x-icon>\r\n <x-icon\r\n *ngIf=\"icon && ((!clearShow && getIconLayoutRight) || getIconLayoutLeft)\"\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}.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:all 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-value-template .x-input-input>input{color:transparent}.x-input-value-template-value{position:absolute;display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;left:0}.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(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{align-items:inherit}.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($--x-input-icon-font-size + $--x-input-icon-padding * 2)}.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($--x-input-icon-font-size + $--x-input-icon-padding * 2)}.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),.x-input-big>.x-input-row>.x-input-input>.x-input-value-template-value{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),.x-input-large>.x-input-row>.x-input-input>.x-input-value-template-value{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),.x-input-medium>.x-input-row>.x-input-input>.x-input-value-template-value{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),.x-input-small>.x-input-row>.x-input-input>.x-input-value-template-value{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),.x-input-mini>.x-input-row>.x-input-input>.x-input-value-template-value{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"], components: [{ type: i3.XIconComponent, selector: "x-icon" }], directives: [{ type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i6.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
353
354
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0, type: XInputComponent, decorators: [{
354
355
  type: Component,
355
356
  args: [{