@exhaustive-ui/core 3.0.0-alpha.0 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
- package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-api.mjs +6 -13
- package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs +485 -683
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
- package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
- package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
- package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
- package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
- package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-carousel.mjs +379 -451
- package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
- package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
- package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
- package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +157 -332
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +187 -210
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs +315 -361
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
- package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-datepicker.mjs +1012 -1157
- package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs +370 -507
- package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
- package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
- package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
- package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
- package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fileupload.mjs +486 -541
- package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
- package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
- package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
- package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
- package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inplace.mjs +64 -98
- package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
- package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
- package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
- package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
- package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
- package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-listbox.mjs +365 -546
- package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-megamenu.mjs +320 -371
- package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
- package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
- package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
- package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-multiselect.mjs +647 -835
- package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
- package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
- package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
- package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
- package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-picklist.mjs +557 -655
- package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
- package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
- package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
- package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-select.mjs +581 -784
- package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
- package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
- package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
- package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
- package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
- package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-table.mjs +2213 -2543
- package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
- package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
- package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +318 -394
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
- package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
- package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
- package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
- package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treeselect.mjs +327 -421
- package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
- package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
- package/package.json +5 -5
- package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
- package/schematics/migrations/renamed-inputs/migration.js +97 -0
- package/schematics/migrations/styleclass-to-class/migration.js +92 -1
- package/schematics/migrations.json +7 -2
- package/schematics/utils/removed-inputs.js +0 -0
- package/schematics/utils/renamed-inputs.js +175 -0
- package/schematics/utils/styleclass.js +24 -8
- package/schematics/utils/versions.json +8 -8
- package/types/exhaustive-ui-core-accordion.d.ts +8 -24
- package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
- package/types/exhaustive-ui-core-api.d.ts +2 -3
- package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
- package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
- package/types/exhaustive-ui-core-avatar.d.ts +18 -25
- package/types/exhaustive-ui-core-badge.d.ts +13 -27
- package/types/exhaustive-ui-core-blockui.d.ts +18 -30
- package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
- package/types/exhaustive-ui-core-button.d.ts +57 -89
- package/types/exhaustive-ui-core-carousel.d.ts +56 -82
- package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
- package/types/exhaustive-ui-core-chart.d.ts +21 -29
- package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
- package/types/exhaustive-ui-core-chip.d.ts +31 -38
- package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
- package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
- package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
- package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
- package/types/exhaustive-ui-core-dataview.d.ts +42 -65
- package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
- package/types/exhaustive-ui-core-dialog.d.ts +73 -123
- package/types/exhaustive-ui-core-dock.d.ts +16 -25
- package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
- package/types/exhaustive-ui-core-drawer.d.ts +32 -64
- package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
- package/types/exhaustive-ui-core-editor.d.ts +15 -25
- package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
- package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
- package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
- package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
- package/types/exhaustive-ui-core-galleria.d.ts +124 -194
- package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
- package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
- package/types/exhaustive-ui-core-image.d.ts +35 -68
- package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
- package/types/exhaustive-ui-core-inplace.d.ts +30 -42
- package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
- package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
- package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
- package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
- package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
- package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
- package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
- package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
- package/types/exhaustive-ui-core-knob.d.ts +45 -60
- package/types/exhaustive-ui-core-listbox.d.ts +90 -126
- package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
- package/types/exhaustive-ui-core-menu.d.ts +33 -53
- package/types/exhaustive-ui-core-menubar.d.ts +38 -85
- package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
- package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
- package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
- package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
- package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
- package/types/exhaustive-ui-core-paginator.d.ts +41 -69
- package/types/exhaustive-ui-core-panel.d.ts +18 -45
- package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
- package/types/exhaustive-ui-core-password.d.ts +56 -93
- package/types/exhaustive-ui-core-picklist.d.ts +107 -121
- package/types/exhaustive-ui-core-popover.d.ts +23 -47
- package/types/exhaustive-ui-core-rating.d.ts +18 -26
- package/types/exhaustive-ui-core-scroller.d.ts +90 -120
- package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
- package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
- package/types/exhaustive-ui-core-select.d.ts +137 -188
- package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
- package/types/exhaustive-ui-core-slider.d.ts +52 -67
- package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
- package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
- package/types/exhaustive-ui-core-splitter.d.ts +47 -59
- package/types/exhaustive-ui-core-steps.d.ts +24 -31
- package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
- package/types/exhaustive-ui-core-table.d.ts +349 -453
- package/types/exhaustive-ui-core-terminal.d.ts +10 -22
- package/types/exhaustive-ui-core-textarea.d.ts +7 -10
- package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
- package/types/exhaustive-ui-core-timeline.d.ts +20 -28
- package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
- package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
- package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
- package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
- package/types/exhaustive-ui-core-tree.d.ts +82 -119
- package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
- package/types/exhaustive-ui-core-treetable.d.ts +203 -280
- package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from '@exhaustive-ui/core/types/colorpicker';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, forwardRef,
|
|
3
|
+
import { Injectable, forwardRef, inject, afterEveryRender, afterNextRender, input, booleanAttribute, output, viewChild, computed, signal, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
-
import {
|
|
5
|
+
import { TranslationKeys, SharedModule } from '@exhaustive-ui/core/api';
|
|
6
6
|
import * as i2 from '@exhaustive-ui/core/autofocus';
|
|
7
7
|
import { AutoFocusModule } from '@exhaustive-ui/core/autofocus';
|
|
8
8
|
import { PARENT_INSTANCE } from '@exhaustive-ui/core/basecomponent';
|
|
@@ -17,12 +17,12 @@ import { style } from '@exhaustive-ui/styles/colorpicker';
|
|
|
17
17
|
import { BaseStyle } from '@exhaustive-ui/core/base';
|
|
18
18
|
|
|
19
19
|
const classes = {
|
|
20
|
-
root: ({ instance }) => ['p-colorpicker p-component', { 'p-colorpicker-overlay': !instance.inline, 'p-colorpicker-dragging': instance.colorDragging || instance.hueDragging }],
|
|
20
|
+
root: ({ instance }) => ['p-colorpicker p-component', { 'p-colorpicker-overlay': !instance.inline(), 'p-colorpicker-dragging': instance.colorDragging() || instance.hueDragging() }],
|
|
21
21
|
preview: ({ instance }) => ['p-colorpicker-preview', { 'p-disabled': instance.$disabled() }],
|
|
22
22
|
panel: ({ instance }) => [
|
|
23
23
|
'p-colorpicker-panel',
|
|
24
24
|
{
|
|
25
|
-
'p-colorpicker-panel-inline': instance.inline,
|
|
25
|
+
'p-colorpicker-panel-inline': instance.inline(),
|
|
26
26
|
'p-disabled': instance.$disabled()
|
|
27
27
|
}
|
|
28
28
|
],
|
|
@@ -93,72 +93,62 @@ const COLORPICKER_VALUE_ACCESSOR = {
|
|
|
93
93
|
useExisting: forwardRef(() => ColorPicker),
|
|
94
94
|
multi: true
|
|
95
95
|
};
|
|
96
|
-
const COLORPICKER_INSTANCE = new InjectionToken('COLORPICKER_INSTANCE');
|
|
97
96
|
/**
|
|
98
97
|
* ColorPicker groups a collection of contents in tabs.
|
|
99
98
|
* @group Components
|
|
100
99
|
*/
|
|
101
100
|
class ColorPicker extends BaseEditableHolder {
|
|
102
|
-
overlayService = inject(OverlayService);
|
|
103
101
|
componentName = 'ColorPicker';
|
|
104
|
-
$pcColorPicker = inject(COLORPICKER_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
105
102
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
constructor() {
|
|
104
|
+
super();
|
|
105
|
+
afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
|
|
106
|
+
afterNextRender(() => {
|
|
107
|
+
if (this.inline()) {
|
|
108
|
+
this.updateColorSelector();
|
|
109
|
+
this.updateUI();
|
|
110
|
+
}
|
|
111
|
+
});
|
|
108
112
|
}
|
|
109
|
-
/**
|
|
110
|
-
* Style class of the component.
|
|
111
|
-
* @deprecated since v20.0.0, use `class` instead.
|
|
112
|
-
* @group Props
|
|
113
|
-
*/
|
|
114
|
-
styleClass;
|
|
115
|
-
/**
|
|
116
|
-
* Transition options of the show animation.
|
|
117
|
-
* @group Props
|
|
118
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
119
|
-
*/
|
|
120
|
-
showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
|
121
|
-
/**
|
|
122
|
-
* Transition options of the hide animation.
|
|
123
|
-
* @group Props
|
|
124
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
125
|
-
*/
|
|
126
|
-
hideTransitionOptions = '.1s linear';
|
|
127
113
|
/**
|
|
128
114
|
* Whether to display as an overlay or not.
|
|
129
115
|
* @group Props
|
|
130
116
|
*/
|
|
131
|
-
inline;
|
|
117
|
+
inline = input(undefined, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
132
118
|
/**
|
|
133
119
|
* Format to use in value binding.
|
|
134
120
|
* @group Props
|
|
135
121
|
*/
|
|
136
|
-
format = 'hex'
|
|
122
|
+
format = input('hex', /* @ts-ignore */
|
|
123
|
+
...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
|
|
137
124
|
/**
|
|
138
125
|
* Index of the element in tabbing order.
|
|
139
126
|
* @group Props
|
|
140
127
|
*/
|
|
141
|
-
tabindex
|
|
128
|
+
tabindex = input(undefined, /* @ts-ignore */
|
|
129
|
+
...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
142
130
|
/**
|
|
143
131
|
* Identifier of the focus input to match a label defined for the dropdown.
|
|
144
132
|
* @group Props
|
|
145
133
|
*/
|
|
146
|
-
inputId
|
|
134
|
+
inputId = input(undefined, /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
147
136
|
/**
|
|
148
137
|
* Whether to automatically manage layering.
|
|
149
138
|
* @group Props
|
|
150
139
|
*/
|
|
151
|
-
autoZIndex = true;
|
|
140
|
+
autoZIndex = input(true, { ...(ngDevMode ? { debugName: "autoZIndex" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
152
141
|
/**
|
|
153
142
|
* When present, it specifies that the component should automatically get focus on load.
|
|
154
143
|
* @group Props
|
|
155
144
|
*/
|
|
156
|
-
autofocus;
|
|
145
|
+
autofocus = input(undefined, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
157
146
|
/**
|
|
158
147
|
* Default color to display initially when model value is not present.
|
|
159
148
|
* @group Props
|
|
160
149
|
*/
|
|
161
|
-
defaultColor = 'ff0000'
|
|
150
|
+
defaultColor = input('ff0000', /* @ts-ignore */
|
|
151
|
+
...(ngDevMode ? [{ debugName: "defaultColor" }] : /* istanbul ignore next */ []));
|
|
162
152
|
/**
|
|
163
153
|
* Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
|
|
164
154
|
* @defaultValue 'self'
|
|
@@ -198,34 +188,29 @@ class ColorPicker extends BaseEditableHolder {
|
|
|
198
188
|
...(ngDevMode ? [{ debugName: "overlayViewChild" }] : /* istanbul ignore next */ []));
|
|
199
189
|
$appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), /* @ts-ignore */
|
|
200
190
|
...(ngDevMode ? [{ debugName: "$appendTo" }] : /* istanbul ignore next */ []));
|
|
201
|
-
value = { h: 0, s: 100, b: 100 }
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
191
|
+
value = signal({ h: 0, s: 100, b: 100 }, /* @ts-ignore */
|
|
192
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
193
|
+
inputBgColor = computed(() => '#' + this.HSBtoHEX(this.value()), /* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [{ debugName: "inputBgColor" }] : /* istanbul ignore next */ []));
|
|
195
|
+
overlayVisible = signal(undefined, /* @ts-ignore */
|
|
196
|
+
...(ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []));
|
|
197
|
+
documentMousemoveListener = signal(undefined, /* @ts-ignore */
|
|
198
|
+
...(ngDevMode ? [{ debugName: "documentMousemoveListener" }] : /* istanbul ignore next */ []));
|
|
199
|
+
documentMouseupListener = signal(undefined, /* @ts-ignore */
|
|
200
|
+
...(ngDevMode ? [{ debugName: "documentMouseupListener" }] : /* istanbul ignore next */ []));
|
|
201
|
+
colorDragging = signal(undefined, /* @ts-ignore */
|
|
202
|
+
...(ngDevMode ? [{ debugName: "colorDragging" }] : /* istanbul ignore next */ []));
|
|
203
|
+
hueDragging = signal(undefined, /* @ts-ignore */
|
|
204
|
+
...(ngDevMode ? [{ debugName: "hueDragging" }] : /* istanbul ignore next */ []));
|
|
205
|
+
colorSelectorViewChild = viewChild('colorSelector', /* @ts-ignore */
|
|
206
|
+
...(ngDevMode ? [{ debugName: "colorSelectorViewChild" }] : /* istanbul ignore next */ []));
|
|
207
|
+
colorHandleViewChild = viewChild('colorHandle', /* @ts-ignore */
|
|
208
|
+
...(ngDevMode ? [{ debugName: "colorHandleViewChild" }] : /* istanbul ignore next */ []));
|
|
209
|
+
hueViewChild = viewChild('hue', /* @ts-ignore */
|
|
210
|
+
...(ngDevMode ? [{ debugName: "hueViewChild" }] : /* istanbul ignore next */ []));
|
|
211
|
+
hueHandleViewChild = viewChild('hueHandle', /* @ts-ignore */
|
|
212
|
+
...(ngDevMode ? [{ debugName: "hueHandleViewChild" }] : /* istanbul ignore next */ []));
|
|
216
213
|
_componentStyle = inject(ColorPickerStyle);
|
|
217
|
-
set colorSelector(element) {
|
|
218
|
-
this.colorSelectorViewChild = element;
|
|
219
|
-
}
|
|
220
|
-
set colorHandle(element) {
|
|
221
|
-
this.colorHandleViewChild = element;
|
|
222
|
-
}
|
|
223
|
-
set hue(element) {
|
|
224
|
-
this.hueViewChild = element;
|
|
225
|
-
}
|
|
226
|
-
set hueHandle(element) {
|
|
227
|
-
this.hueHandleViewChild = element;
|
|
228
|
-
}
|
|
229
214
|
get ariaLabel() {
|
|
230
215
|
return this.config?.getTranslation(TranslationKeys.ARIA)[TranslationKeys.SELECT_COLOR];
|
|
231
216
|
}
|
|
@@ -235,32 +220,32 @@ class ColorPicker extends BaseEditableHolder {
|
|
|
235
220
|
}
|
|
236
221
|
this.bindDocumentMousemoveListener();
|
|
237
222
|
this.bindDocumentMouseupListener();
|
|
238
|
-
this.hueDragging
|
|
223
|
+
this.hueDragging.set(true);
|
|
239
224
|
this.pickHue(event);
|
|
240
225
|
}
|
|
241
226
|
onHueDragStart(event) {
|
|
242
227
|
if (this.$disabled()) {
|
|
243
228
|
return;
|
|
244
229
|
}
|
|
245
|
-
this.hueDragging
|
|
230
|
+
this.hueDragging.set(true);
|
|
246
231
|
this.pickHue(event, event.changedTouches[0]);
|
|
247
232
|
}
|
|
248
233
|
onColorDragStart(event) {
|
|
249
234
|
if (this.$disabled()) {
|
|
250
235
|
return;
|
|
251
236
|
}
|
|
252
|
-
this.colorDragging
|
|
237
|
+
this.colorDragging.set(true);
|
|
253
238
|
this.pickColor(event, event.changedTouches[0]);
|
|
254
239
|
this.el.nativeElement.setAttribute('p-colorpicker-dragging', 'true');
|
|
255
240
|
}
|
|
256
241
|
pickHue(event, position) {
|
|
257
242
|
let pageY = position ? position.pageY : event.pageY;
|
|
258
|
-
let top = this.hueViewChild?.nativeElement.getBoundingClientRect().top + (this.document.defaultView.pageYOffset || this.document.documentElement.scrollTop || this.document.body.scrollTop || 0);
|
|
259
|
-
this.value
|
|
243
|
+
let top = this.hueViewChild()?.nativeElement.getBoundingClientRect().top + (this.document.defaultView.pageYOffset || this.document.documentElement.scrollTop || this.document.body.scrollTop || 0);
|
|
244
|
+
this.value.set(this.validateHSB({
|
|
260
245
|
h: Math.floor((360 * (150 - Math.max(0, Math.min(150, pageY - top)))) / 150),
|
|
261
|
-
s: this.value.s,
|
|
262
|
-
b: this.value.b
|
|
263
|
-
});
|
|
246
|
+
s: this.value().s,
|
|
247
|
+
b: this.value().b
|
|
248
|
+
}));
|
|
264
249
|
this.updateColorSelector();
|
|
265
250
|
this.updateUI();
|
|
266
251
|
this.updateModel();
|
|
@@ -272,22 +257,22 @@ class ColorPicker extends BaseEditableHolder {
|
|
|
272
257
|
}
|
|
273
258
|
this.bindDocumentMousemoveListener();
|
|
274
259
|
this.bindDocumentMouseupListener();
|
|
275
|
-
this.colorDragging
|
|
260
|
+
this.colorDragging.set(true);
|
|
276
261
|
this.pickColor(event);
|
|
277
262
|
}
|
|
278
263
|
onDrag(event) {
|
|
279
|
-
if (this.colorDragging) {
|
|
264
|
+
if (this.colorDragging()) {
|
|
280
265
|
this.pickColor(event, event.changedTouches[0]);
|
|
281
266
|
event.preventDefault();
|
|
282
267
|
}
|
|
283
|
-
if (this.hueDragging) {
|
|
268
|
+
if (this.hueDragging()) {
|
|
284
269
|
this.pickHue(event, event.changedTouches[0]);
|
|
285
270
|
event.preventDefault();
|
|
286
271
|
}
|
|
287
272
|
}
|
|
288
273
|
onDragEnd() {
|
|
289
|
-
this.colorDragging
|
|
290
|
-
this.hueDragging
|
|
274
|
+
this.colorDragging.set(false);
|
|
275
|
+
this.hueDragging.set(false);
|
|
291
276
|
this.el.nativeElement.setAttribute('p-colorpicker-dragging', 'false');
|
|
292
277
|
this.unbindDocumentMousemoveListener();
|
|
293
278
|
this.unbindDocumentMouseupListener();
|
|
@@ -295,84 +280,83 @@ class ColorPicker extends BaseEditableHolder {
|
|
|
295
280
|
pickColor(event, position) {
|
|
296
281
|
let pageX = position ? position.pageX : event.pageX;
|
|
297
282
|
let pageY = position ? position.pageY : event.pageY;
|
|
298
|
-
let rect = this.colorSelectorViewChild?.nativeElement.getBoundingClientRect();
|
|
283
|
+
let rect = this.colorSelectorViewChild()?.nativeElement.getBoundingClientRect();
|
|
299
284
|
let top = rect.top + (this.document.defaultView.pageYOffset || this.document.documentElement.scrollTop || this.document.body.scrollTop || 0);
|
|
300
285
|
let left = rect.left + this.document.body.scrollLeft;
|
|
301
286
|
let saturation = Math.floor((100 * Math.max(0, Math.min(150, pageX - left))) / 150);
|
|
302
287
|
let brightness = Math.floor((100 * (150 - Math.max(0, Math.min(150, pageY - top)))) / 150);
|
|
303
|
-
this.value
|
|
304
|
-
h: this.value.h,
|
|
288
|
+
this.value.set(this.validateHSB({
|
|
289
|
+
h: this.value().h,
|
|
305
290
|
s: saturation,
|
|
306
291
|
b: brightness
|
|
307
|
-
});
|
|
292
|
+
}));
|
|
308
293
|
this.updateUI();
|
|
309
294
|
this.updateModel();
|
|
310
295
|
this.onChange.emit({ originalEvent: event, value: this.getValueToUpdate() });
|
|
311
296
|
}
|
|
312
297
|
getValueToUpdate() {
|
|
313
298
|
let val;
|
|
314
|
-
switch (this.format) {
|
|
299
|
+
switch (this.format()) {
|
|
315
300
|
case 'hex':
|
|
316
|
-
val = '#' + this.HSBtoHEX(this.value);
|
|
301
|
+
val = '#' + this.HSBtoHEX(this.value());
|
|
317
302
|
break;
|
|
318
303
|
case 'rgb':
|
|
319
|
-
val = this.HSBtoRGB(this.value);
|
|
304
|
+
val = this.HSBtoRGB(this.value());
|
|
320
305
|
break;
|
|
321
306
|
case 'hsb':
|
|
322
|
-
val = this.value;
|
|
307
|
+
val = this.value();
|
|
323
308
|
break;
|
|
324
309
|
}
|
|
325
310
|
return val;
|
|
326
311
|
}
|
|
327
312
|
updateModel() {
|
|
328
313
|
this.onModelChange(this.getValueToUpdate());
|
|
329
|
-
this.cd.markForCheck();
|
|
330
314
|
}
|
|
331
315
|
updateColorSelector() {
|
|
332
|
-
|
|
316
|
+
const colorSelectorEl = this.colorSelectorViewChild();
|
|
317
|
+
if (colorSelectorEl) {
|
|
333
318
|
const hsb = {};
|
|
334
319
|
hsb.s = 100;
|
|
335
320
|
hsb.b = 100;
|
|
336
|
-
hsb.h = this.value.h;
|
|
337
|
-
|
|
321
|
+
hsb.h = this.value().h;
|
|
322
|
+
colorSelectorEl.nativeElement.style.backgroundColor = '#' + this.HSBtoHEX(hsb);
|
|
338
323
|
}
|
|
339
324
|
}
|
|
340
325
|
updateUI() {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
326
|
+
const colorHandleEl = this.colorHandleViewChild();
|
|
327
|
+
const hueHandleEl = this.hueHandleViewChild();
|
|
328
|
+
if (colorHandleEl && hueHandleEl?.nativeElement) {
|
|
329
|
+
colorHandleEl.nativeElement.style.left = Math.floor((150 * this.value().s) / 100) + 'px';
|
|
330
|
+
colorHandleEl.nativeElement.style.top = Math.floor((150 * (100 - this.value().b)) / 100) + 'px';
|
|
331
|
+
hueHandleEl.nativeElement.style.top = Math.floor(150 - (150 * this.value().h) / 360) + 'px';
|
|
345
332
|
}
|
|
346
|
-
this.inputBgColor = '#' + this.HSBtoHEX(this.value);
|
|
347
333
|
}
|
|
348
334
|
onInputFocus() {
|
|
349
335
|
this.onModelTouched();
|
|
350
336
|
}
|
|
351
337
|
show() {
|
|
352
|
-
this.overlayVisible
|
|
353
|
-
this.cd.markForCheck();
|
|
338
|
+
this.overlayVisible.set(true);
|
|
354
339
|
}
|
|
355
340
|
onOverlayBeforeEnter() {
|
|
356
|
-
if (!this.inline) {
|
|
341
|
+
if (!this.inline()) {
|
|
357
342
|
this.updateColorSelector();
|
|
358
343
|
this.updateUI();
|
|
359
344
|
this.onShow.emit({});
|
|
360
345
|
}
|
|
361
346
|
}
|
|
362
347
|
onOverlayAfterLeave() {
|
|
363
|
-
if (!this.inline) {
|
|
348
|
+
if (!this.inline()) {
|
|
364
349
|
this.onHide.emit({});
|
|
365
350
|
}
|
|
366
351
|
}
|
|
367
352
|
hide() {
|
|
368
|
-
this.overlayVisible
|
|
369
|
-
this.cd.markForCheck();
|
|
353
|
+
this.overlayVisible.set(false);
|
|
370
354
|
}
|
|
371
355
|
onInputClick() {
|
|
372
356
|
this.togglePanel();
|
|
373
357
|
}
|
|
374
358
|
togglePanel() {
|
|
375
|
-
if (!this.overlayVisible)
|
|
359
|
+
if (!this.overlayVisible())
|
|
376
360
|
this.show();
|
|
377
361
|
else
|
|
378
362
|
this.hide();
|
|
@@ -392,46 +376,42 @@ class ColorPicker extends BaseEditableHolder {
|
|
|
392
376
|
break;
|
|
393
377
|
}
|
|
394
378
|
}
|
|
395
|
-
onOverlayClick(event) {
|
|
396
|
-
this.overlayService.add({
|
|
397
|
-
originalEvent: event,
|
|
398
|
-
target: this.el.nativeElement
|
|
399
|
-
});
|
|
400
|
-
}
|
|
401
379
|
bindDocumentMousemoveListener() {
|
|
402
|
-
if (!this.documentMousemoveListener) {
|
|
380
|
+
if (!this.documentMousemoveListener()) {
|
|
403
381
|
const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
|
|
404
|
-
this.documentMousemoveListener
|
|
405
|
-
if (this.colorDragging) {
|
|
382
|
+
this.documentMousemoveListener.set(this.renderer.listen(documentTarget, 'mousemove', (event) => {
|
|
383
|
+
if (this.colorDragging()) {
|
|
406
384
|
this.pickColor(event);
|
|
407
385
|
}
|
|
408
|
-
if (this.hueDragging) {
|
|
386
|
+
if (this.hueDragging()) {
|
|
409
387
|
this.pickHue(event);
|
|
410
388
|
}
|
|
411
|
-
});
|
|
389
|
+
}));
|
|
412
390
|
}
|
|
413
391
|
}
|
|
414
392
|
unbindDocumentMousemoveListener() {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
393
|
+
const documentMousemoveListener = this.documentMousemoveListener();
|
|
394
|
+
if (documentMousemoveListener) {
|
|
395
|
+
documentMousemoveListener();
|
|
396
|
+
this.documentMousemoveListener.set(null);
|
|
418
397
|
}
|
|
419
398
|
}
|
|
420
399
|
bindDocumentMouseupListener() {
|
|
421
|
-
if (!this.documentMouseupListener) {
|
|
400
|
+
if (!this.documentMouseupListener()) {
|
|
422
401
|
const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
|
|
423
|
-
this.documentMouseupListener
|
|
424
|
-
this.colorDragging
|
|
425
|
-
this.hueDragging
|
|
402
|
+
this.documentMouseupListener.set(this.renderer.listen(documentTarget, 'mouseup', () => {
|
|
403
|
+
this.colorDragging.set(false);
|
|
404
|
+
this.hueDragging.set(false);
|
|
426
405
|
this.unbindDocumentMousemoveListener();
|
|
427
406
|
this.unbindDocumentMouseupListener();
|
|
428
|
-
});
|
|
407
|
+
}));
|
|
429
408
|
}
|
|
430
409
|
}
|
|
431
410
|
unbindDocumentMouseupListener() {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
411
|
+
const documentMouseupListener = this.documentMouseupListener();
|
|
412
|
+
if (documentMouseupListener) {
|
|
413
|
+
documentMouseupListener();
|
|
414
|
+
this.documentMouseupListener.set(null);
|
|
435
415
|
}
|
|
436
416
|
}
|
|
437
417
|
validateHSB(hsb) {
|
|
@@ -575,12 +555,6 @@ class ColorPicker extends BaseEditableHolder {
|
|
|
575
555
|
HSBtoHEX(hsb) {
|
|
576
556
|
return this.RGBtoHEX(this.HSBtoRGB(hsb));
|
|
577
557
|
}
|
|
578
|
-
onAfterViewInit() {
|
|
579
|
-
if (this.inline) {
|
|
580
|
-
this.updateColorSelector();
|
|
581
|
-
this.updateUI();
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
558
|
/**
|
|
585
559
|
* @override
|
|
586
560
|
*
|
|
@@ -589,51 +563,46 @@ class ColorPicker extends BaseEditableHolder {
|
|
|
589
563
|
*/
|
|
590
564
|
writeControlValue(value) {
|
|
591
565
|
if (value) {
|
|
592
|
-
switch (this.format) {
|
|
566
|
+
switch (this.format()) {
|
|
593
567
|
case 'hex':
|
|
594
|
-
this.value
|
|
568
|
+
this.value.set(this.HEXtoHSB(value));
|
|
595
569
|
break;
|
|
596
570
|
case 'rgb':
|
|
597
|
-
this.value
|
|
571
|
+
this.value.set(this.RGBtoHSB(value));
|
|
598
572
|
break;
|
|
599
573
|
case 'hsb':
|
|
600
|
-
this.value
|
|
574
|
+
this.value.set(value);
|
|
601
575
|
break;
|
|
602
576
|
}
|
|
603
577
|
}
|
|
604
578
|
else {
|
|
605
|
-
this.value
|
|
579
|
+
this.value.set(this.HEXtoHSB(this.defaultColor()));
|
|
606
580
|
}
|
|
607
581
|
this.updateColorSelector();
|
|
608
582
|
this.updateUI();
|
|
609
|
-
this.cd.markForCheck();
|
|
610
583
|
}
|
|
611
584
|
onDestroy() {
|
|
612
|
-
if (this.
|
|
613
|
-
this.scrollHandler.destroy();
|
|
614
|
-
this.scrollHandler = null;
|
|
615
|
-
}
|
|
616
|
-
if (this.autoZIndex) {
|
|
585
|
+
if (this.autoZIndex()) {
|
|
617
586
|
ZIndexUtils.clear(this.overlayViewChild().nativeElement);
|
|
618
587
|
}
|
|
619
588
|
}
|
|
620
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ColorPicker, deps:
|
|
621
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ColorPicker, isStandalone: true, selector: "p-colorPicker, p-colorpicker, p-color-picker", inputs: {
|
|
622
|
-
@if (!inline) {
|
|
589
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ColorPicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
590
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ColorPicker, isStandalone: true, selector: "p-colorPicker, p-colorpicker, p-color-picker", inputs: { inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, defaultColor: { classPropertyName: "defaultColor", publicName: "defaultColor", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange", onShow: "onShow", onHide: "onHide" }, host: { properties: { "class": "cx('root')" } }, providers: [COLORPICKER_VALUE_ACCESSOR, ColorPickerStyle, { provide: PARENT_INSTANCE, useExisting: ColorPicker }], viewQueries: [{ propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true, isSignal: true }, { propertyName: "colorSelectorViewChild", first: true, predicate: ["colorSelector"], descendants: true, isSignal: true }, { propertyName: "colorHandleViewChild", first: true, predicate: ["colorHandle"], descendants: true, isSignal: true }, { propertyName: "hueViewChild", first: true, predicate: ["hue"], descendants: true, isSignal: true }, { propertyName: "hueHandleViewChild", first: true, predicate: ["hueHandle"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
591
|
+
@if (!inline()) {
|
|
623
592
|
<input
|
|
624
593
|
#input
|
|
625
594
|
type="text"
|
|
626
595
|
[class]="cx('preview')"
|
|
627
596
|
readonly
|
|
628
|
-
[attr.tabindex]="tabindex"
|
|
597
|
+
[attr.tabindex]="tabindex()"
|
|
629
598
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
630
599
|
(click)="onInputClick()"
|
|
631
600
|
(keydown)="onInputKeydown($event)"
|
|
632
601
|
(focus)="onInputFocus()"
|
|
633
|
-
[attr.id]="inputId"
|
|
634
|
-
[style.backgroundColor]="inputBgColor"
|
|
602
|
+
[attr.id]="inputId()"
|
|
603
|
+
[style.backgroundColor]="inputBgColor()"
|
|
635
604
|
[attr.aria-label]="ariaLabel"
|
|
636
|
-
[pAutoFocus]="autofocus"
|
|
605
|
+
[pAutoFocus]="autofocus()"
|
|
637
606
|
[pBind]="ptm('preview')"
|
|
638
607
|
/>
|
|
639
608
|
}
|
|
@@ -644,7 +613,7 @@ class ColorPicker extends BaseEditableHolder {
|
|
|
644
613
|
[(visible)]="overlayVisible"
|
|
645
614
|
[options]="overlayOptions()"
|
|
646
615
|
[target]="'@parent'"
|
|
647
|
-
[inline]="inline"
|
|
616
|
+
[inline]="inline()"
|
|
648
617
|
[appendTo]="$appendTo()"
|
|
649
618
|
[unstyled]="unstyled()"
|
|
650
619
|
[pt]="ptm('pcOverlay')"
|
|
@@ -674,25 +643,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
674
643
|
type: Component,
|
|
675
644
|
args: [{
|
|
676
645
|
selector: 'p-colorPicker, p-colorpicker, p-color-picker',
|
|
677
|
-
standalone: true,
|
|
678
646
|
imports: [AutoFocusModule, SharedModule, Bind, MotionModule, OverlayModule],
|
|
679
647
|
hostDirectives: [Bind],
|
|
680
648
|
template: `
|
|
681
|
-
@if (!inline) {
|
|
649
|
+
@if (!inline()) {
|
|
682
650
|
<input
|
|
683
651
|
#input
|
|
684
652
|
type="text"
|
|
685
653
|
[class]="cx('preview')"
|
|
686
654
|
readonly
|
|
687
|
-
[attr.tabindex]="tabindex"
|
|
655
|
+
[attr.tabindex]="tabindex()"
|
|
688
656
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
689
657
|
(click)="onInputClick()"
|
|
690
658
|
(keydown)="onInputKeydown($event)"
|
|
691
659
|
(focus)="onInputFocus()"
|
|
692
|
-
[attr.id]="inputId"
|
|
693
|
-
[style.backgroundColor]="inputBgColor"
|
|
660
|
+
[attr.id]="inputId()"
|
|
661
|
+
[style.backgroundColor]="inputBgColor()"
|
|
694
662
|
[attr.aria-label]="ariaLabel"
|
|
695
|
-
[pAutoFocus]="autofocus"
|
|
663
|
+
[pAutoFocus]="autofocus()"
|
|
696
664
|
[pBind]="ptm('preview')"
|
|
697
665
|
/>
|
|
698
666
|
}
|
|
@@ -703,7 +671,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
703
671
|
[(visible)]="overlayVisible"
|
|
704
672
|
[options]="overlayOptions()"
|
|
705
673
|
[target]="'@parent'"
|
|
706
|
-
[inline]="inline"
|
|
674
|
+
[inline]="inline()"
|
|
707
675
|
[appendTo]="$appendTo()"
|
|
708
676
|
[unstyled]="unstyled()"
|
|
709
677
|
[pt]="ptm('pcOverlay')"
|
|
@@ -728,49 +696,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
728
696
|
</ng-template>
|
|
729
697
|
</p-overlay>
|
|
730
698
|
`,
|
|
731
|
-
providers: [COLORPICKER_VALUE_ACCESSOR, ColorPickerStyle, { provide:
|
|
699
|
+
providers: [COLORPICKER_VALUE_ACCESSOR, ColorPickerStyle, { provide: PARENT_INSTANCE, useExisting: ColorPicker }],
|
|
732
700
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
733
701
|
encapsulation: ViewEncapsulation.None,
|
|
734
702
|
host: {
|
|
735
|
-
'[class]': "
|
|
703
|
+
'[class]': "cx('root')"
|
|
736
704
|
}
|
|
737
705
|
}]
|
|
738
|
-
}], propDecorators: {
|
|
739
|
-
type: Input
|
|
740
|
-
}], showTransitionOptions: [{
|
|
741
|
-
type: Input
|
|
742
|
-
}], hideTransitionOptions: [{
|
|
743
|
-
type: Input
|
|
744
|
-
}], inline: [{
|
|
745
|
-
type: Input,
|
|
746
|
-
args: [{ transform: booleanAttribute }]
|
|
747
|
-
}], format: [{
|
|
748
|
-
type: Input
|
|
749
|
-
}], tabindex: [{
|
|
750
|
-
type: Input
|
|
751
|
-
}], inputId: [{
|
|
752
|
-
type: Input
|
|
753
|
-
}], autoZIndex: [{
|
|
754
|
-
type: Input,
|
|
755
|
-
args: [{ transform: booleanAttribute }]
|
|
756
|
-
}], autofocus: [{
|
|
757
|
-
type: Input,
|
|
758
|
-
args: [{ transform: booleanAttribute }]
|
|
759
|
-
}], defaultColor: [{
|
|
760
|
-
type: Input
|
|
761
|
-
}], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], overlayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOptions", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], overlayViewChild: [{ type: i0.ViewChild, args: ['overlay', { isSignal: true }] }], colorSelector: [{
|
|
762
|
-
type: ViewChild,
|
|
763
|
-
args: ['colorSelector']
|
|
764
|
-
}], colorHandle: [{
|
|
765
|
-
type: ViewChild,
|
|
766
|
-
args: ['colorHandle']
|
|
767
|
-
}], hue: [{
|
|
768
|
-
type: ViewChild,
|
|
769
|
-
args: ['hue']
|
|
770
|
-
}], hueHandle: [{
|
|
771
|
-
type: ViewChild,
|
|
772
|
-
args: ['hueHandle']
|
|
773
|
-
}] } });
|
|
706
|
+
}], ctorParameters: () => [], propDecorators: { inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], autoZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoZIndex", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], defaultColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultColor", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], overlayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOptions", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], overlayViewChild: [{ type: i0.ViewChild, args: ['overlay', { isSignal: true }] }], colorSelectorViewChild: [{ type: i0.ViewChild, args: ['colorSelector', { isSignal: true }] }], colorHandleViewChild: [{ type: i0.ViewChild, args: ['colorHandle', { isSignal: true }] }], hueViewChild: [{ type: i0.ViewChild, args: ['hue', { isSignal: true }] }], hueHandleViewChild: [{ type: i0.ViewChild, args: ['hueHandle', { isSignal: true }] }] } });
|
|
774
707
|
class ColorPickerModule {
|
|
775
708
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ColorPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
776
709
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: ColorPickerModule, imports: [ColorPicker, SharedModule], exports: [ColorPicker, SharedModule] });
|