@ng-nest/ui 20.2.2 → 20.2.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.
@@ -82,11 +82,23 @@ declare class XColorPickerProperty extends XColorPickerProperty_base {
82
82
  * @en_US Display position
83
83
  */
84
84
  readonly placement: _angular_core.InputSignal<XCorner>;
85
+ /**
86
+ * @zh_CN 清除按钮
87
+ * @en_US Clear button
88
+ */
89
+ readonly clearable: _angular_core.InputSignalWithTransform<boolean, XBoolean>;
85
90
  /**
86
91
  * @zh_CN 显示边框
87
92
  * @en_US Display Border
88
93
  */
89
94
  readonly bordered: _angular_core.InputSignalWithTransform<boolean, XBoolean>;
95
+ /**
96
+ * @zh_CN 输入框样式
97
+ * @en_US Input Style
98
+ */
99
+ readonly inputStyle: _angular_core.InputSignal<{
100
+ [style: string]: any;
101
+ } | undefined>;
90
102
  /**
91
103
  * @zh_CN 浮动标签
92
104
  * @en_US Float label
@@ -199,7 +211,7 @@ declare class XColorPickerProperty extends XColorPickerProperty_base {
199
211
  */
200
212
  readonly inputValidator: _angular_core.InputSignal<((value: any) => boolean) | undefined>;
201
213
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<XColorPickerProperty, never>;
202
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<XColorPickerProperty, "x-color-picker-property", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "floatFixed": { "alias": "floatFixed"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "pointer": { "alias": "pointer"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelWidth": { "alias": "labelWidth"; "required": false; "isSignal": true; }; "labelAlign": { "alias": "labelAlign"; "required": false; "isSignal": true; }; "justify": { "alias": "justify"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "valueTpl": { "alias": "valueTpl"; "required": false; "isSignal": true; }; "valueTplContext": { "alias": "valueTplContext"; "required": false; "isSignal": true; }; "before": { "alias": "before"; "required": false; "isSignal": true; }; "after": { "alias": "after"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "inputValidator": { "alias": "inputValidator"; "required": false; "isSignal": true; }; }, { "active": "activeChange"; }, never, never, true, never>;
214
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<XColorPickerProperty, "x-color-picker-property", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "inputStyle": { "alias": "inputStyle"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "floatFixed": { "alias": "floatFixed"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "pointer": { "alias": "pointer"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelWidth": { "alias": "labelWidth"; "required": false; "isSignal": true; }; "labelAlign": { "alias": "labelAlign"; "required": false; "isSignal": true; }; "justify": { "alias": "justify"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "valueTpl": { "alias": "valueTpl"; "required": false; "isSignal": true; }; "valueTplContext": { "alias": "valueTplContext"; "required": false; "isSignal": true; }; "before": { "alias": "before"; "required": false; "isSignal": true; }; "after": { "alias": "after"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "inputValidator": { "alias": "inputValidator"; "required": false; "isSignal": true; }; }, { "active": "activeChange"; }, never, never, true, never>;
203
215
  }
204
216
  /**
205
217
  * ColorPicker Option
@@ -472,13 +484,14 @@ declare class XColorPickerComponent extends XColorPickerProperty implements OnIn
472
484
  panelTemplate: _angular_core.Signal<TemplateRef<any>>;
473
485
  private doc;
474
486
  primaryColor: string;
475
- inputStyle: _angular_core.Signal<{
487
+ inputStyleComputed: _angular_core.Signal<{
476
488
  backgroundColor: any;
477
489
  color: string;
478
490
  }>;
479
- clearable: _angular_core.WritableSignal<boolean>;
491
+ inputClearable: _angular_core.WritableSignal<boolean>;
480
492
  enter: _angular_core.WritableSignal<boolean>;
481
493
  animating: _angular_core.WritableSignal<boolean>;
494
+ allowAgian: _angular_core.WritableSignal<boolean>;
482
495
  portal: XPortalOverlayRef<XColorPickerPortalComponent>;
483
496
  icon: _angular_core.WritableSignal<string>;
484
497
  closeSubject: Subject<void>;
package/core/index.d.ts CHANGED
@@ -1349,6 +1349,7 @@ interface XColorPickerConfig {
1349
1349
  floatFixed?: boolean;
1350
1350
  variant?: XVariant;
1351
1351
  placement?: XCorner;
1352
+ clearable?: boolean;
1352
1353
  size?: XSize;
1353
1354
  bordered?: boolean;
1354
1355
  }
@@ -3,7 +3,7 @@ import { input, model, Component, viewChild, ElementRef, output, signal, inject,
3
3
  import { XToBoolean, XToCssPixelValue, XIsChange, XComputed, XIsEmpty, XParents } from '@ng-nest/ui/core';
4
4
  import { XFormControlFunction, XValueAccessor } from '@ng-nest/ui/base-form';
5
5
  import { XSliderSelectComponent } from '@ng-nest/ui/slider-select';
6
- import { Subject, fromEvent } from 'rxjs';
6
+ import { Subject, of, fromEvent } from 'rxjs';
7
7
  import { DecimalPipe, PercentPipe, NgTemplateOutlet, DOCUMENT } from '@angular/common';
8
8
  import { XInputComponent } from '@ng-nest/ui/input';
9
9
  import * as i2 from '@angular/cdk/drag-drop';
@@ -13,7 +13,7 @@ import * as i1 from '@angular/forms';
13
13
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
14
14
  import { XPortalService, XPortalConnectedPosition } from '@ng-nest/ui/portal';
15
15
  import { Overlay } from '@angular/cdk/overlay';
16
- import { takeUntil, filter } from 'rxjs/operators';
16
+ import { takeUntil, delay, filter } from 'rxjs/operators';
17
17
 
18
18
  /**
19
19
  * ColorPicker
@@ -38,11 +38,21 @@ class XColorPickerProperty extends XFormControlFunction(X_COLOR_CONFIG_NAME) {
38
38
  * @en_US Display position
39
39
  */
40
40
  this.placement = input(this.config?.placement ?? 'bottom-start', ...(ngDevMode ? [{ debugName: "placement" }] : []));
41
+ /**
42
+ * @zh_CN 清除按钮
43
+ * @en_US Clear button
44
+ */
45
+ this.clearable = input(this.config?.clearable ?? true, ...(ngDevMode ? [{ debugName: "clearable", transform: XToBoolean }] : [{ transform: XToBoolean }]));
41
46
  /**
42
47
  * @zh_CN 显示边框
43
48
  * @en_US Display Border
44
49
  */
45
50
  this.bordered = input(this.config?.bordered ?? true, ...(ngDevMode ? [{ debugName: "bordered", transform: XToBoolean }] : [{ transform: XToBoolean }]));
51
+ /**
52
+ * @zh_CN 输入框样式
53
+ * @en_US Input Style
54
+ */
55
+ this.inputStyle = input(...(ngDevMode ? [undefined, { debugName: "inputStyle" }] : []));
46
56
  /**
47
57
  * @zh_CN 浮动标签
48
58
  * @en_US Float label
@@ -156,12 +166,12 @@ class XColorPickerProperty extends XFormControlFunction(X_COLOR_CONFIG_NAME) {
156
166
  this.inputValidator = input(...(ngDevMode ? [undefined, { debugName: "inputValidator" }] : []));
157
167
  }
158
168
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XColorPickerProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
159
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XColorPickerProperty, isStandalone: true, selector: "x-color-picker-property", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", 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" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
169
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XColorPickerProperty, isStandalone: true, selector: "x-color-picker-property", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", 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 }, 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" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
160
170
  }
161
171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XColorPickerProperty, decorators: [{
162
172
  type: Component,
163
173
  args: [{ selector: `${XColorPickerPrefix}-property`, template: '' }]
164
- }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", 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 }] }] } });
174
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", 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 }] }] } });
165
175
  /**
166
176
  * ColorPicker-Portal
167
177
  * @selector x-color-picker-portal
@@ -737,13 +747,15 @@ class XColorPickerComponent extends XColorPickerProperty {
737
747
  this.panelTemplate = viewChild.required('panelTemplate');
738
748
  this.doc = inject(DOCUMENT);
739
749
  this.primaryColor = XComputed(this.doc.documentElement).getPropertyValue('--x-primary').trim();
740
- this.inputStyle = computed(() => ({
750
+ this.inputStyleComputed = computed(() => ({
741
751
  backgroundColor: this.value(),
742
- color: 'transparent'
743
- }), ...(ngDevMode ? [{ debugName: "inputStyle" }] : []));
744
- this.clearable = signal(false, ...(ngDevMode ? [{ debugName: "clearable" }] : []));
752
+ color: 'transparent',
753
+ ...this.inputStyle()
754
+ }), ...(ngDevMode ? [{ debugName: "inputStyleComputed" }] : []));
755
+ this.inputClearable = signal(false, ...(ngDevMode ? [{ debugName: "inputClearable" }] : []));
745
756
  this.enter = signal(false, ...(ngDevMode ? [{ debugName: "enter" }] : []));
746
757
  this.animating = signal(false, ...(ngDevMode ? [{ debugName: "animating" }] : []));
758
+ this.allowAgian = signal(true, ...(ngDevMode ? [{ debugName: "allowAgian" }] : []));
747
759
  this.icon = signal('fto-chevron-down', ...(ngDevMode ? [{ debugName: "icon" }] : []));
748
760
  this.closeSubject = new Subject();
749
761
  this.document = inject(DOCUMENT);
@@ -788,18 +800,22 @@ class XColorPickerComponent extends XColorPickerProperty {
788
800
  if (this.disabledComputed())
789
801
  return;
790
802
  this.enter.set(true);
803
+ if (!this.clearable())
804
+ return;
791
805
  if (!XIsEmpty(this.value())) {
792
806
  this.icon.set('');
793
- this.clearable.set(true);
807
+ this.inputClearable.set(true);
794
808
  }
795
809
  }
796
810
  mleave() {
797
811
  if (this.disabledComputed())
798
812
  return;
799
813
  this.enter.set(false);
800
- if (this.clearable()) {
814
+ if (!this.clearable())
815
+ return;
816
+ if (this.inputClearable()) {
801
817
  this.icon.set('fto-chevron-down');
802
- this.clearable.set(false);
818
+ this.inputClearable.set(false);
803
819
  }
804
820
  }
805
821
  clearEmit() {
@@ -815,10 +831,14 @@ class XColorPickerComponent extends XColorPickerProperty {
815
831
  if (this.portalAttached()) {
816
832
  this.portalOverlayRef()?.detach();
817
833
  this.active.set(false);
834
+ this.allowAgian.set(false);
835
+ of(true)
836
+ .pipe(delay(200))
837
+ .subscribe(() => this.allowAgian.set(true));
818
838
  }
819
839
  }
820
840
  showPortal() {
821
- if (this.disabledComputed() || this.animating())
841
+ if (this.disabledComputed() || !this.allowAgian() || this.animating())
822
842
  return;
823
843
  this.active.set(true);
824
844
  const config = {
@@ -901,11 +921,11 @@ class XColorPickerComponent extends XColorPickerProperty {
901
921
  this.portalAttached() && this.portalOverlayRef()?.updatePositionStrategy(this.setPlacement());
902
922
  }
903
923
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
904
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.5", type: XColorPickerComponent, isStandalone: true, selector: "x-color-picker", providers: [XValueAccessor(XColorPickerComponent)], viewQueries: [{ propertyName: "colorPicker", first: true, predicate: ["colorPicker"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "inputCom", first: true, predicate: ["inputCom"], descendants: true, read: XInputComponent, isSignal: true }, { propertyName: "panelTemplate", first: true, predicate: ["panelTemplate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #colorPicker class=\"x-color-picker\">\r\n <div class=\"x-color-picker-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 [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"clearable()\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl() ? valueTpl() : valueTemplate\"\r\n [valueTplContext]=\"valueTplContext()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\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 (clearEmit)=\"clearEmit()\"\r\n (xClick)=\"showPortal()\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n ></x-input>\r\n\r\n <ng-template #valueTemplate>\r\n <div class=\"x-color-picker-template-value\">\r\n <div\r\n class=\"x-color-picker-template-color\"\r\n [style]=\"inputStyle()\"\r\n [attr.title]=\"inputStyle().backgroundColor\"\r\n ></div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #panelTemplate>\r\n <ng-content select=\"[xColorPickerPanel]\"></ng-content>\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-color-picker{display:inline-block;width:12rem}.x-color-picker{margin:0;padding:0}.x-color-picker{width:100%}.x-color-picker x-input{width:100%}.x-color-picker x-input .x-input-value-template-value{left:.25rem!important}.x-color-picker-template-value{width:100%;height:100%;padding:.25rem 0;content:\" \";position:absolute;display:flex;align-items:center;justify-content:center}.x-color-picker-template-color{width:100%;height:100%;border-radius:var(--x-border-small-radius)}.x-color-picker .x-input-mini.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-mini) - var(--x-padding-mini) * .5)}.x-color-picker .x-input-mini .x-input-value-template-value{width:calc(100% - var(--x-height-mini))!important}.x-color-picker .x-input-small.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-small) - var(--x-padding-small) * .5)}.x-color-picker .x-input-small .x-input-value-template-value{width:calc(100% - var(--x-height-small))!important}.x-color-picker .x-input-medium.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-medium) - var(--x-padding-medium) * .5)}.x-color-picker .x-input-medium .x-input-value-template-value{width:calc(100% - var(--x-height-medium))!important}.x-color-picker .x-input-large.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-large) - var(--x-padding-large) * .5)}.x-color-picker .x-input-large .x-input-value-template-value{width:calc(100% - var(--x-height-large))!important}.x-color-picker .x-input-big.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-big) - var(--x-padding-big) * .5)}.x-color-picker .x-input-big .x-input-value-template-value{width:calc(100% - var(--x-height-big))!important}\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 }); }
924
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.5", type: XColorPickerComponent, isStandalone: true, selector: "x-color-picker", providers: [XValueAccessor(XColorPickerComponent)], viewQueries: [{ propertyName: "colorPicker", first: true, predicate: ["colorPicker"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "inputCom", first: true, predicate: ["inputCom"], descendants: true, read: XInputComponent, isSignal: true }, { propertyName: "panelTemplate", first: true, predicate: ["panelTemplate"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div #colorPicker class=\"x-color-picker\">\r\n <div class=\"x-color-picker-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 [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"clearable() && inputClearable()\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl() ? valueTpl() : valueTemplate\"\r\n [valueTplContext]=\"valueTplContext()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\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 (clearEmit)=\"clearEmit()\"\r\n (xClick)=\"showPortal()\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n ></x-input>\r\n\r\n <ng-template #valueTemplate>\r\n <div class=\"x-color-picker-template-value\">\r\n <div\r\n class=\"x-color-picker-template-color\"\r\n [style]=\"inputStyleComputed()\"\r\n [attr.title]=\"inputStyleComputed().backgroundColor\"\r\n ></div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #panelTemplate>\r\n <ng-content select=\"[xColorPickerPanel]\"></ng-content>\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-color-picker{display:inline-block;width:12rem}.x-color-picker{margin:0;padding:0}.x-color-picker{width:100%}.x-color-picker x-input{width:100%}.x-color-picker x-input .x-input-value-template-value{left:.25rem!important}.x-color-picker-template-value{width:100%;height:100%;padding:.25rem 0;content:\" \";position:absolute;display:flex;align-items:center;justify-content:center}.x-color-picker-template-color{width:100%;height:100%;border-radius:var(--x-border-small-radius)}.x-color-picker .x-input-mini.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-mini) - var(--x-padding-mini) * .5)}.x-color-picker .x-input-mini .x-input-value-template-value{width:calc(100% - var(--x-height-mini))!important}.x-color-picker .x-input-small.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-small) - var(--x-padding-small) * .5)}.x-color-picker .x-input-small .x-input-value-template-value{width:calc(100% - var(--x-height-small))!important}.x-color-picker .x-input-medium.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-medium) - var(--x-padding-medium) * .5)}.x-color-picker .x-input-medium .x-input-value-template-value{width:calc(100% - var(--x-height-medium))!important}.x-color-picker .x-input-large.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-large) - var(--x-padding-large) * .5)}.x-color-picker .x-input-large .x-input-value-template-value{width:calc(100% - var(--x-height-large))!important}.x-color-picker .x-input-big.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-big) - var(--x-padding-big) * .5)}.x-color-picker .x-input-big .x-input-value-template-value{width:calc(100% - var(--x-height-big))!important}\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 }); }
905
925
  }
906
926
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XColorPickerComponent, decorators: [{
907
927
  type: Component,
908
- args: [{ selector: 'x-color-picker', imports: [FormsModule, ReactiveFormsModule, XInputComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XColorPickerComponent)], template: "<div #colorPicker class=\"x-color-picker\">\r\n <div class=\"x-color-picker-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 [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"clearable()\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl() ? valueTpl() : valueTemplate\"\r\n [valueTplContext]=\"valueTplContext()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\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 (clearEmit)=\"clearEmit()\"\r\n (xClick)=\"showPortal()\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n ></x-input>\r\n\r\n <ng-template #valueTemplate>\r\n <div class=\"x-color-picker-template-value\">\r\n <div\r\n class=\"x-color-picker-template-color\"\r\n [style]=\"inputStyle()\"\r\n [attr.title]=\"inputStyle().backgroundColor\"\r\n ></div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #panelTemplate>\r\n <ng-content select=\"[xColorPickerPanel]\"></ng-content>\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-color-picker{display:inline-block;width:12rem}.x-color-picker{margin:0;padding:0}.x-color-picker{width:100%}.x-color-picker x-input{width:100%}.x-color-picker x-input .x-input-value-template-value{left:.25rem!important}.x-color-picker-template-value{width:100%;height:100%;padding:.25rem 0;content:\" \";position:absolute;display:flex;align-items:center;justify-content:center}.x-color-picker-template-color{width:100%;height:100%;border-radius:var(--x-border-small-radius)}.x-color-picker .x-input-mini.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-mini) - var(--x-padding-mini) * .5)}.x-color-picker .x-input-mini .x-input-value-template-value{width:calc(100% - var(--x-height-mini))!important}.x-color-picker .x-input-small.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-small) - var(--x-padding-small) * .5)}.x-color-picker .x-input-small .x-input-value-template-value{width:calc(100% - var(--x-height-small))!important}.x-color-picker .x-input-medium.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-medium) - var(--x-padding-medium) * .5)}.x-color-picker .x-input-medium .x-input-value-template-value{width:calc(100% - var(--x-height-medium))!important}.x-color-picker .x-input-large.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-large) - var(--x-padding-large) * .5)}.x-color-picker .x-input-large .x-input-value-template-value{width:calc(100% - var(--x-height-large))!important}.x-color-picker .x-input-big.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-big) - var(--x-padding-big) * .5)}.x-color-picker .x-input-big .x-input-value-template-value{width:calc(100% - var(--x-height-big))!important}\n"] }]
928
+ args: [{ selector: 'x-color-picker', imports: [FormsModule, ReactiveFormsModule, XInputComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [XValueAccessor(XColorPickerComponent)], template: "<div #colorPicker class=\"x-color-picker\">\r\n <div class=\"x-color-picker-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 [placeholder]=\"placeholder()\"\r\n [readonly]=\"readonly()\"\r\n [clearable]=\"clearable() && inputClearable()\"\r\n [(ngModel)]=\"value\"\r\n [valueTpl]=\"valueTpl() ? valueTpl() : valueTemplate\"\r\n [valueTplContext]=\"valueTplContext()\"\r\n [size]=\"size()\"\r\n [bordered]=\"bordered()\"\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 (clearEmit)=\"clearEmit()\"\r\n (xClick)=\"showPortal()\"\r\n (xMouseenter)=\"menter()\"\r\n (xMouseleave)=\"mleave()\"\r\n ></x-input>\r\n\r\n <ng-template #valueTemplate>\r\n <div class=\"x-color-picker-template-value\">\r\n <div\r\n class=\"x-color-picker-template-color\"\r\n [style]=\"inputStyleComputed()\"\r\n [attr.title]=\"inputStyleComputed().backgroundColor\"\r\n ></div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #panelTemplate>\r\n <ng-content select=\"[xColorPickerPanel]\"></ng-content>\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";x-color-picker{display:inline-block;width:12rem}.x-color-picker{margin:0;padding:0}.x-color-picker{width:100%}.x-color-picker x-input{width:100%}.x-color-picker x-input .x-input-value-template-value{left:.25rem!important}.x-color-picker-template-value{width:100%;height:100%;padding:.25rem 0;content:\" \";position:absolute;display:flex;align-items:center;justify-content:center}.x-color-picker-template-color{width:100%;height:100%;border-radius:var(--x-border-small-radius)}.x-color-picker .x-input-mini.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-mini) - var(--x-padding-mini) * .5)}.x-color-picker .x-input-mini .x-input-value-template-value{width:calc(100% - var(--x-height-mini))!important}.x-color-picker .x-input-small.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-small) - var(--x-padding-small) * .5)}.x-color-picker .x-input-small .x-input-value-template-value{width:calc(100% - var(--x-height-small))!important}.x-color-picker .x-input-medium.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-medium) - var(--x-padding-medium) * .5)}.x-color-picker .x-input-medium .x-input-value-template-value{width:calc(100% - var(--x-height-medium))!important}.x-color-picker .x-input-large.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-large) - var(--x-padding-large) * .5)}.x-color-picker .x-input-large .x-input-value-template-value{width:calc(100% - var(--x-height-large))!important}.x-color-picker .x-input-big.x-input-float-label-in>.x-input-row>.x-input-input>.x-input-value-template-value{padding:0!important;margin-top:calc(var(--x-height-big) - var(--x-padding-big) * .5)}.x-color-picker .x-input-big .x-input-value-template-value{width:calc(100% - var(--x-height-big))!important}\n"] }]
909
929
  }], ctorParameters: () => [], propDecorators: { colorPicker: [{ type: i0.ViewChild, args: ['colorPicker', { ...{ read: (ElementRef) }, isSignal: true }] }], inputCom: [{ type: i0.ViewChild, args: ['inputCom', { ...{ read: XInputComponent }, isSignal: true }] }], panelTemplate: [{ type: i0.ViewChild, args: ['panelTemplate', { isSignal: true }] }] } });
910
930
 
911
931
  class XColorPickerOptionDirective {