@ng-nest/ui 20.2.2 → 20.2.4
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/bubble/index.d.ts +7 -5
- package/color-picker/index.d.ts +16 -3
- package/core/index.d.ts +1 -0
- package/fesm2022/ng-nest-ui-auto-complete.mjs +3 -3
- package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs +1 -1
- package/fesm2022/ng-nest-ui-base-form.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-bubble.mjs +27 -15
- package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-cascade.mjs +3 -3
- package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-color-picker.mjs +39 -19
- package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-core.mjs +2 -1
- package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-date-picker.mjs +6 -6
- package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dialog.mjs +9 -7
- package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-drawer.mjs +2 -2
- package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-dropdown.mjs +5 -7
- package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-input.mjs +2 -2
- package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-message-box.mjs +0 -1
- package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-pagination.mjs +22 -14
- package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-scrollable.mjs +5 -3
- package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-select.mjs +15 -13
- package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-sender.mjs +2 -2
- package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tag.mjs +3 -3
- package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-textarea.mjs +6 -3
- package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-time-picker.mjs +3 -3
- package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tooltip.mjs +2 -2
- package/fesm2022/ng-nest-ui-tree-select.mjs +3 -3
- package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
- package/fesm2022/ng-nest-ui-tree.mjs +2 -2
- package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
- package/package.json +35 -35
- package/pagination/index.d.ts +4 -4
- package/scrollable/index.d.ts +3 -1
|
@@ -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
|
|
@@ -551,7 +561,7 @@ class XColorPickerPortalComponent {
|
|
|
551
561
|
return result;
|
|
552
562
|
}
|
|
553
563
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XColorPickerPortalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
554
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.5", type: XColorPickerPortalComponent, isStandalone: true, selector: "x-color-picker-portal", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputCom: { classPropertyName: "inputCom", publicName: "inputCom", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, panelTemplate: { classPropertyName: "panelTemplate", publicName: "panelTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", animating: "animating", nodeClick: "nodeClick" }, host: { listeners: { "animationend": "done(
|
|
564
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.5", type: XColorPickerPortalComponent, isStandalone: true, selector: "x-color-picker-portal", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, inputCom: { classPropertyName: "inputCom", publicName: "inputCom", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, panelTemplate: { classPropertyName: "panelTemplate", publicName: "panelTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", animating: "animating", nodeClick: "nodeClick" }, host: { listeners: { "animationend": "done()", "animationstart": "start()" }, properties: { "animate.enter": "this.animateEnter", "animate.leave": "this.animateLeave" } }, providers: [DecimalPipe, PercentPipe], viewQueries: [{ propertyName: "panelRef", first: true, predicate: ["panelRef"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "plateRef", first: true, predicate: ["plateRef"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "transparentCom", first: true, predicate: ["transparentCom"], descendants: true, read: XSliderSelectComponent, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"x-color-picker-portal\" tabindex=\"-1\" (click)=\"stopPropagation($event)\">\r\n <div #panelRef class=\"x-color-picker-portal-panel\">\r\n <div #plateRef class=\"x-color-picker-portal-plate\" (click)=\"plateClick($event)\">\r\n <div class=\"x-color-picker-portal-white\"></div>\r\n <div class=\"x-color-picker-portal-black\"></div>\r\n <div\r\n #dragCom\r\n class=\"x-color-picker-portal-cursor\"\r\n [style.left.px]=\"transformX()\"\r\n [style.top.px]=\"transformY()\"\r\n cdkDrag\r\n [cdkDragBoundary]=\"panelRef\"\r\n (cdkDragStarted)=\"started()\"\r\n (cdkDragEnded)=\"ended()\"\r\n (cdkDragMoved)=\"moved($event)\"\r\n ></div>\r\n </div>\r\n </div>\r\n <div class=\"x-color-picker-portal-tool\">\r\n <div class=\"x-color-picker-portal-operations\">\r\n <!-- <x-button icon=\"fto-edit-2\" onlyIcon></x-button> -->\r\n <div class=\"x-color-picker-portal-selected\">\r\n <div [style.background-color]=\"value()\"></div>\r\n </div>\r\n <div class=\"x-color-picker-portal-area\">\r\n <div class=\"x-color-picker-portal-slider\">\r\n <x-slider-select\r\n [style.width.%]=\"100\"\r\n [(ngModel)]=\"hsla().h\"\r\n min=\"0\"\r\n max=\"360\"\r\n step=\"1\"\r\n (dragStartEmit)=\"started()\"\r\n (dragEndEmit)=\"ended()\"\r\n (ngModelChange)=\"hueChange()\"\r\n ></x-slider-select>\r\n </div>\r\n <div class=\"x-color-picker-portal-transparent\">\r\n <x-slider-select\r\n [style.width.%]=\"100\"\r\n #transparentCom\r\n [(ngModel)]=\"hsla().a\"\r\n min=\"0\"\r\n max=\"1\"\r\n step=\"0.01\"\r\n (dragStarted)=\"started()\"\r\n (dragEnded)=\"ended()\"\r\n (ngModelChange)=\"transparentChange()\"\r\n ></x-slider-select>\r\n <div class=\"x-color-picker-portal-alpha\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"x-color-picker-portal-type\">\r\n <x-tabs animated=\"false\" justify=\"center\">\r\n <x-tab label=\"HEX\">\r\n <div class=\"x-color-picker-portal-type-content\">\r\n <x-input [style.width.%]=\"100\" [(ngModel)]=\"hex\" (ngModelChange)=\"hexChange()\"></x-input>\r\n </div>\r\n </x-tab>\r\n <x-tab label=\"RGBA\">\r\n <div class=\"x-color-picker-portal-type-content\">\r\n <x-input [(ngModel)]=\"rgba().r\" disabled></x-input>\r\n <x-input [(ngModel)]=\"rgba().g\" disabled></x-input>\r\n <x-input [(ngModel)]=\"rgba().b\" disabled></x-input>\r\n <x-input [(ngModel)]=\"rgba().a\" disabled></x-input>\r\n </div>\r\n </x-tab>\r\n <x-tab label=\"HSLA\">\r\n <div class=\"x-color-picker-portal-type-content\">\r\n <x-input [(ngModel)]=\"hsla().h\" disabled></x-input>\r\n <x-input [(ngModel)]=\"hsla().sp\" disabled></x-input>\r\n <x-input [(ngModel)]=\"hsla().lp\" disabled></x-input>\r\n <x-input [(ngModel)]=\"hsla().a\" disabled></x-input>\r\n </div>\r\n </x-tab>\r\n </x-tabs>\r\n </div>\r\n <div class=\"x-color-picker-panel\">\r\n <ng-container *ngTemplateOutlet=\"panelTemplate()!\"></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.x-color-picker-portal{margin:.0625rem 0;font-size:var(--x-font-size);color:var(--x-text);border-radius:var(--x-border-small-radius);box-shadow:var(--x-box-shadow);background-color:var(--x-background-100);width:17rem;overflow:hidden}.x-color-picker-portal:focus{outline:none}.x-color-picker-portal-panel{padding:.375rem;margin:-.375rem}.x-color-picker-portal-plate{width:100%;height:8rem;display:flex;border-radius:var(--x-border-small-radius);position:relative}.x-color-picker-portal-white,.x-color-picker-portal-black{position:absolute;inset:0}.x-color-picker-portal-white{background:linear-gradient(90deg,#fff,#fff0)}.x-color-picker-portal-black{background:linear-gradient(0deg,#000,transparent)}.x-color-picker-portal-cursor{position:absolute;width:.75rem;height:.75rem;display:inline-block;border-radius:50%;border:.0625rem solid var(--x-background-100)}.x-color-picker-portal-tool{padding:.4rem}.x-color-picker-portal-operations{display:flex;align-items:center;padding:.4rem 0}.x-color-picker-portal-selected{margin-left:.4rem;width:2rem;height:2rem;border-radius:2rem;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.x-color-picker-portal-selected>div{width:2rem;height:2rem;border-radius:2rem}.x-color-picker-portal-area{margin-left:.4rem;position:relative;flex:1}.x-color-picker-portal-area .x-slider-select:hover:not(.x-disabled) .x-slider-select-process{background-color:transparent}.x-color-picker-portal-area .x-slider-select>.x-slider-select-inner .x-slider-select-rail{height:.75rem}.x-color-picker-portal-area .x-slider-select>.x-slider-select-inner .x-slider-select-process{background-color:transparent}.x-color-picker-portal-area .x-slider-select>.x-slider-select-inner>.x-slider-select-drags>.x-slider-select-drag>.x-slider-select-button{border-color:var(--x-border);box-shadow:var(--x-box-shadow)}.x-color-picker-portal-slider{position:relative;width:100%;display:flex;align-items:center}.x-color-picker-portal-slider .x-slider-select>.x-slider-select-inner>.x-slider-select-rail{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.x-color-picker-portal-transparent{position:relative;width:100%;display:flex;align-items:center}.x-color-picker-portal-transparent .x-slider-select>.x-slider-select-inner>.x-slider-select-rail{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.x-color-picker-portal-type .x-tabs .x-tabs-list{display:flex;justify-content:center}.x-color-picker-portal-type-content{padding:.25rem;display:flex}.x-color-picker-portal-type-content .x-input .x-input-row input{text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: XSliderSelectComponent, selector: "x-slider-select" }, { kind: "component", type: XTabsComponent, selector: "x-tabs" }, { kind: "component", type: XTabComponent, selector: "x-tab" }, { kind: "component", type: XInputComponent, selector: "x-input" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
555
565
|
}
|
|
556
566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XColorPickerPortalComponent, decorators: [{
|
|
557
567
|
type: Component,
|
|
@@ -572,10 +582,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImpor
|
|
|
572
582
|
args: ['animate.leave']
|
|
573
583
|
}], done: [{
|
|
574
584
|
type: HostListener,
|
|
575
|
-
args: ['animationend'
|
|
585
|
+
args: ['animationend']
|
|
576
586
|
}], start: [{
|
|
577
587
|
type: HostListener,
|
|
578
|
-
args: ['animationstart'
|
|
588
|
+
args: ['animationstart']
|
|
579
589
|
}], panelRef: [{ type: i0.ViewChild, args: ['panelRef', { ...{ read: (ElementRef) }, isSignal: true }] }], plateRef: [{ type: i0.ViewChild, args: ['plateRef', { ...{ read: (ElementRef) }, isSignal: true }] }], transparentCom: [{ type: i0.ViewChild, args: ['transparentCom', { ...{ read: XSliderSelectComponent }, isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], inputCom: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputCom", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], panelTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelTemplate", required: false }] }], animating: [{ type: i0.Output, args: ["animating"] }], nodeClick: [{ type: i0.Output, args: ["nodeClick"] }] } });
|
|
580
590
|
|
|
581
591
|
const XColorPickerColorMap = {
|
|
@@ -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.
|
|
750
|
+
this.inputStyleComputed = computed(() => ({
|
|
741
751
|
backgroundColor: this.value(),
|
|
742
|
-
color: 'transparent'
|
|
743
|
-
|
|
744
|
-
|
|
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.
|
|
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.
|
|
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]=\"
|
|
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]=\"
|
|
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 {
|
|
@@ -921,7 +941,7 @@ class XColorPickerOptionDirective {
|
|
|
921
941
|
this.colorPicker.onChange(this.colorPicker.value());
|
|
922
942
|
}
|
|
923
943
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XColorPickerOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
924
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.5", type: XColorPickerOptionDirective, isStandalone: true, selector: "[x-color-picker-option], x-color-picker-option", inputs: { color: { classPropertyName: "color", publicName: "x-color-picker-option", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onSelectClick(
|
|
944
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.5", type: XColorPickerOptionDirective, isStandalone: true, selector: "[x-color-picker-option], x-color-picker-option", inputs: { color: { classPropertyName: "color", publicName: "x-color-picker-option", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "click": "onSelectClick()" } }, ngImport: i0 }); }
|
|
925
945
|
}
|
|
926
946
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XColorPickerOptionDirective, decorators: [{
|
|
927
947
|
type: Directive,
|
|
@@ -930,7 +950,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImpor
|
|
|
930
950
|
}]
|
|
931
951
|
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "x-color-picker-option", required: true }] }], onSelectClick: [{
|
|
932
952
|
type: HostListener,
|
|
933
|
-
args: ['click'
|
|
953
|
+
args: ['click']
|
|
934
954
|
}] } });
|
|
935
955
|
|
|
936
956
|
class XColorPickerModule {
|