@ng-nest/ui 22.0.1 → 22.0.3
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/fesm2022/ng-nest-ui-auto-complete.mjs +80 -23
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +2 -2
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-form.mjs +4 -5
- package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-slider-select.mjs +0 -2
- package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +5 -2
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ng-nest-ui-auto-complete.d.ts +46 -7
- package/types/ng-nest-ui-core.d.ts +1 -0
- package/types/ng-nest-ui-slider-select.d.ts +0 -1
- package/types/ng-nest-ui-tree.d.ts +1 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Subject, BehaviorSubject, fromEvent } from 'rxjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, model, output, Component, viewChild, signal, inject, DestroyRef, HostListener, HostBinding, ChangeDetectionStrategy, ViewEncapsulation,
|
|
3
|
+
import { input, model, output, Component, viewChild, signal, computed, inject, DestroyRef, HostListener, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, ElementRef, effect, NgModule } from '@angular/core';
|
|
4
4
|
import { XToNumber, XToBoolean, XToCssPixelValue, XIsChange, XIsObservable, XIsFunction, XSetData, XParents, XIsEmpty } from '@ng-nest/ui/core';
|
|
5
5
|
import { XFormControlFunction, XValueAccessor } from '@ng-nest/ui/base-form';
|
|
6
6
|
import { XPortalService, XPortalConnectedPosition } from '@ng-nest/ui/portal';
|
|
7
7
|
import { XInputComponent } from '@ng-nest/ui/input';
|
|
8
8
|
import { takeUntil, filter, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
9
9
|
import { XListComponent } from '@ng-nest/ui/list';
|
|
10
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
10
11
|
import { Overlay } from '@angular/cdk/overlay';
|
|
11
12
|
import { DOWN_ARROW, UP_ARROW, ENTER, MAC_ENTER, ESCAPE } from '@angular/cdk/keycodes';
|
|
12
13
|
import * as i1 from '@angular/forms';
|
|
13
14
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
14
|
-
import { toSignal } from '@angular/core/rxjs-interop';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* AutoComplete
|
|
@@ -66,6 +66,18 @@ class XAutoCompleteProperty extends XFormControlFunction(X_AUTOCOMPLETE_CONFIG_N
|
|
|
66
66
|
*/
|
|
67
67
|
this.inputStyle = input(/* @ts-ignore */
|
|
68
68
|
...(ngDevMode ? [undefined, { debugName: "inputStyle" }] : /* istanbul ignore next */ []));
|
|
69
|
+
/**
|
|
70
|
+
* @zh_CN 图标
|
|
71
|
+
* @en_US Icon
|
|
72
|
+
*/
|
|
73
|
+
this.icon = model(/* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
75
|
+
/**
|
|
76
|
+
* @zh_CN 图标布局方式
|
|
77
|
+
* @en_US Icon layout
|
|
78
|
+
*/
|
|
79
|
+
this.iconLayout = input(this.config?.iconLayout ?? 'right', /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "iconLayout" }] : /* istanbul ignore next */ []));
|
|
69
81
|
/**
|
|
70
82
|
* @zh_CN 下拉框的最大高度
|
|
71
83
|
* @en_US The biggest height of the drop-down box
|
|
@@ -87,6 +99,12 @@ class XAutoCompleteProperty extends XFormControlFunction(X_AUTOCOMPLETE_CONFIG_N
|
|
|
87
99
|
*/
|
|
88
100
|
this.portalClass = input('', /* @ts-ignore */
|
|
89
101
|
...(ngDevMode ? [{ debugName: "portalClass" }] : /* istanbul ignore next */ []));
|
|
102
|
+
/**
|
|
103
|
+
* @zh_CN 自定义下拉框中的内容
|
|
104
|
+
* @en_US Custom content in the drop-down box
|
|
105
|
+
*/
|
|
106
|
+
this.portalTemp = input(/* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [undefined, { debugName: "portalTemp" }] : /* istanbul ignore next */ []));
|
|
90
108
|
/**
|
|
91
109
|
* @zh_CN 匹配区分大小写
|
|
92
110
|
* @en_US Case-sensitive
|
|
@@ -228,14 +246,19 @@ class XAutoCompleteProperty extends XFormControlFunction(X_AUTOCOMPLETE_CONFIG_N
|
|
|
228
246
|
* @en_US Node click event
|
|
229
247
|
*/
|
|
230
248
|
this.nodeEmit = output();
|
|
249
|
+
/**
|
|
250
|
+
* @zh_CN 输入值变化事件
|
|
251
|
+
* @en_US Input value change event
|
|
252
|
+
*/
|
|
253
|
+
this.searchChange = output();
|
|
231
254
|
}
|
|
232
255
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XAutoCompleteProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
233
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: XAutoCompleteProperty, isStandalone: true, selector: "x-auto-complete-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, nodeTpl: { classPropertyName: "nodeTpl", publicName: "nodeTpl", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, portalMaxHeight: { classPropertyName: "portalMaxHeight", publicName: "portalMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, portalHeight: { classPropertyName: "portalHeight", publicName: "portalHeight", isSignal: true, isRequired: false, transformFunction: null }, portalWidth: { classPropertyName: "portalWidth", publicName: "portalWidth", isSignal: true, isRequired: false, transformFunction: null }, portalClass: { classPropertyName: "portalClass", publicName: "portalClass", isSignal: true, isRequired: false, transformFunction: null }, caseSensitive: { classPropertyName: "caseSensitive", publicName: "caseSensitive", isSignal: true, isRequired: false, transformFunction: null }, onlySelect: { classPropertyName: "onlySelect", publicName: "onlySelect", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, floatFixed: { classPropertyName: "floatFixed", publicName: "floatFixed", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, pointer: { classPropertyName: "pointer", publicName: "pointer", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null }, labelAlign: { classPropertyName: "labelAlign", publicName: "labelAlign", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, valueTpl: { classPropertyName: "valueTpl", publicName: "valueTpl", isSignal: true, isRequired: false, transformFunction: null }, valueTplContext: { classPropertyName: "valueTplContext", publicName: "valueTplContext", isSignal: true, isRequired: false, transformFunction: null }, before: { classPropertyName: "before", publicName: "before", isSignal: true, isRequired: false, transformFunction: null }, after: { classPropertyName: "after", publicName: "after", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, inputValidator: { classPropertyName: "inputValidator", publicName: "inputValidator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "activeChange", nodeEmit: "nodeEmit" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
256
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: XAutoCompleteProperty, isStandalone: true, selector: "x-auto-complete-property", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, nodeTpl: { classPropertyName: "nodeTpl", publicName: "nodeTpl", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconLayout: { classPropertyName: "iconLayout", publicName: "iconLayout", isSignal: true, isRequired: false, transformFunction: null }, portalMaxHeight: { classPropertyName: "portalMaxHeight", publicName: "portalMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, portalHeight: { classPropertyName: "portalHeight", publicName: "portalHeight", isSignal: true, isRequired: false, transformFunction: null }, portalWidth: { classPropertyName: "portalWidth", publicName: "portalWidth", isSignal: true, isRequired: false, transformFunction: null }, portalClass: { classPropertyName: "portalClass", publicName: "portalClass", isSignal: true, isRequired: false, transformFunction: null }, portalTemp: { classPropertyName: "portalTemp", publicName: "portalTemp", isSignal: true, isRequired: false, transformFunction: null }, caseSensitive: { classPropertyName: "caseSensitive", publicName: "caseSensitive", isSignal: true, isRequired: false, transformFunction: null }, onlySelect: { classPropertyName: "onlySelect", publicName: "onlySelect", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, floatFixed: { classPropertyName: "floatFixed", publicName: "floatFixed", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, pointer: { classPropertyName: "pointer", publicName: "pointer", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null }, labelAlign: { classPropertyName: "labelAlign", publicName: "labelAlign", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, valueTpl: { classPropertyName: "valueTpl", publicName: "valueTpl", isSignal: true, isRequired: false, transformFunction: null }, valueTplContext: { classPropertyName: "valueTplContext", publicName: "valueTplContext", isSignal: true, isRequired: false, transformFunction: null }, before: { classPropertyName: "before", publicName: "before", isSignal: true, isRequired: false, transformFunction: null }, after: { classPropertyName: "after", publicName: "after", isSignal: true, isRequired: false, transformFunction: null }, pattern: { classPropertyName: "pattern", publicName: "pattern", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, inputValidator: { classPropertyName: "inputValidator", publicName: "inputValidator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { icon: "iconChange", active: "activeChange", nodeEmit: "nodeEmit", searchChange: "searchChange" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
234
257
|
}
|
|
235
258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XAutoCompleteProperty, decorators: [{
|
|
236
259
|
type: Component,
|
|
237
260
|
args: [{ selector: `${XAutoCompletePrefix}-property`, template: '' }]
|
|
238
|
-
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], nodeTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeTpl", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], portalMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalMaxHeight", required: false }] }], portalHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalHeight", required: false }] }], portalWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalWidth", required: false }] }], portalClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalClass", required: false }] }], caseSensitive: [{ type: i0.Input, args: [{ isSignal: true, alias: "caseSensitive", required: false }] }], onlySelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlySelect", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], floatFixed: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatFixed", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], pointer: [{ type: i0.Input, args: [{ isSignal: true, alias: "pointer", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }], labelAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelAlign", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], valueTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTpl", required: false }] }], valueTplContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTplContext", required: false }] }], before: [{ type: i0.Input, args: [{ isSignal: true, alias: "before", required: false }] }], after: [{ type: i0.Input, args: [{ isSignal: true, alias: "after", required: false }] }], pattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "pattern", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }, { type: i0.Output, args: ["activeChange"] }], inputValidator: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputValidator", required: false }] }], nodeEmit: [{ type: i0.Output, args: ["nodeEmit"] }] } });
|
|
261
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], nodeTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeTpl", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }, { type: i0.Output, args: ["iconChange"] }], iconLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLayout", required: false }] }], portalMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalMaxHeight", required: false }] }], portalHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalHeight", required: false }] }], portalWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalWidth", required: false }] }], portalClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalClass", required: false }] }], portalTemp: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalTemp", required: false }] }], caseSensitive: [{ type: i0.Input, args: [{ isSignal: true, alias: "caseSensitive", required: false }] }], onlySelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlySelect", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], floatFixed: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatFixed", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], pointer: [{ type: i0.Input, args: [{ isSignal: true, alias: "pointer", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], labelWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelWidth", required: false }] }], labelAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelAlign", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], valueTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTpl", required: false }] }], valueTplContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTplContext", required: false }] }], before: [{ type: i0.Input, args: [{ isSignal: true, alias: "before", required: false }] }], after: [{ type: i0.Input, args: [{ isSignal: true, alias: "after", required: false }] }], pattern: [{ type: i0.Input, args: [{ isSignal: true, alias: "pattern", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }, { type: i0.Output, args: ["activeChange"] }], inputValidator: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputValidator", required: false }] }], nodeEmit: [{ type: i0.Output, args: ["nodeEmit"] }], searchChange: [{ type: i0.Output, args: ["searchChange"] }] } });
|
|
239
262
|
/**
|
|
240
263
|
* AutoComplete Portal
|
|
241
264
|
* @selector x-auto-complete-portal
|
|
@@ -247,7 +270,7 @@ class XAutoCompletePortalComponent {
|
|
|
247
270
|
constructor() {
|
|
248
271
|
this.animateEnter = 'x-connect-enter';
|
|
249
272
|
this.animateLeave = 'x-connect-leave';
|
|
250
|
-
this.list = viewChild
|
|
273
|
+
this.list = viewChild('list', { ...(ngDevMode ? { debugName: "list" } : /* istanbul ignore next */ {}), read: XListComponent });
|
|
251
274
|
this.data = input(/* @ts-ignore */
|
|
252
275
|
...(ngDevMode ? [undefined, { debugName: "data" }] : /* istanbul ignore next */ []));
|
|
253
276
|
this.value = input(/* @ts-ignore */
|
|
@@ -274,6 +297,16 @@ class XAutoCompletePortalComponent {
|
|
|
274
297
|
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
275
298
|
this.destroy = signal(false, /* @ts-ignore */
|
|
276
299
|
...(ngDevMode ? [{ debugName: "destroy" }] : /* istanbul ignore next */ []));
|
|
300
|
+
this.portalTemp = input(/* @ts-ignore */
|
|
301
|
+
...(ngDevMode ? [undefined, { debugName: "portalTemp" }] : /* istanbul ignore next */ []));
|
|
302
|
+
this.portalTempContext = computed(() => ({
|
|
303
|
+
$implicit: this.data(),
|
|
304
|
+
$data: this.data(),
|
|
305
|
+
$value: this.value(),
|
|
306
|
+
$close: () => this.closeSubject.next(),
|
|
307
|
+
$nodeClick: (node) => this.onNodeClick(node)
|
|
308
|
+
}), /* @ts-ignore */
|
|
309
|
+
...(ngDevMode ? [{ debugName: "portalTempContext" }] : /* istanbul ignore next */ []));
|
|
277
310
|
this.unSubject = new Subject();
|
|
278
311
|
this.destroyRef = inject(DestroyRef);
|
|
279
312
|
}
|
|
@@ -289,10 +322,10 @@ class XAutoCompletePortalComponent {
|
|
|
289
322
|
}
|
|
290
323
|
ngOnInit() {
|
|
291
324
|
this.closeSubject.pipe(takeUntil(this.unSubject)).subscribe(() => {
|
|
292
|
-
this.list()
|
|
325
|
+
this.list()?.setUnActive(this.active());
|
|
293
326
|
});
|
|
294
327
|
this.keydownSubject.pipe(takeUntil(this.unSubject)).subscribe((x) => {
|
|
295
|
-
this.list()
|
|
328
|
+
this.list()?.keydown(x);
|
|
296
329
|
});
|
|
297
330
|
this.destroyRef.onDestroy(() => {
|
|
298
331
|
this.destroy.set(true);
|
|
@@ -301,7 +334,7 @@ class XAutoCompletePortalComponent {
|
|
|
301
334
|
});
|
|
302
335
|
}
|
|
303
336
|
ngAfterViewInit() {
|
|
304
|
-
this.list()
|
|
337
|
+
this.list()?.keyManager.setFirstItemActive();
|
|
305
338
|
}
|
|
306
339
|
stopPropagation(event) {
|
|
307
340
|
event.stopPropagation();
|
|
@@ -317,11 +350,11 @@ class XAutoCompletePortalComponent {
|
|
|
317
350
|
this.closeSubject.next();
|
|
318
351
|
}
|
|
319
352
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XAutoCompletePortalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
320
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
353
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: XAutoCompletePortalComponent, isStandalone: true, selector: "x-auto-complete-portal", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, nodeTpl: { classPropertyName: "nodeTpl", publicName: "nodeTpl", isSignal: true, isRequired: false, transformFunction: null }, inputCom: { classPropertyName: "inputCom", publicName: "inputCom", isSignal: true, isRequired: false, transformFunction: null }, keywordText: { classPropertyName: "keywordText", publicName: "keywordText", isSignal: true, isRequired: false, transformFunction: null }, caseSensitive: { classPropertyName: "caseSensitive", publicName: "caseSensitive", isSignal: true, isRequired: false, transformFunction: null }, portalMaxHeight: { classPropertyName: "portalMaxHeight", publicName: "portalMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, portalHeight: { classPropertyName: "portalHeight", publicName: "portalHeight", isSignal: true, isRequired: false, transformFunction: null }, portalWidth: { classPropertyName: "portalWidth", publicName: "portalWidth", isSignal: true, isRequired: false, transformFunction: null }, portalTemp: { classPropertyName: "portalTemp", publicName: "portalTemp", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { keywordText: "keywordTextChange", animating: "animating", nodeClick: "nodeClick" }, host: { listeners: { "animationend": "done()", "animationstart": "start()" }, properties: { "animate.enter": "this.animateEnter", "animate.leave": "this.animateLeave" } }, viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, read: XListComponent, isSignal: true }], ngImport: i0, template: "<div\r\n #autoCompletePortal\r\n class=\"x-auto-complete-portal\"\r\n tabindex=\"-1\"\r\n (click)=\"inputCom()?.inputFocus('focus'); stopPropagation($event)\"\r\n [style.maxHeight]=\"portalHeight() ? portalHeight() : portalMaxHeight()\"\r\n [style.height]=\"portalHeight()\"\r\n>\r\n @if (portalTemp(); as portalTpl) {\r\n <ng-template [ngTemplateOutlet]=\"portalTpl\" [ngTemplateOutletContext]=\"portalTempContext()\"></ng-template>\r\n } @else {\r\n <x-list\r\n #list\r\n [data]=\"data()!\"\r\n (nodeClick)=\"onNodeClick($event)\"\r\n (keyManagerChange)=\"onActive($event)\"\r\n (keyManagerTabOut)=\"onTabOut()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [scrollElement]=\"autoCompletePortal\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n [inPortal]=\"true\"\r\n ></x-list>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-auto-complete-portal{width:100%}.x-auto-complete-portal{color:var(--x-text);width:100%;border-radius:var(--x-border-small-radius);box-shadow:var(--x-box-shadow);position:relative;display:flex;background-color:var(--x-background-100);overflow:hidden auto;max-height:calc(calc(var(--x-font-size) + .875rem) * 6 + var(--x-border-width) * 7)}.x-auto-complete-portal:focus{outline:none}\n"], dependencies: [{ kind: "component", type: XListComponent, selector: "x-list" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
321
354
|
}
|
|
322
355
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XAutoCompletePortalComponent, decorators: [{
|
|
323
356
|
type: Component,
|
|
324
|
-
args: [{ selector: `${XAutoCompletePortalPrefix}`, imports: [XListComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n #autoCompletePortal\r\n class=\"x-auto-complete-portal\"\r\n tabindex=\"-1\"\r\n (click)=\"inputCom()?.inputFocus('focus'); stopPropagation($event)\"\r\n [style.maxHeight]=\"portalHeight() ? portalHeight() : portalMaxHeight()\"\r\n [style.height]=\"portalHeight()\"\r\n>\r\n <x-list\r\n
|
|
357
|
+
args: [{ selector: `${XAutoCompletePortalPrefix}`, imports: [XListComponent, NgTemplateOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n #autoCompletePortal\r\n class=\"x-auto-complete-portal\"\r\n tabindex=\"-1\"\r\n (click)=\"inputCom()?.inputFocus('focus'); stopPropagation($event)\"\r\n [style.maxHeight]=\"portalHeight() ? portalHeight() : portalMaxHeight()\"\r\n [style.height]=\"portalHeight()\"\r\n>\r\n @if (portalTemp(); as portalTpl) {\r\n <ng-template [ngTemplateOutlet]=\"portalTpl\" [ngTemplateOutletContext]=\"portalTempContext()\"></ng-template>\r\n } @else {\r\n <x-list\r\n #list\r\n [data]=\"data()!\"\r\n (nodeClick)=\"onNodeClick($event)\"\r\n (keyManagerChange)=\"onActive($event)\"\r\n (keyManagerTabOut)=\"onTabOut()\"\r\n [nodeTpl]=\"nodeTpl()\"\r\n [scrollElement]=\"autoCompletePortal\"\r\n [keywordText]=\"keywordText()\"\r\n [caseSensitive]=\"caseSensitive()\"\r\n [inPortal]=\"true\"\r\n ></x-list>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-auto-complete-portal{width:100%}.x-auto-complete-portal{color:var(--x-text);width:100%;border-radius:var(--x-border-small-radius);box-shadow:var(--x-box-shadow);position:relative;display:flex;background-color:var(--x-background-100);overflow:hidden auto;max-height:calc(calc(var(--x-font-size) + .875rem) * 6 + var(--x-border-width) * 7)}.x-auto-complete-portal:focus{outline:none}\n"] }]
|
|
325
358
|
}], propDecorators: { animateEnter: [{
|
|
326
359
|
type: HostBinding,
|
|
327
360
|
args: ['animate.enter']
|
|
@@ -334,9 +367,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
334
367
|
}], start: [{
|
|
335
368
|
type: HostListener,
|
|
336
369
|
args: ['animationstart']
|
|
337
|
-
}], list: [{ type: i0.ViewChild, args: ['list', { ...{ read: XListComponent }, isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], nodeTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeTpl", required: false }] }], inputCom: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputCom", required: false }] }], keywordText: [{ type: i0.Input, args: [{ isSignal: true, alias: "keywordText", required: false }] }, { type: i0.Output, args: ["keywordTextChange"] }], caseSensitive: [{ type: i0.Input, args: [{ isSignal: true, alias: "caseSensitive", required: false }] }], portalMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalMaxHeight", required: false }] }], portalHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalHeight", required: false }] }], portalWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalWidth", required: false }] }], animating: [{ type: i0.Output, args: ["animating"] }], nodeClick: [{ type: i0.Output, args: ["nodeClick"] }] } });
|
|
370
|
+
}], list: [{ type: i0.ViewChild, args: ['list', { ...{ read: XListComponent }, isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], nodeTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeTpl", required: false }] }], inputCom: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputCom", required: false }] }], keywordText: [{ type: i0.Input, args: [{ isSignal: true, alias: "keywordText", required: false }] }, { type: i0.Output, args: ["keywordTextChange"] }], caseSensitive: [{ type: i0.Input, args: [{ isSignal: true, alias: "caseSensitive", required: false }] }], portalMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalMaxHeight", required: false }] }], portalHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalHeight", required: false }] }], portalWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalWidth", required: false }] }], animating: [{ type: i0.Output, args: ["animating"] }], nodeClick: [{ type: i0.Output, args: ["nodeClick"] }], portalTemp: [{ type: i0.Input, args: [{ isSignal: true, alias: "portalTemp", required: false }] }] } });
|
|
338
371
|
|
|
339
372
|
class XAutoCompleteComponent extends XAutoCompleteProperty {
|
|
373
|
+
get hostWidth() {
|
|
374
|
+
return this.widthComputed() ? this.inputStyle()?.['width'] : null;
|
|
375
|
+
}
|
|
340
376
|
constructor() {
|
|
341
377
|
super();
|
|
342
378
|
this.inputCom = viewChild.required('inputCom', { read: XInputComponent });
|
|
@@ -344,18 +380,22 @@ class XAutoCompleteComponent extends XAutoCompleteProperty {
|
|
|
344
380
|
...(ngDevMode ? [{ debugName: "nodes" }] : /* istanbul ignore next */ []));
|
|
345
381
|
this.searchNodes = signal([], /* @ts-ignore */
|
|
346
382
|
...(ngDevMode ? [{ debugName: "searchNodes" }] : /* istanbul ignore next */ []));
|
|
347
|
-
this.icon = signal('', /* @ts-ignore */
|
|
348
|
-
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
349
383
|
this.iconSpin = signal(false, /* @ts-ignore */
|
|
350
384
|
...(ngDevMode ? [{ debugName: "iconSpin" }] : /* istanbul ignore next */ []));
|
|
351
385
|
this.animating = signal(false, /* @ts-ignore */
|
|
352
386
|
...(ngDevMode ? [{ debugName: "animating" }] : /* istanbul ignore next */ []));
|
|
387
|
+
this.lastValidValue = null;
|
|
353
388
|
this.valueTplContextSignal = signal({ $node: null, $isValue: true }, /* @ts-ignore */
|
|
354
389
|
...(ngDevMode ? [{ debugName: "valueTplContextSignal" }] : /* istanbul ignore next */ []));
|
|
355
390
|
this.valueTplContextComputed = computed(() => {
|
|
356
391
|
return this.valueTplContext() ? this.valueTplContext() : this.valueTplContextSignal();
|
|
357
392
|
}, /* @ts-ignore */
|
|
358
393
|
...(ngDevMode ? [{ debugName: "valueTplContextComputed" }] : /* istanbul ignore next */ []));
|
|
394
|
+
this.widthComputed = computed(() => {
|
|
395
|
+
const inputStyle = this.inputStyle() || {};
|
|
396
|
+
return !!inputStyle?.['width'];
|
|
397
|
+
}, /* @ts-ignore */
|
|
398
|
+
...(ngDevMode ? [{ debugName: "widthComputed" }] : /* istanbul ignore next */ []));
|
|
359
399
|
this.inputChange = new BehaviorSubject(null);
|
|
360
400
|
this.closeSubject = new Subject();
|
|
361
401
|
this.keydownSubject = new Subject();
|
|
@@ -370,7 +410,8 @@ class XAutoCompleteComponent extends XAutoCompleteProperty {
|
|
|
370
410
|
...(ngDevMode ? [{ debugName: "portalComponent" }] : /* istanbul ignore next */ []));
|
|
371
411
|
this.portalOverlayRef = signal(null, /* @ts-ignore */
|
|
372
412
|
...(ngDevMode ? [{ debugName: "portalOverlayRef" }] : /* istanbul ignore next */ []));
|
|
373
|
-
this.
|
|
413
|
+
this.keywordText = signal(null, /* @ts-ignore */
|
|
414
|
+
...(ngDevMode ? [{ debugName: "keywordText" }] : /* istanbul ignore next */ []));
|
|
374
415
|
effect(() => this.portalComponent()?.setInput('value', this.value()));
|
|
375
416
|
effect(() => this.portalComponent()?.setInput('placement', this.realPlacement()));
|
|
376
417
|
effect(() => this.portalComponent()?.setInput('data', this.searchNodes()));
|
|
@@ -380,7 +421,8 @@ class XAutoCompleteComponent extends XAutoCompleteProperty {
|
|
|
380
421
|
effect(() => this.portalComponent()?.setInput('portalWidth', this.portalWidth()));
|
|
381
422
|
effect(() => this.portalComponent()?.setInput('caseSensitive', this.caseSensitive()));
|
|
382
423
|
effect(() => this.portalComponent()?.setInput('inputCom', this.inputCom()));
|
|
383
|
-
effect(() => this.portalComponent()?.setInput('keywordText', this.
|
|
424
|
+
effect(() => this.portalComponent()?.setInput('keywordText', this.keywordText()));
|
|
425
|
+
effect(() => this.portalComponent()?.setInput('portalTemp', this.portalTemp()));
|
|
384
426
|
}
|
|
385
427
|
ngOnInit() {
|
|
386
428
|
this.setSubject();
|
|
@@ -460,10 +502,11 @@ class XAutoCompleteComponent extends XAutoCompleteProperty {
|
|
|
460
502
|
if (!this.nodes()
|
|
461
503
|
.map((x) => x.label)
|
|
462
504
|
.includes(this.value())) {
|
|
463
|
-
this.
|
|
505
|
+
const restored = this.lastValidValue ?? '';
|
|
506
|
+
this.value.set(restored);
|
|
507
|
+
this.keywordText.set(restored);
|
|
464
508
|
if (this.onChange)
|
|
465
|
-
this.onChange(
|
|
466
|
-
this.inputChange.next(this.value());
|
|
509
|
+
this.onChange(restored);
|
|
467
510
|
}
|
|
468
511
|
}
|
|
469
512
|
showPortal() {
|
|
@@ -471,10 +514,11 @@ class XAutoCompleteComponent extends XAutoCompleteProperty {
|
|
|
471
514
|
return;
|
|
472
515
|
this.active.set(true);
|
|
473
516
|
if ((XIsObservable(this.data()) && this.nodes.length === 0) || XIsFunction(this.data())) {
|
|
517
|
+
const beforeIcon = this.icon() || '';
|
|
474
518
|
this.icon.set('fto-loader');
|
|
475
519
|
this.iconSpin.set(true);
|
|
476
520
|
XSetData(this.data(), this.unSubject, true, this.value()).subscribe((x) => {
|
|
477
|
-
this.icon.set(
|
|
521
|
+
this.icon.set(beforeIcon);
|
|
478
522
|
this.iconSpin.set(false);
|
|
479
523
|
this.nodes.set(x);
|
|
480
524
|
this.createPortal();
|
|
@@ -545,6 +589,7 @@ class XAutoCompleteComponent extends XAutoCompleteProperty {
|
|
|
545
589
|
return;
|
|
546
590
|
}
|
|
547
591
|
this.value.set(node.label);
|
|
592
|
+
this.lastValidValue = node.label;
|
|
548
593
|
this.valueTplContextSignal.update((x) => {
|
|
549
594
|
x.$node = node;
|
|
550
595
|
return { ...x };
|
|
@@ -591,10 +636,11 @@ class XAutoCompleteComponent extends XAutoCompleteProperty {
|
|
|
591
636
|
this.closeSubject.next();
|
|
592
637
|
}
|
|
593
638
|
else {
|
|
639
|
+
const beforeIcon = this.icon() || '';
|
|
594
640
|
this.icon.set('fto-loader');
|
|
595
641
|
this.iconSpin.set(true);
|
|
596
642
|
XSetData(this.data(), this.unSubject, true, value).subscribe((x) => {
|
|
597
|
-
this.icon.set(
|
|
643
|
+
this.icon.set(beforeIcon);
|
|
598
644
|
this.iconSpin.set(false);
|
|
599
645
|
this.nodes.set(x);
|
|
600
646
|
this.searchNodes.set(this.nodes());
|
|
@@ -626,19 +672,30 @@ class XAutoCompleteComponent extends XAutoCompleteProperty {
|
|
|
626
672
|
onKeydown($event) {
|
|
627
673
|
this.keydownSubject.next($event);
|
|
628
674
|
}
|
|
675
|
+
portalClose() {
|
|
676
|
+
this.closeSubject.next();
|
|
677
|
+
}
|
|
678
|
+
portalNodeClick(node) {
|
|
679
|
+
this.onNodeClick(node);
|
|
680
|
+
}
|
|
629
681
|
onInput(_event) {
|
|
630
682
|
this.formControlValidator();
|
|
631
683
|
setTimeout(() => {
|
|
684
|
+
this.searchChange.emit(this.value());
|
|
685
|
+
this.keywordText.set(this.value());
|
|
632
686
|
this.inputChange.next(this.value());
|
|
633
687
|
});
|
|
634
688
|
}
|
|
635
689
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XAutoCompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
636
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: XAutoCompleteComponent, isStandalone: true, selector: "x-auto-complete", providers: [XValueAccessor(XAutoCompleteComponent)], viewQueries: [{ propertyName: "inputCom", first: true, predicate: ["inputCom"], descendants: true, read: XInputComponent, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #autoComplete class=\"x-auto-complete\">\r\n <div class=\"x-auto-complete-row\">\r\n <x-input\r\n #inputCom\r\n type=\"text\"\r\n [label]=\"label()\"\r\n [labelWidth]=\"labelWidth()\"\r\n [labelAlign]=\"labelAlign()\"\r\n [justify]=\"justify()\"\r\n [align]=\"align()\"\r\n [direction]=\"direction()\"\r\n [disabled]=\"disabledComputed()\"\r\n [required]=\"requiredComputed()\"\r\n [validator]=\"validatorComputed()\"\r\n [inputValidator]=\"inputValidator()\"\r\n [icon]=\"icon()\"\r\n [iconSpin]=\"iconSpin()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"false\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl()\"\r\n [valueTplContext]=\"valueTplContextComputed()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\r\n [inputStyle]=\"inputStyle()\"\r\n [before]=\"before()\"\r\n [after]=\"after()\"\r\n [pattern]=\"patternComputed()\"\r\n [message]=\"messageComputed()\"\r\n [pointer]=\"pointer()\"\r\n [variant]=\"variant()\"\r\n [floatLabel]=\"floatLabel()\"\r\n [floatFixed]=\"floatFixed()\"\r\n [(active)]=\"active\"\r\n (xInput)=\"onInput($event)\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n (xClick)=\"showPortal()\"\r\n ></x-input>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-auto-complete{display:inline-block;width:12rem}.x-auto-complete{margin:0;padding:0}.x-auto-complete{width:100%}.x-auto-complete x-input{width:100%}.x-auto-complete-portal{color:var(--x-text);width:100%;border-radius:var(--x-border-small-radius);box-shadow:var(--x-box-shadow);position:relative;display:flex;background-color:var(--x-background-100);overflow:hidden auto;max-height:calc(calc(var(--x-font-size) + .875rem) * 6 + var(--x-border-width) * 7)}.x-auto-complete-portal:focus{outline:none}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: XInputComponent, selector: "x-input" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
690
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.1", type: XAutoCompleteComponent, isStandalone: true, selector: "x-auto-complete", host: { properties: { "style.width": "this.hostWidth" } }, providers: [XValueAccessor(XAutoCompleteComponent)], viewQueries: [{ propertyName: "inputCom", first: true, predicate: ["inputCom"], descendants: true, read: XInputComponent, isSignal: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div #autoComplete class=\"x-auto-complete\">\r\n <div class=\"x-auto-complete-row\">\r\n <x-input\r\n #inputCom\r\n type=\"text\"\r\n [label]=\"label()\"\r\n [labelWidth]=\"labelWidth()\"\r\n [labelAlign]=\"labelAlign()\"\r\n [justify]=\"justify()\"\r\n [align]=\"align()\"\r\n [direction]=\"direction()\"\r\n [disabled]=\"disabledComputed()\"\r\n [required]=\"requiredComputed()\"\r\n [validator]=\"validatorComputed()\"\r\n [inputValidator]=\"inputValidator()\"\r\n [icon]=\"icon()\"\r\n [iconSpin]=\"iconSpin()\"\r\n [iconLayout]=\"iconLayout()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"false\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl()\"\r\n [valueTplContext]=\"valueTplContextComputed()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\r\n [inputStyle]=\"inputStyle()\"\r\n [before]=\"before()\"\r\n [after]=\"after()\"\r\n [pattern]=\"patternComputed()\"\r\n [message]=\"messageComputed()\"\r\n [pointer]=\"pointer()\"\r\n [variant]=\"variant()\"\r\n [floatLabel]=\"floatLabel()\"\r\n [floatFixed]=\"floatFixed()\"\r\n [(active)]=\"active\"\r\n (xInput)=\"onInput($event)\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n (xClick)=\"showPortal()\"\r\n ></x-input>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-auto-complete{display:inline-block;width:12rem}.x-auto-complete{margin:0;padding:0}.x-auto-complete{width:100%}.x-auto-complete x-input{width:100%}.x-auto-complete-portal{color:var(--x-text);width:100%;border-radius:var(--x-border-small-radius);box-shadow:var(--x-box-shadow);position:relative;display:flex;background-color:var(--x-background-100);overflow:hidden auto;max-height:calc(calc(var(--x-font-size) + .875rem) * 6 + var(--x-border-width) * 7)}.x-auto-complete-portal:focus{outline:none}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: XInputComponent, selector: "x-input" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
637
691
|
}
|
|
638
692
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XAutoCompleteComponent, decorators: [{
|
|
639
693
|
type: Component,
|
|
640
|
-
args: [{ selector: `${XAutoCompletePrefix}`, imports: [FormsModule, ReactiveFormsModule, XInputComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XAutoCompleteComponent)], template: "<div #autoComplete class=\"x-auto-complete\">\r\n <div class=\"x-auto-complete-row\">\r\n <x-input\r\n #inputCom\r\n type=\"text\"\r\n [label]=\"label()\"\r\n [labelWidth]=\"labelWidth()\"\r\n [labelAlign]=\"labelAlign()\"\r\n [justify]=\"justify()\"\r\n [align]=\"align()\"\r\n [direction]=\"direction()\"\r\n [disabled]=\"disabledComputed()\"\r\n [required]=\"requiredComputed()\"\r\n [validator]=\"validatorComputed()\"\r\n [inputValidator]=\"inputValidator()\"\r\n [icon]=\"icon()\"\r\n [iconSpin]=\"iconSpin()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"false\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl()\"\r\n [valueTplContext]=\"valueTplContextComputed()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\r\n [inputStyle]=\"inputStyle()\"\r\n [before]=\"before()\"\r\n [after]=\"after()\"\r\n [pattern]=\"patternComputed()\"\r\n [message]=\"messageComputed()\"\r\n [pointer]=\"pointer()\"\r\n [variant]=\"variant()\"\r\n [floatLabel]=\"floatLabel()\"\r\n [floatFixed]=\"floatFixed()\"\r\n [(active)]=\"active\"\r\n (xInput)=\"onInput($event)\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n (xClick)=\"showPortal()\"\r\n ></x-input>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-auto-complete{display:inline-block;width:12rem}.x-auto-complete{margin:0;padding:0}.x-auto-complete{width:100%}.x-auto-complete x-input{width:100%}.x-auto-complete-portal{color:var(--x-text);width:100%;border-radius:var(--x-border-small-radius);box-shadow:var(--x-box-shadow);position:relative;display:flex;background-color:var(--x-background-100);overflow:hidden auto;max-height:calc(calc(var(--x-font-size) + .875rem) * 6 + var(--x-border-width) * 7)}.x-auto-complete-portal:focus{outline:none}\n"] }]
|
|
641
|
-
}], ctorParameters: () => [], propDecorators: { inputCom: [{ type: i0.ViewChild, args: ['inputCom', { ...{ read: XInputComponent }, isSignal: true }] }]
|
|
694
|
+
args: [{ selector: `${XAutoCompletePrefix}`, imports: [FormsModule, ReactiveFormsModule, XInputComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XAutoCompleteComponent)], template: "<div #autoComplete class=\"x-auto-complete\">\r\n <div class=\"x-auto-complete-row\">\r\n <x-input\r\n #inputCom\r\n type=\"text\"\r\n [label]=\"label()\"\r\n [labelWidth]=\"labelWidth()\"\r\n [labelAlign]=\"labelAlign()\"\r\n [justify]=\"justify()\"\r\n [align]=\"align()\"\r\n [direction]=\"direction()\"\r\n [disabled]=\"disabledComputed()\"\r\n [required]=\"requiredComputed()\"\r\n [validator]=\"validatorComputed()\"\r\n [inputValidator]=\"inputValidator()\"\r\n [icon]=\"icon()\"\r\n [iconSpin]=\"iconSpin()\"\r\n [iconLayout]=\"iconLayout()\"\r\n [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"false\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl()\"\r\n [valueTplContext]=\"valueTplContextComputed()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\r\n [inputStyle]=\"inputStyle()\"\r\n [before]=\"before()\"\r\n [after]=\"after()\"\r\n [pattern]=\"patternComputed()\"\r\n [message]=\"messageComputed()\"\r\n [pointer]=\"pointer()\"\r\n [variant]=\"variant()\"\r\n [floatLabel]=\"floatLabel()\"\r\n [floatFixed]=\"floatFixed()\"\r\n [(active)]=\"active\"\r\n (xInput)=\"onInput($event)\"\r\n (xKeydown)=\"onKeydown($event)\"\r\n (xClick)=\"showPortal()\"\r\n ></x-input>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-auto-complete{display:inline-block;width:12rem}.x-auto-complete{margin:0;padding:0}.x-auto-complete{width:100%}.x-auto-complete x-input{width:100%}.x-auto-complete-portal{color:var(--x-text);width:100%;border-radius:var(--x-border-small-radius);box-shadow:var(--x-box-shadow);position:relative;display:flex;background-color:var(--x-background-100);overflow:hidden auto;max-height:calc(calc(var(--x-font-size) + .875rem) * 6 + var(--x-border-width) * 7)}.x-auto-complete-portal:focus{outline:none}\n"] }]
|
|
695
|
+
}], ctorParameters: () => [], propDecorators: { inputCom: [{ type: i0.ViewChild, args: ['inputCom', { ...{ read: XInputComponent }, isSignal: true }] }], hostWidth: [{
|
|
696
|
+
type: HostBinding,
|
|
697
|
+
args: ['style.width']
|
|
698
|
+
}] } });
|
|
642
699
|
|
|
643
700
|
class XAutoCompleteModule {
|
|
644
701
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: XAutoCompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|