@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
|
@@ -2,7 +2,7 @@ export * from '@exhaustive-ui/core/types/password';
|
|
|
2
2
|
import * as i2 from '@angular/common';
|
|
3
3
|
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, InjectionToken, inject, NgZone, input, booleanAttribute, computed, effect,
|
|
5
|
+
import { Injectable, InjectionToken, inject, NgZone, input, booleanAttribute, computed, signal, effect, untracked, afterEveryRender, HostListener, Directive, Pipe, forwardRef, numberAttribute, output, viewChild, contentChild, contentChildren, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
7
|
import { addClass, absolutePosition, removeClass, hasClass, isTouchDevice } from '@exhaustive-ui/utils';
|
|
8
8
|
import { PrimeTemplate, OverlayService, TranslationKeys, SharedModule } from '@exhaustive-ui/core/api';
|
|
@@ -77,7 +77,7 @@ const classes = {
|
|
|
77
77
|
{
|
|
78
78
|
'p-inputwrapper-filled': instance.$filled(),
|
|
79
79
|
'p-variant-filled': instance.$variant() === 'filled',
|
|
80
|
-
'p-inputwrapper-focus': instance.focused,
|
|
80
|
+
'p-inputwrapper-focus': instance.focused(),
|
|
81
81
|
'p-password-fluid': instance.hasFluid
|
|
82
82
|
}
|
|
83
83
|
],
|
|
@@ -86,7 +86,7 @@ const classes = {
|
|
|
86
86
|
{
|
|
87
87
|
'p-inputwrapper-filled': instance.$filled(),
|
|
88
88
|
'p-variant-filled': instance.$variant() === 'filled',
|
|
89
|
-
'p-password-fluid-directive': instance.hasFluid
|
|
89
|
+
'p-password-fluid-directive': instance.hasFluid()
|
|
90
90
|
}
|
|
91
91
|
],
|
|
92
92
|
pcInputText: 'p-password-input',
|
|
@@ -95,7 +95,7 @@ const classes = {
|
|
|
95
95
|
overlay: 'p-password-overlay p-component',
|
|
96
96
|
content: 'p-password-content',
|
|
97
97
|
meter: 'p-password-meter',
|
|
98
|
-
meterLabel: ({ instance }) => `p-password-meter-label ${instance.meter ? 'p-password-meter-' + instance.meter.strength : ''}`,
|
|
98
|
+
meterLabel: ({ instance }) => `p-password-meter-label ${instance.meter() ? 'p-password-meter-' + instance.meter().strength : ''}`,
|
|
99
99
|
meterText: 'p-password-meter-text',
|
|
100
100
|
clearIcon: 'p-password-clear-icon'
|
|
101
101
|
};
|
|
@@ -183,43 +183,43 @@ class PasswordDirective extends BaseEditableHolder {
|
|
|
183
183
|
*/
|
|
184
184
|
pPasswordUnstyled = input(/* @ts-ignore */
|
|
185
185
|
...(ngDevMode ? [undefined, { debugName: "pPasswordUnstyled" }] : /* istanbul ignore next */ []));
|
|
186
|
-
onAfterViewChecked() {
|
|
187
|
-
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
188
|
-
}
|
|
189
186
|
/**
|
|
190
187
|
* Text to prompt password entry. Defaults to Exhaustive I18N API configuration.
|
|
191
188
|
* @group Props
|
|
192
189
|
*/
|
|
193
|
-
promptLabel = 'Enter a password'
|
|
190
|
+
promptLabel = input('Enter a password', /* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [{ debugName: "promptLabel" }] : /* istanbul ignore next */ []));
|
|
194
192
|
/**
|
|
195
193
|
* Text for a weak password. Defaults to PrimeNG I18N API configuration.
|
|
196
194
|
* @group Props
|
|
197
195
|
*/
|
|
198
|
-
weakLabel = 'Weak'
|
|
196
|
+
weakLabel = input('Weak', /* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [{ debugName: "weakLabel" }] : /* istanbul ignore next */ []));
|
|
199
198
|
/**
|
|
200
199
|
* Text for a medium password. Defaults to Exhaustive I18N API configuration.
|
|
201
200
|
* @group Props
|
|
202
201
|
*/
|
|
203
|
-
mediumLabel = 'Medium'
|
|
202
|
+
mediumLabel = input('Medium', /* @ts-ignore */
|
|
203
|
+
...(ngDevMode ? [{ debugName: "mediumLabel" }] : /* istanbul ignore next */ []));
|
|
204
204
|
/**
|
|
205
205
|
* Text for a strong password. Defaults to Exhaustive I18N API configuration.
|
|
206
206
|
* @group Props
|
|
207
207
|
*/
|
|
208
|
-
strongLabel = 'Strong'
|
|
208
|
+
strongLabel = input('Strong', /* @ts-ignore */
|
|
209
|
+
...(ngDevMode ? [{ debugName: "strongLabel" }] : /* istanbul ignore next */ []));
|
|
209
210
|
/**
|
|
210
211
|
* Whether to show the strength indicator or not.
|
|
211
212
|
* @group Props
|
|
212
213
|
*/
|
|
213
|
-
feedback = true;
|
|
214
|
+
feedback = input(true, { ...(ngDevMode ? { debugName: "feedback" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
214
215
|
/**
|
|
215
216
|
* Sets the visibility of the password field.
|
|
216
217
|
* @defaultValue false
|
|
217
218
|
* @type boolean
|
|
218
219
|
* @group Props
|
|
219
220
|
*/
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
221
|
+
showPassword = input(/* @ts-ignore */
|
|
222
|
+
...(ngDevMode ? [undefined, { debugName: "showPassword" }] : /* istanbul ignore next */ []));
|
|
223
223
|
/**
|
|
224
224
|
* Specifies the input variant of the component.
|
|
225
225
|
* @defaultValue 'outlined'
|
|
@@ -242,17 +242,22 @@ class PasswordDirective extends BaseEditableHolder {
|
|
|
242
242
|
pcFluid = inject(Fluid, { optional: true, host: true, skipSelf: true });
|
|
243
243
|
$variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant(), /* @ts-ignore */
|
|
244
244
|
...(ngDevMode ? [{ debugName: "$variant" }] : /* istanbul ignore next */ []));
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
panel;
|
|
249
|
-
meter
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
245
|
+
hasFluid = computed(() => this.fluid() ?? !!this.pcFluid, /* @ts-ignore */
|
|
246
|
+
...(ngDevMode ? [{ debugName: "hasFluid" }] : /* istanbul ignore next */ []));
|
|
247
|
+
panel = signal(undefined, /* @ts-ignore */
|
|
248
|
+
...(ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []));
|
|
249
|
+
meter = signal(undefined, /* @ts-ignore */
|
|
250
|
+
...(ngDevMode ? [{ debugName: "meter" }] : /* istanbul ignore next */ []));
|
|
251
|
+
info = signal(undefined, /* @ts-ignore */
|
|
252
|
+
...(ngDevMode ? [{ debugName: "info" }] : /* istanbul ignore next */ []));
|
|
253
|
+
content = signal(undefined, /* @ts-ignore */
|
|
254
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
255
|
+
label = signal(undefined, /* @ts-ignore */
|
|
256
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
257
|
+
scrollHandler = signal(undefined, /* @ts-ignore */
|
|
258
|
+
...(ngDevMode ? [{ debugName: "scrollHandler" }] : /* istanbul ignore next */ []));
|
|
259
|
+
documentResizeListener = signal(undefined, /* @ts-ignore */
|
|
260
|
+
...(ngDevMode ? [{ debugName: "documentResizeListener" }] : /* istanbul ignore next */ []));
|
|
256
261
|
_componentStyle = inject(PasswordStyle);
|
|
257
262
|
constructor() {
|
|
258
263
|
super();
|
|
@@ -263,54 +268,68 @@ class PasswordDirective extends BaseEditableHolder {
|
|
|
263
268
|
effect(() => {
|
|
264
269
|
this.pPasswordUnstyled() && this.directiveUnstyled.set(this.pPasswordUnstyled());
|
|
265
270
|
});
|
|
271
|
+
effect(() => {
|
|
272
|
+
const show = this.showPassword();
|
|
273
|
+
if (show !== undefined) {
|
|
274
|
+
untracked(() => (this.el.nativeElement.type = show ? 'text' : 'password'));
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
|
|
266
278
|
}
|
|
267
279
|
onInput(e) {
|
|
268
280
|
this.writeModelValue(this.el.nativeElement.value);
|
|
269
281
|
}
|
|
270
282
|
createPanel() {
|
|
271
283
|
if (isPlatformBrowser(this.platformId)) {
|
|
272
|
-
|
|
273
|
-
this.renderer.addClass(
|
|
274
|
-
this.renderer.addClass(
|
|
275
|
-
this.
|
|
276
|
-
this.renderer.
|
|
277
|
-
this.renderer.
|
|
278
|
-
this.
|
|
279
|
-
this.
|
|
280
|
-
this.renderer.
|
|
281
|
-
this.
|
|
282
|
-
this.renderer.
|
|
283
|
-
this.
|
|
284
|
-
|
|
285
|
-
this.renderer.addClass(
|
|
286
|
-
this.renderer.
|
|
287
|
-
this.
|
|
288
|
-
this.renderer.
|
|
289
|
-
this.renderer.
|
|
284
|
+
const panel = this.renderer.createElement('div');
|
|
285
|
+
this.renderer.addClass(panel, 'p-password-overlay');
|
|
286
|
+
this.renderer.addClass(panel, 'p-component');
|
|
287
|
+
this.panel.set(panel);
|
|
288
|
+
const content = this.renderer.createElement('div');
|
|
289
|
+
this.renderer.addClass(content, 'p-password-content');
|
|
290
|
+
this.renderer.appendChild(panel, content);
|
|
291
|
+
this.content.set(content);
|
|
292
|
+
const meter = this.renderer.createElement('div');
|
|
293
|
+
this.renderer.addClass(meter, 'p-password-meter');
|
|
294
|
+
this.renderer.appendChild(content, meter);
|
|
295
|
+
this.meter.set(meter);
|
|
296
|
+
const label = this.renderer.createElement('div');
|
|
297
|
+
this.renderer.addClass(label, 'p-password-meter-label');
|
|
298
|
+
this.renderer.appendChild(meter, label);
|
|
299
|
+
this.label.set(label);
|
|
300
|
+
const info = this.renderer.createElement('div');
|
|
301
|
+
this.renderer.addClass(info, 'p-password-meter-text');
|
|
302
|
+
this.renderer.setProperty(info, 'textContent', this.promptLabel());
|
|
303
|
+
this.renderer.appendChild(content, info);
|
|
304
|
+
this.info.set(info);
|
|
305
|
+
this.renderer.setStyle(panel, 'minWidth', `${this.el.nativeElement.offsetWidth}px`);
|
|
306
|
+
this.renderer.appendChild(document.body, panel);
|
|
290
307
|
this.updateMeter();
|
|
291
308
|
}
|
|
292
309
|
}
|
|
293
310
|
showOverlay() {
|
|
294
|
-
if (this.feedback) {
|
|
295
|
-
if (!this.panel) {
|
|
311
|
+
if (this.feedback()) {
|
|
312
|
+
if (!this.panel()) {
|
|
296
313
|
this.createPanel();
|
|
297
314
|
}
|
|
298
|
-
this.
|
|
299
|
-
this.renderer.setStyle(
|
|
315
|
+
const panel = this.panel();
|
|
316
|
+
this.renderer.setStyle(panel, 'zIndex', String(++DomHandler.zindex));
|
|
317
|
+
this.renderer.setStyle(panel, 'display', 'block');
|
|
300
318
|
this.zone.runOutsideAngular(() => {
|
|
301
319
|
setTimeout(() => {
|
|
302
|
-
addClass(this.panel, 'p-connected-overlay-visible');
|
|
320
|
+
addClass(this.panel(), 'p-connected-overlay-visible');
|
|
303
321
|
this.bindScrollListener();
|
|
304
322
|
this.bindDocumentResizeListener();
|
|
305
323
|
}, 1);
|
|
306
324
|
});
|
|
307
|
-
absolutePosition(
|
|
325
|
+
absolutePosition(panel, this.el.nativeElement);
|
|
308
326
|
}
|
|
309
327
|
}
|
|
310
328
|
hideOverlay() {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
329
|
+
const panel = this.panel();
|
|
330
|
+
if (this.feedback() && panel) {
|
|
331
|
+
addClass(panel, 'p-connected-overlay-hidden');
|
|
332
|
+
removeClass(panel, 'p-connected-overlay-visible');
|
|
314
333
|
this.unbindScrollListener();
|
|
315
334
|
this.unbindDocumentResizeListener();
|
|
316
335
|
this.zone.runOutsideAngular(() => {
|
|
@@ -329,48 +348,53 @@ class PasswordDirective extends BaseEditableHolder {
|
|
|
329
348
|
labelSignal = signal('', /* @ts-ignore */
|
|
330
349
|
...(ngDevMode ? [{ debugName: "labelSignal" }] : /* istanbul ignore next */ []));
|
|
331
350
|
onKeyup(e) {
|
|
332
|
-
if (this.feedback) {
|
|
351
|
+
if (this.feedback()) {
|
|
333
352
|
let value = e.target.value, label = null, meterPos = null;
|
|
334
353
|
if (value.length === 0) {
|
|
335
|
-
label = this.promptLabel;
|
|
354
|
+
label = this.promptLabel();
|
|
336
355
|
meterPos = '0px 0px';
|
|
337
356
|
}
|
|
338
357
|
else {
|
|
339
358
|
var score = this.testStrength(value);
|
|
340
359
|
if (score < 30) {
|
|
341
|
-
label = this.weakLabel;
|
|
360
|
+
label = this.weakLabel();
|
|
342
361
|
meterPos = '0px -10px';
|
|
343
362
|
}
|
|
344
363
|
else if (score >= 30 && score < 80) {
|
|
345
|
-
label = this.mediumLabel;
|
|
364
|
+
label = this.mediumLabel();
|
|
346
365
|
meterPos = '0px -20px';
|
|
347
366
|
}
|
|
348
367
|
else if (score >= 80) {
|
|
349
|
-
label = this.strongLabel;
|
|
368
|
+
label = this.strongLabel();
|
|
350
369
|
meterPos = '0px -30px';
|
|
351
370
|
}
|
|
352
371
|
this.labelSignal.set(label);
|
|
353
372
|
this.updateMeter();
|
|
354
373
|
}
|
|
355
|
-
|
|
374
|
+
const panel = this.panel();
|
|
375
|
+
if (!panel || !hasClass(panel, 'p-connected-overlay-visible')) {
|
|
356
376
|
this.showOverlay();
|
|
357
377
|
}
|
|
358
|
-
|
|
359
|
-
|
|
378
|
+
const meter = this.meter();
|
|
379
|
+
if (meter) {
|
|
380
|
+
this.renderer.setStyle(meter, 'backgroundPosition', meterPos);
|
|
360
381
|
}
|
|
361
|
-
|
|
362
|
-
|
|
382
|
+
const info = this.info();
|
|
383
|
+
if (info) {
|
|
384
|
+
info.textContent = label;
|
|
363
385
|
}
|
|
364
386
|
}
|
|
365
387
|
}
|
|
366
388
|
updateMeter() {
|
|
367
|
-
|
|
389
|
+
const meter = this.meter();
|
|
390
|
+
const info = this.info();
|
|
391
|
+
if (this.labelSignal() && meter && info) {
|
|
368
392
|
const label = this.labelSignal();
|
|
369
393
|
const strengthClass = this.strengthClass(label.toLowerCase());
|
|
370
394
|
const width = this.getWidth(label.toLowerCase());
|
|
371
|
-
this.renderer.addClass(
|
|
372
|
-
this.renderer.setStyle(
|
|
373
|
-
|
|
395
|
+
this.renderer.addClass(meter, strengthClass);
|
|
396
|
+
this.renderer.setStyle(meter, 'width', width);
|
|
397
|
+
info.textContent = label;
|
|
374
398
|
}
|
|
375
399
|
}
|
|
376
400
|
getWidth(label) {
|
|
@@ -401,32 +425,34 @@ class PasswordDirective extends BaseEditableHolder {
|
|
|
401
425
|
return 1 + 0.5 * (x / (x + y / 4));
|
|
402
426
|
}
|
|
403
427
|
bindScrollListener() {
|
|
404
|
-
if (!this.scrollHandler) {
|
|
405
|
-
this.scrollHandler
|
|
406
|
-
if (hasClass(this.panel, 'p-connected-overlay-visible')) {
|
|
428
|
+
if (!this.scrollHandler()) {
|
|
429
|
+
this.scrollHandler.set(new ConnectedOverlayScrollHandler(this.el.nativeElement, () => {
|
|
430
|
+
if (hasClass(this.panel(), 'p-connected-overlay-visible')) {
|
|
407
431
|
this.hideOverlay();
|
|
408
432
|
}
|
|
409
|
-
});
|
|
433
|
+
}));
|
|
410
434
|
}
|
|
411
|
-
this.scrollHandler.bindScrollListener();
|
|
435
|
+
this.scrollHandler().bindScrollListener();
|
|
412
436
|
}
|
|
413
437
|
unbindScrollListener() {
|
|
414
|
-
|
|
415
|
-
|
|
438
|
+
const scrollHandler = this.scrollHandler();
|
|
439
|
+
if (scrollHandler) {
|
|
440
|
+
scrollHandler.unbindScrollListener();
|
|
416
441
|
}
|
|
417
442
|
}
|
|
418
443
|
bindDocumentResizeListener() {
|
|
419
444
|
if (isPlatformBrowser(this.platformId)) {
|
|
420
|
-
if (!this.documentResizeListener) {
|
|
445
|
+
if (!this.documentResizeListener()) {
|
|
421
446
|
const window = this.document.defaultView;
|
|
422
|
-
this.documentResizeListener
|
|
447
|
+
this.documentResizeListener.set(this.renderer.listen(window, 'resize', this.onWindowResize.bind(this)));
|
|
423
448
|
}
|
|
424
449
|
}
|
|
425
450
|
}
|
|
426
451
|
unbindDocumentResizeListener() {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
452
|
+
const documentResizeListener = this.documentResizeListener();
|
|
453
|
+
if (documentResizeListener) {
|
|
454
|
+
documentResizeListener();
|
|
455
|
+
this.documentResizeListener.set(null);
|
|
430
456
|
}
|
|
431
457
|
}
|
|
432
458
|
onWindowResize() {
|
|
@@ -435,46 +461,34 @@ class PasswordDirective extends BaseEditableHolder {
|
|
|
435
461
|
}
|
|
436
462
|
}
|
|
437
463
|
onDestroy() {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
464
|
+
const panel = this.panel();
|
|
465
|
+
if (panel) {
|
|
466
|
+
const scrollHandler = this.scrollHandler();
|
|
467
|
+
if (scrollHandler) {
|
|
468
|
+
scrollHandler.destroy();
|
|
469
|
+
this.scrollHandler.set(null);
|
|
442
470
|
}
|
|
443
471
|
this.unbindDocumentResizeListener();
|
|
444
|
-
this.renderer.removeChild(this.document.body,
|
|
445
|
-
this.panel
|
|
446
|
-
this.meter
|
|
447
|
-
this.info
|
|
472
|
+
this.renderer.removeChild(this.document.body, panel);
|
|
473
|
+
this.panel.set(null);
|
|
474
|
+
this.meter.set(null);
|
|
475
|
+
this.info.set(null);
|
|
448
476
|
}
|
|
449
477
|
}
|
|
450
478
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PasswordDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
451
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.1", type: PasswordDirective, isStandalone: true, selector: "[pPassword]", inputs: { pPasswordPT: { classPropertyName: "pPasswordPT", publicName: "pPasswordPT", isSignal: true, isRequired: false, transformFunction: null }, pPasswordUnstyled: { classPropertyName: "pPasswordUnstyled", publicName: "pPasswordUnstyled", isSignal: true, isRequired: false, transformFunction: null }, promptLabel: { classPropertyName: "promptLabel", publicName: "promptLabel", isSignal:
|
|
479
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.1", type: PasswordDirective, isStandalone: true, selector: "[pPassword]", inputs: { pPasswordPT: { classPropertyName: "pPasswordPT", publicName: "pPasswordPT", isSignal: true, isRequired: false, transformFunction: null }, pPasswordUnstyled: { classPropertyName: "pPasswordUnstyled", publicName: "pPasswordUnstyled", isSignal: true, isRequired: false, transformFunction: null }, promptLabel: { classPropertyName: "promptLabel", publicName: "promptLabel", isSignal: true, isRequired: false, transformFunction: null }, weakLabel: { classPropertyName: "weakLabel", publicName: "weakLabel", isSignal: true, isRequired: false, transformFunction: null }, mediumLabel: { classPropertyName: "mediumLabel", publicName: "mediumLabel", isSignal: true, isRequired: false, transformFunction: null }, strongLabel: { classPropertyName: "strongLabel", publicName: "strongLabel", isSignal: true, isRequired: false, transformFunction: null }, feedback: { classPropertyName: "feedback", publicName: "feedback", isSignal: true, isRequired: false, transformFunction: null }, showPassword: { classPropertyName: "showPassword", publicName: "showPassword", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "pSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "onInput($event)", "focus": "onFocus()", "blur": "onBlur()", "keyup": "onKeyup($event)" }, properties: { "class": "cx('rootDirective')" } }, providers: [PasswordStyle, { provide: PASSWORD_DIRECTIVE_INSTANCE, useExisting: PasswordDirective }, { provide: PARENT_INSTANCE, useExisting: PasswordDirective }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
|
|
452
480
|
}
|
|
453
481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PasswordDirective, decorators: [{
|
|
454
482
|
type: Directive,
|
|
455
483
|
args: [{
|
|
456
484
|
selector: '[pPassword]',
|
|
457
|
-
standalone: true,
|
|
458
485
|
host: {
|
|
459
486
|
'[class]': "cx('rootDirective')"
|
|
460
487
|
},
|
|
461
488
|
providers: [PasswordStyle, { provide: PASSWORD_DIRECTIVE_INSTANCE, useExisting: PasswordDirective }, { provide: PARENT_INSTANCE, useExisting: PasswordDirective }],
|
|
462
489
|
hostDirectives: [Bind]
|
|
463
490
|
}]
|
|
464
|
-
}], ctorParameters: () => [], propDecorators: { pPasswordPT: [{ type: i0.Input, args: [{ isSignal: true, alias: "pPasswordPT", required: false }] }], pPasswordUnstyled: [{ type: i0.Input, args: [{ isSignal: true, alias: "pPasswordUnstyled", required: false }] }], promptLabel: [{
|
|
465
|
-
type: Input
|
|
466
|
-
}], weakLabel: [{
|
|
467
|
-
type: Input
|
|
468
|
-
}], mediumLabel: [{
|
|
469
|
-
type: Input
|
|
470
|
-
}], strongLabel: [{
|
|
471
|
-
type: Input
|
|
472
|
-
}], feedback: [{
|
|
473
|
-
type: Input,
|
|
474
|
-
args: [{ transform: booleanAttribute }]
|
|
475
|
-
}], showPassword: [{
|
|
476
|
-
type: Input
|
|
477
|
-
}], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "pSize", required: false }] }], onInput: [{
|
|
491
|
+
}], ctorParameters: () => [], propDecorators: { pPasswordPT: [{ type: i0.Input, args: [{ isSignal: true, alias: "pPasswordPT", required: false }] }], pPasswordUnstyled: [{ type: i0.Input, args: [{ isSignal: true, alias: "pPasswordUnstyled", required: false }] }], promptLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "promptLabel", required: false }] }], weakLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "weakLabel", required: false }] }], mediumLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "mediumLabel", required: false }] }], strongLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "strongLabel", required: false }] }], feedback: [{ type: i0.Input, args: [{ isSignal: true, alias: "feedback", required: false }] }], showPassword: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPassword", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "pSize", required: false }] }], onInput: [{
|
|
478
492
|
type: HostListener,
|
|
479
493
|
args: ['input', ['$event']]
|
|
480
494
|
}], onFocus: [{
|
|
@@ -498,8 +512,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
498
512
|
type: Pipe,
|
|
499
513
|
args: [{
|
|
500
514
|
name: 'mapper',
|
|
501
|
-
pure: true
|
|
502
|
-
standalone: true
|
|
515
|
+
pure: true
|
|
503
516
|
}]
|
|
504
517
|
}] });
|
|
505
518
|
const Password_VALUE_ACCESSOR = {
|
|
@@ -515,128 +528,119 @@ class Password extends BaseInput {
|
|
|
515
528
|
componentName = 'Password';
|
|
516
529
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
517
530
|
$pcPassword = inject(PASSWORD_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
518
|
-
|
|
519
|
-
|
|
531
|
+
constructor() {
|
|
532
|
+
super();
|
|
533
|
+
afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
|
|
520
534
|
}
|
|
521
535
|
/**
|
|
522
536
|
* Defines a string that labels the input for accessibility.
|
|
523
537
|
* @group Props
|
|
524
538
|
*/
|
|
525
|
-
ariaLabel
|
|
539
|
+
ariaLabel = input(/* @ts-ignore */
|
|
540
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
526
541
|
/**
|
|
527
542
|
* Specifies one or more IDs in the DOM that labels the input field.
|
|
528
543
|
* @group Props
|
|
529
544
|
*/
|
|
530
|
-
ariaLabelledBy
|
|
545
|
+
ariaLabelledBy = input(/* @ts-ignore */
|
|
546
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
531
547
|
/**
|
|
532
548
|
* Label of the input for accessibility.
|
|
533
549
|
* @group Props
|
|
534
550
|
*/
|
|
535
|
-
label
|
|
551
|
+
label = input(/* @ts-ignore */
|
|
552
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
536
553
|
/**
|
|
537
554
|
* Text to prompt password entry. Defaults to Exhaustive I18N API configuration.
|
|
538
555
|
* @group Props
|
|
539
556
|
*/
|
|
540
|
-
promptLabel
|
|
557
|
+
promptLabel = input(/* @ts-ignore */
|
|
558
|
+
...(ngDevMode ? [undefined, { debugName: "promptLabel" }] : /* istanbul ignore next */ []));
|
|
541
559
|
/**
|
|
542
560
|
* Regex value for medium regex.
|
|
543
561
|
* @group Props
|
|
544
562
|
*/
|
|
545
|
-
mediumRegex = '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})'
|
|
563
|
+
mediumRegex = input('^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})', /* @ts-ignore */
|
|
564
|
+
...(ngDevMode ? [{ debugName: "mediumRegex" }] : /* istanbul ignore next */ []));
|
|
546
565
|
/**
|
|
547
566
|
* Regex value for strong regex.
|
|
548
567
|
* @group Props
|
|
549
568
|
*/
|
|
550
|
-
strongRegex = '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})'
|
|
569
|
+
strongRegex = input('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})', /* @ts-ignore */
|
|
570
|
+
...(ngDevMode ? [{ debugName: "strongRegex" }] : /* istanbul ignore next */ []));
|
|
551
571
|
/**
|
|
552
572
|
* Text for a weak password. Defaults to Exhaustive I18N API configuration.
|
|
553
573
|
* @group Props
|
|
554
574
|
*/
|
|
555
|
-
weakLabel
|
|
575
|
+
weakLabel = input(/* @ts-ignore */
|
|
576
|
+
...(ngDevMode ? [undefined, { debugName: "weakLabel" }] : /* istanbul ignore next */ []));
|
|
556
577
|
/**
|
|
557
578
|
* Text for a medium password. Defaults to Exhaustive I18N API configuration.
|
|
558
579
|
* @group Props
|
|
559
580
|
*/
|
|
560
|
-
mediumLabel
|
|
561
|
-
|
|
562
|
-
* specifies the maximum number of characters allowed in the input element.
|
|
563
|
-
* @deprecated since v20.0.0, use maxlength instead.
|
|
564
|
-
* @group Props
|
|
565
|
-
*/
|
|
566
|
-
maxLength;
|
|
581
|
+
mediumLabel = input(/* @ts-ignore */
|
|
582
|
+
...(ngDevMode ? [undefined, { debugName: "mediumLabel" }] : /* istanbul ignore next */ []));
|
|
567
583
|
/**
|
|
568
584
|
* Text for a strong password. Defaults to Exhaustive I18N API configuration.
|
|
569
585
|
* @group Props
|
|
570
586
|
*/
|
|
571
|
-
strongLabel
|
|
587
|
+
strongLabel = input(/* @ts-ignore */
|
|
588
|
+
...(ngDevMode ? [undefined, { debugName: "strongLabel" }] : /* istanbul ignore next */ []));
|
|
572
589
|
/**
|
|
573
590
|
* Identifier of the accessible input element.
|
|
574
591
|
* @group Props
|
|
575
592
|
*/
|
|
576
|
-
inputId
|
|
593
|
+
inputId = input(/* @ts-ignore */
|
|
594
|
+
...(ngDevMode ? [undefined, { debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
577
595
|
/**
|
|
578
596
|
* Whether to show the strength indicator or not.
|
|
579
597
|
* @group Props
|
|
580
598
|
*/
|
|
581
|
-
feedback = true;
|
|
599
|
+
feedback = input(true, { ...(ngDevMode ? { debugName: "feedback" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
582
600
|
/**
|
|
583
601
|
* Whether to show an icon to display the password as plain text.
|
|
584
602
|
* @group Props
|
|
585
603
|
*/
|
|
586
|
-
toggleMask;
|
|
604
|
+
toggleMask = input(undefined, { ...(ngDevMode ? { debugName: "toggleMask" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
587
605
|
/**
|
|
588
606
|
* Style class of the input field.
|
|
589
607
|
* @group Props
|
|
590
608
|
*/
|
|
591
|
-
inputStyleClass
|
|
592
|
-
|
|
593
|
-
* Style class of the element.
|
|
594
|
-
* @deprecated since v20.0.0, use `class` instead.
|
|
595
|
-
* @group Props
|
|
596
|
-
*/
|
|
597
|
-
styleClass;
|
|
609
|
+
inputStyleClass = input(/* @ts-ignore */
|
|
610
|
+
...(ngDevMode ? [undefined, { debugName: "inputStyleClass" }] : /* istanbul ignore next */ []));
|
|
598
611
|
/**
|
|
599
612
|
* Inline style of the input field.
|
|
600
613
|
* @group Props
|
|
601
614
|
*/
|
|
602
|
-
inputStyle
|
|
603
|
-
|
|
604
|
-
* Transition options of the show animation.
|
|
605
|
-
* @group Props
|
|
606
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
607
|
-
*/
|
|
608
|
-
showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
|
609
|
-
/**
|
|
610
|
-
* Transition options of the hide animation.
|
|
611
|
-
* @group Props
|
|
612
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
613
|
-
*/
|
|
614
|
-
hideTransitionOptions = '.1s linear';
|
|
615
|
+
inputStyle = input(/* @ts-ignore */
|
|
616
|
+
...(ngDevMode ? [undefined, { debugName: "inputStyle" }] : /* istanbul ignore next */ []));
|
|
615
617
|
/**
|
|
616
618
|
* Specify automated assistance in filling out password by browser.
|
|
617
619
|
* @group Props
|
|
618
620
|
*/
|
|
619
|
-
autocomplete
|
|
621
|
+
autocomplete = input(/* @ts-ignore */
|
|
622
|
+
...(ngDevMode ? [undefined, { debugName: "autocomplete" }] : /* istanbul ignore next */ []));
|
|
620
623
|
/**
|
|
621
624
|
* Advisory information to display on input.
|
|
622
625
|
* @group Props
|
|
623
626
|
*/
|
|
624
|
-
placeholder
|
|
627
|
+
placeholder = input(/* @ts-ignore */
|
|
628
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
625
629
|
/**
|
|
626
630
|
* When enabled, a clear icon is displayed to clear the value.
|
|
627
631
|
* @group Props
|
|
628
632
|
*/
|
|
629
|
-
showClear = false;
|
|
633
|
+
showClear = input(false, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
630
634
|
/**
|
|
631
635
|
* When present, it specifies that the component should automatically get focus on load.
|
|
632
636
|
* @group Props
|
|
633
637
|
*/
|
|
634
|
-
autofocus;
|
|
638
|
+
autofocus = input(undefined, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
635
639
|
/**
|
|
636
640
|
* Index of the element in tabbing order.
|
|
637
641
|
* @group Props
|
|
638
642
|
*/
|
|
639
|
-
tabindex;
|
|
643
|
+
tabindex = input(undefined, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
640
644
|
/**
|
|
641
645
|
* 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).
|
|
642
646
|
* @defaultValue 'self'
|
|
@@ -654,7 +658,8 @@ class Password extends BaseInput {
|
|
|
654
658
|
* Whether to use overlay API feature. The properties of overlay API can be used like an object in it.
|
|
655
659
|
* @group Props
|
|
656
660
|
*/
|
|
657
|
-
overlayOptions
|
|
661
|
+
overlayOptions = input(/* @ts-ignore */
|
|
662
|
+
...(ngDevMode ? [undefined, { debugName: "overlayOptions" }] : /* istanbul ignore next */ []));
|
|
658
663
|
/**
|
|
659
664
|
* Callback to invoke when the component receives focus.
|
|
660
665
|
* @param {Event} event - Browser event.
|
|
@@ -712,89 +717,85 @@ class Password extends BaseInput {
|
|
|
712
717
|
...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
|
|
713
718
|
$appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), /* @ts-ignore */
|
|
714
719
|
...(ngDevMode ? [{ debugName: "$appendTo" }] : /* istanbul ignore next */ []));
|
|
715
|
-
_contentTemplate
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
720
|
+
_contentTemplate = computed(() => this.templates()
|
|
721
|
+
.filter((item) => !['header', 'footer', 'clearicon', 'hideicon', 'showicon'].includes(item.getType()))
|
|
722
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
723
|
+
...(ngDevMode ? [{ debugName: "_contentTemplate" }] : /* istanbul ignore next */ []));
|
|
724
|
+
_footerTemplate = computed(() => this.templates()
|
|
725
|
+
.filter((item) => item.getType() === 'footer')
|
|
726
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
727
|
+
...(ngDevMode ? [{ debugName: "_footerTemplate" }] : /* istanbul ignore next */ []));
|
|
728
|
+
_headerTemplate = computed(() => this.templates()
|
|
729
|
+
.filter((item) => item.getType() === 'header')
|
|
730
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
731
|
+
...(ngDevMode ? [{ debugName: "_headerTemplate" }] : /* istanbul ignore next */ []));
|
|
732
|
+
_clearIconTemplate = computed(() => this.templates()
|
|
733
|
+
.filter((item) => item.getType() === 'clearicon')
|
|
734
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
735
|
+
...(ngDevMode ? [{ debugName: "_clearIconTemplate" }] : /* istanbul ignore next */ []));
|
|
736
|
+
_hideIconTemplate = computed(() => this.templates()
|
|
737
|
+
.filter((item) => item.getType() === 'hideicon')
|
|
738
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
739
|
+
...(ngDevMode ? [{ debugName: "_hideIconTemplate" }] : /* istanbul ignore next */ []));
|
|
740
|
+
_showIconTemplate = computed(() => this.templates()
|
|
741
|
+
.filter((item) => item.getType() === 'showicon')
|
|
742
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
743
|
+
...(ngDevMode ? [{ debugName: "_showIconTemplate" }] : /* istanbul ignore next */ []));
|
|
744
|
+
overlayVisible = signal(false, /* @ts-ignore */
|
|
745
|
+
...(ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []));
|
|
746
|
+
meter = signal(undefined, /* @ts-ignore */
|
|
747
|
+
...(ngDevMode ? [{ debugName: "meter" }] : /* istanbul ignore next */ []));
|
|
748
|
+
infoText = signal(undefined, /* @ts-ignore */
|
|
749
|
+
...(ngDevMode ? [{ debugName: "infoText" }] : /* istanbul ignore next */ []));
|
|
750
|
+
focused = signal(false, /* @ts-ignore */
|
|
751
|
+
...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
752
|
+
unmasked = signal(false, /* @ts-ignore */
|
|
753
|
+
...(ngDevMode ? [{ debugName: "unmasked" }] : /* istanbul ignore next */ []));
|
|
754
|
+
mediumCheckRegExp = computed(() => new RegExp(this.mediumRegex()), /* @ts-ignore */
|
|
755
|
+
...(ngDevMode ? [{ debugName: "mediumCheckRegExp" }] : /* istanbul ignore next */ []));
|
|
756
|
+
strongCheckRegExp = computed(() => new RegExp(this.strongRegex()), /* @ts-ignore */
|
|
757
|
+
...(ngDevMode ? [{ debugName: "strongCheckRegExp" }] : /* istanbul ignore next */ []));
|
|
758
|
+
value = signal(null, /* @ts-ignore */
|
|
759
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
760
|
+
translationSubscription = signal(undefined, /* @ts-ignore */
|
|
761
|
+
...(ngDevMode ? [{ debugName: "translationSubscription" }] : /* istanbul ignore next */ []));
|
|
732
762
|
_componentStyle = inject(PasswordStyle);
|
|
733
763
|
overlayService = inject(OverlayService);
|
|
734
764
|
onInit() {
|
|
735
|
-
this.infoText
|
|
736
|
-
this.
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
this.updateUI(this.value || '');
|
|
740
|
-
});
|
|
741
|
-
}
|
|
742
|
-
onAfterContentInit() {
|
|
743
|
-
this.templates().forEach((item) => {
|
|
744
|
-
switch (item.getType()) {
|
|
745
|
-
case 'content':
|
|
746
|
-
this._contentTemplate = item.template;
|
|
747
|
-
break;
|
|
748
|
-
case 'header':
|
|
749
|
-
this._headerTemplate = item.template;
|
|
750
|
-
break;
|
|
751
|
-
case 'footer':
|
|
752
|
-
this._footerTemplate = item.template;
|
|
753
|
-
break;
|
|
754
|
-
case 'clearicon':
|
|
755
|
-
this._clearIconTemplate = item.template;
|
|
756
|
-
break;
|
|
757
|
-
case 'hideicon':
|
|
758
|
-
this._hideIconTemplate = item.template;
|
|
759
|
-
break;
|
|
760
|
-
case 'showicon':
|
|
761
|
-
this._showIconTemplate = item.template;
|
|
762
|
-
break;
|
|
763
|
-
default:
|
|
764
|
-
this._contentTemplate = item.template;
|
|
765
|
-
break;
|
|
766
|
-
}
|
|
767
|
-
});
|
|
765
|
+
this.infoText.set(this.promptText());
|
|
766
|
+
this.translationSubscription.set(this.config.translationObserver.subscribe(() => {
|
|
767
|
+
this.updateUI(this.value() || '');
|
|
768
|
+
}));
|
|
768
769
|
}
|
|
769
770
|
onInput(event) {
|
|
770
|
-
this.value
|
|
771
|
-
this.onModelChange(this.value);
|
|
771
|
+
this.value.set(event.target.value);
|
|
772
|
+
this.onModelChange(this.value());
|
|
772
773
|
}
|
|
773
774
|
onInputFocus(event) {
|
|
774
|
-
this.focused
|
|
775
|
-
if (this.feedback) {
|
|
776
|
-
this.overlayVisible
|
|
775
|
+
this.focused.set(true);
|
|
776
|
+
if (this.feedback()) {
|
|
777
|
+
this.overlayVisible.set(true);
|
|
777
778
|
}
|
|
778
779
|
this.onFocus.emit(event);
|
|
779
780
|
}
|
|
780
781
|
onInputBlur(event) {
|
|
781
|
-
this.focused
|
|
782
|
-
if (this.feedback) {
|
|
783
|
-
this.overlayVisible
|
|
782
|
+
this.focused.set(false);
|
|
783
|
+
if (this.feedback()) {
|
|
784
|
+
this.overlayVisible.set(false);
|
|
784
785
|
}
|
|
785
786
|
this.onModelTouched();
|
|
786
787
|
this.onBlur.emit(event);
|
|
787
788
|
}
|
|
788
789
|
onKeyUp(event) {
|
|
789
|
-
if (this.feedback) {
|
|
790
|
+
if (this.feedback()) {
|
|
790
791
|
let value = event.target.value;
|
|
791
792
|
this.updateUI(value);
|
|
792
793
|
if (event.code === 'Escape') {
|
|
793
|
-
this.overlayVisible &&
|
|
794
|
+
this.overlayVisible() && this.overlayVisible.set(false);
|
|
794
795
|
return;
|
|
795
796
|
}
|
|
796
|
-
if (!this.overlayVisible) {
|
|
797
|
-
this.overlayVisible
|
|
797
|
+
if (!this.overlayVisible()) {
|
|
798
|
+
this.overlayVisible.set(true);
|
|
798
799
|
}
|
|
799
800
|
}
|
|
800
801
|
}
|
|
@@ -828,11 +829,11 @@ class Password extends BaseInput {
|
|
|
828
829
|
meter = null;
|
|
829
830
|
break;
|
|
830
831
|
}
|
|
831
|
-
this.meter
|
|
832
|
-
this.infoText
|
|
832
|
+
this.meter.set(meter);
|
|
833
|
+
this.infoText.set(label);
|
|
833
834
|
}
|
|
834
835
|
onMaskToggle() {
|
|
835
|
-
this.unmasked
|
|
836
|
+
this.unmasked.update((unmasked) => !unmasked);
|
|
836
837
|
}
|
|
837
838
|
onOverlayClick(event) {
|
|
838
839
|
this.overlayService.add({
|
|
@@ -842,36 +843,33 @@ class Password extends BaseInput {
|
|
|
842
843
|
}
|
|
843
844
|
testStrength(str) {
|
|
844
845
|
let level = 0;
|
|
845
|
-
if (this.strongCheckRegExp
|
|
846
|
+
if (this.strongCheckRegExp().test(str))
|
|
846
847
|
level = 3;
|
|
847
|
-
else if (this.mediumCheckRegExp
|
|
848
|
+
else if (this.mediumCheckRegExp().test(str))
|
|
848
849
|
level = 2;
|
|
849
850
|
else if (str.length)
|
|
850
851
|
level = 1;
|
|
851
852
|
return level;
|
|
852
853
|
}
|
|
853
854
|
promptText() {
|
|
854
|
-
return this.promptLabel || this.getTranslation(TranslationKeys.PASSWORD_PROMPT);
|
|
855
|
+
return this.promptLabel() || this.getTranslation(TranslationKeys.PASSWORD_PROMPT);
|
|
855
856
|
}
|
|
856
857
|
weakText() {
|
|
857
|
-
return this.weakLabel || this.getTranslation(TranslationKeys.WEAK);
|
|
858
|
+
return this.weakLabel() || this.getTranslation(TranslationKeys.WEAK);
|
|
858
859
|
}
|
|
859
860
|
mediumText() {
|
|
860
|
-
return this.mediumLabel || this.getTranslation(TranslationKeys.MEDIUM);
|
|
861
|
+
return this.mediumLabel() || this.getTranslation(TranslationKeys.MEDIUM);
|
|
861
862
|
}
|
|
862
863
|
strongText() {
|
|
863
|
-
return this.strongLabel || this.getTranslation(TranslationKeys.STRONG);
|
|
864
|
-
}
|
|
865
|
-
inputType(unmasked) {
|
|
866
|
-
return unmasked ? 'text' : 'password';
|
|
864
|
+
return this.strongLabel() || this.getTranslation(TranslationKeys.STRONG);
|
|
867
865
|
}
|
|
868
866
|
getTranslation(option) {
|
|
869
867
|
return this.config.getTranslation(option);
|
|
870
868
|
}
|
|
871
869
|
clear() {
|
|
872
|
-
this.value
|
|
873
|
-
this.onModelChange(this.value);
|
|
874
|
-
this.writeValue(this.value);
|
|
870
|
+
this.value.set(null);
|
|
871
|
+
this.onModelChange(this.value());
|
|
872
|
+
this.writeValue(this.value());
|
|
875
873
|
this.onClear.emit(undefined);
|
|
876
874
|
}
|
|
877
875
|
/**
|
|
@@ -882,54 +880,51 @@ class Password extends BaseInput {
|
|
|
882
880
|
*/
|
|
883
881
|
writeControlValue(value, setModelValue) {
|
|
884
882
|
if (value === undefined)
|
|
885
|
-
this.value
|
|
883
|
+
this.value.set(null);
|
|
886
884
|
else
|
|
887
|
-
this.value
|
|
888
|
-
if (this.feedback)
|
|
889
|
-
this.updateUI(this.value || '');
|
|
890
|
-
setModelValue(this.value);
|
|
891
|
-
this.cd.markForCheck();
|
|
885
|
+
this.value.set(value);
|
|
886
|
+
if (this.feedback())
|
|
887
|
+
this.updateUI(this.value() || '');
|
|
888
|
+
setModelValue(this.value());
|
|
892
889
|
}
|
|
893
890
|
onDestroy() {
|
|
894
|
-
|
|
895
|
-
|
|
891
|
+
const translationSubscription = this.translationSubscription();
|
|
892
|
+
if (translationSubscription) {
|
|
893
|
+
translationSubscription.unsubscribe();
|
|
896
894
|
}
|
|
897
895
|
}
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
}
|
|
913
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Password, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
914
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Password, isStandalone: true, selector: "p-password", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, promptLabel: { classPropertyName: "promptLabel", publicName: "promptLabel", isSignal: false, isRequired: false, transformFunction: null }, mediumRegex: { classPropertyName: "mediumRegex", publicName: "mediumRegex", isSignal: false, isRequired: false, transformFunction: null }, strongRegex: { classPropertyName: "strongRegex", publicName: "strongRegex", isSignal: false, isRequired: false, transformFunction: null }, weakLabel: { classPropertyName: "weakLabel", publicName: "weakLabel", isSignal: false, isRequired: false, transformFunction: null }, mediumLabel: { classPropertyName: "mediumLabel", publicName: "mediumLabel", isSignal: false, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: false, isRequired: false, transformFunction: numberAttribute }, strongLabel: { classPropertyName: "strongLabel", publicName: "strongLabel", isSignal: false, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: false, isRequired: false, transformFunction: null }, feedback: { classPropertyName: "feedback", publicName: "feedback", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, toggleMask: { classPropertyName: "toggleMask", publicName: "toggleMask", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: false, isRequired: false, transformFunction: null }, showTransitionOptions: { classPropertyName: "showTransitionOptions", publicName: "showTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, hideTransitionOptions: { classPropertyName: "hideTransitionOptions", publicName: "hideTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onFocus: "onFocus", onBlur: "onBlur", onClear: "onClear" }, host: { properties: { "class": "cn(cx('root'), styleClass)", "style": "sx('root')", "attr.data-p": "containerDataP" } }, providers: [Password_VALUE_ACCESSOR, PasswordStyle, { provide: PASSWORD_INSTANCE, useExisting: Password }, { provide: PARENT_INSTANCE, useExisting: Password }], queries: [{ propertyName: "contentTemplate", first: true, predicate: ["content"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], isSignal: true }, { propertyName: "hideIconTemplate", first: true, predicate: ["hideicon"], isSignal: true }, { propertyName: "showIconTemplate", first: true, predicate: ["showicon"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
896
|
+
containerDataP = computed(() => this.cn({
|
|
897
|
+
fluid: this.hasFluid
|
|
898
|
+
}), /* @ts-ignore */
|
|
899
|
+
...(ngDevMode ? [{ debugName: "containerDataP" }] : /* istanbul ignore next */ []));
|
|
900
|
+
meterDataP = computed(() => this.cn({
|
|
901
|
+
[this.meter()?.strength]: this.meter()?.strength
|
|
902
|
+
}), /* @ts-ignore */
|
|
903
|
+
...(ngDevMode ? [{ debugName: "meterDataP" }] : /* istanbul ignore next */ []));
|
|
904
|
+
overlayDataP = computed(() => this.cn({
|
|
905
|
+
['overlay-' + this.$appendTo()]: 'overlay-' + this.$appendTo()
|
|
906
|
+
}), /* @ts-ignore */
|
|
907
|
+
...(ngDevMode ? [{ debugName: "overlayDataP" }] : /* istanbul ignore next */ []));
|
|
908
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Password, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
909
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Password, isStandalone: true, selector: "p-password", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, promptLabel: { classPropertyName: "promptLabel", publicName: "promptLabel", isSignal: true, isRequired: false, transformFunction: null }, mediumRegex: { classPropertyName: "mediumRegex", publicName: "mediumRegex", isSignal: true, isRequired: false, transformFunction: null }, strongRegex: { classPropertyName: "strongRegex", publicName: "strongRegex", isSignal: true, isRequired: false, transformFunction: null }, weakLabel: { classPropertyName: "weakLabel", publicName: "weakLabel", isSignal: true, isRequired: false, transformFunction: null }, mediumLabel: { classPropertyName: "mediumLabel", publicName: "mediumLabel", isSignal: true, isRequired: false, transformFunction: null }, strongLabel: { classPropertyName: "strongLabel", publicName: "strongLabel", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, feedback: { classPropertyName: "feedback", publicName: "feedback", isSignal: true, isRequired: false, transformFunction: null }, toggleMask: { classPropertyName: "toggleMask", publicName: "toggleMask", isSignal: true, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFocus: "onFocus", onBlur: "onBlur", onClear: "onClear" }, host: { properties: { "class": "cx('root')", "style": "sx('root')", "attr.data-p": "containerDataP()" } }, providers: [Password_VALUE_ACCESSOR, PasswordStyle, { provide: PASSWORD_INSTANCE, useExisting: Password }, { provide: PARENT_INSTANCE, useExisting: Password }], queries: [{ propertyName: "contentTemplate", first: true, predicate: ["content"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], isSignal: true }, { propertyName: "hideIconTemplate", first: true, predicate: ["hideicon"], isSignal: true }, { propertyName: "showIconTemplate", first: true, predicate: ["showicon"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
915
910
|
<input
|
|
916
911
|
#input
|
|
917
|
-
[attr.label]="label"
|
|
918
|
-
[attr.aria-label]="ariaLabel"
|
|
919
|
-
[attr.aria-labelledBy]="ariaLabelledBy"
|
|
920
|
-
[attr.id]="inputId"
|
|
921
|
-
[attr.tabindex]="tabindex"
|
|
912
|
+
[attr.label]="label()"
|
|
913
|
+
[attr.aria-label]="ariaLabel()"
|
|
914
|
+
[attr.aria-labelledBy]="ariaLabelledBy()"
|
|
915
|
+
[attr.id]="inputId()"
|
|
916
|
+
[attr.tabindex]="tabindex()"
|
|
922
917
|
pInputText
|
|
923
918
|
[pSize]="size()"
|
|
924
|
-
[ngStyle]="inputStyle"
|
|
925
|
-
[class]="cn(cx('pcInputText'), inputStyleClass)"
|
|
926
|
-
[attr.type]="unmasked ? 'text' : 'password'"
|
|
927
|
-
[attr.placeholder]="placeholder"
|
|
928
|
-
[attr.autocomplete]="autocomplete"
|
|
929
|
-
[value]="value"
|
|
919
|
+
[ngStyle]="inputStyle()"
|
|
920
|
+
[class]="cn(cx('pcInputText'), inputStyleClass())"
|
|
921
|
+
[attr.type]="unmasked() ? 'text' : 'password'"
|
|
922
|
+
[attr.placeholder]="placeholder()"
|
|
923
|
+
[attr.autocomplete]="autocomplete()"
|
|
924
|
+
[value]="value()"
|
|
930
925
|
[variant]="$variant()"
|
|
931
926
|
[attr.name]="name()"
|
|
932
|
-
[attr.maxlength]="maxlength()
|
|
927
|
+
[attr.maxlength]="maxlength()"
|
|
933
928
|
[attr.minlength]="minlength()"
|
|
934
929
|
[attr.required]="required() ? '' : undefined"
|
|
935
930
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
@@ -938,57 +933,57 @@ class Password extends BaseInput {
|
|
|
938
933
|
(focus)="onInputFocus($event)"
|
|
939
934
|
(blur)="onInputBlur($event)"
|
|
940
935
|
(keyup)="onKeyUp($event)"
|
|
941
|
-
[pAutoFocus]="autofocus"
|
|
936
|
+
[pAutoFocus]="autofocus()"
|
|
942
937
|
[pt]="ptm('pcInputText')"
|
|
943
938
|
[unstyled]="unstyled()"
|
|
944
939
|
/>
|
|
945
|
-
@if (showClear && value != null) {
|
|
946
|
-
@if (!clearIconTemplate() && !_clearIconTemplate) {
|
|
940
|
+
@if (showClear() && value() != null) {
|
|
941
|
+
@if (!clearIconTemplate() && !_clearIconTemplate()) {
|
|
947
942
|
<svg data-p-icon="times" [class]="cx('clearIcon')" (click)="clear()" [pBind]="ptm('clearIcon')" />
|
|
948
943
|
}
|
|
949
944
|
<span (click)="clear()" [class]="cx('clearIcon')" [pBind]="ptm('clearIcon')">
|
|
950
|
-
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate"></ng-template>
|
|
945
|
+
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate()"></ng-template>
|
|
951
946
|
</span>
|
|
952
947
|
}
|
|
953
948
|
|
|
954
|
-
@if (toggleMask) {
|
|
955
|
-
@if (unmasked) {
|
|
956
|
-
@if (!hideIconTemplate() && !_hideIconTemplate) {
|
|
949
|
+
@if (toggleMask()) {
|
|
950
|
+
@if (unmasked()) {
|
|
951
|
+
@if (!hideIconTemplate() && !_hideIconTemplate()) {
|
|
957
952
|
<svg data-p-icon="eyeslash" [class]="cx('maskIcon')" [pBind]="ptm('maskIcon')" (click)="onMaskToggle()" />
|
|
958
953
|
}
|
|
959
|
-
@if (hideIconTemplate() || _hideIconTemplate) {
|
|
954
|
+
@if (hideIconTemplate() || _hideIconTemplate()) {
|
|
960
955
|
<span (click)="onMaskToggle()" [pBind]="ptm('maskIcon')">
|
|
961
|
-
<ng-template *ngTemplateOutlet="hideIconTemplate() || _hideIconTemplate; context: { class: cx('maskIcon') }"></ng-template>
|
|
956
|
+
<ng-template *ngTemplateOutlet="hideIconTemplate() || _hideIconTemplate(); context: { class: cx('maskIcon') }"></ng-template>
|
|
962
957
|
</span>
|
|
963
958
|
}
|
|
964
959
|
}
|
|
965
|
-
@if (!unmasked) {
|
|
966
|
-
@if (!showIconTemplate() && !_showIconTemplate) {
|
|
960
|
+
@if (!unmasked()) {
|
|
961
|
+
@if (!showIconTemplate() && !_showIconTemplate()) {
|
|
967
962
|
<svg data-p-icon="eye" [class]="cx('unmaskIcon')" [pBind]="ptm('unmaskIcon')" (click)="onMaskToggle()" />
|
|
968
963
|
}
|
|
969
|
-
@if (showIconTemplate() || _showIconTemplate) {
|
|
964
|
+
@if (showIconTemplate() || _showIconTemplate()) {
|
|
970
965
|
<span (click)="onMaskToggle()" [pBind]="ptm('unmaskIcon')">
|
|
971
|
-
<ng-template *ngTemplateOutlet="showIconTemplate() || _showIconTemplate; context: { class: cx('unmaskIcon') }"></ng-template>
|
|
966
|
+
<ng-template *ngTemplateOutlet="showIconTemplate() || _showIconTemplate(); context: { class: cx('unmaskIcon') }"></ng-template>
|
|
972
967
|
</span>
|
|
973
968
|
}
|
|
974
969
|
}
|
|
975
970
|
}
|
|
976
971
|
|
|
977
|
-
<p-overlay #overlay [hostAttrSelector]="$attrSelector" [(visible)]="overlayVisible" [options]="overlayOptions" [target]="'@parent'" [appendTo]="$appendTo()" [unstyled]="unstyled()" [pt]="ptm('pcOverlay')" [motionOptions]="motionOptions()">
|
|
972
|
+
<p-overlay #overlay [hostAttrSelector]="$attrSelector" [(visible)]="overlayVisible" [options]="overlayOptions()" [target]="'@parent'" [appendTo]="$appendTo()" [unstyled]="unstyled()" [pt]="ptm('pcOverlay')" [motionOptions]="motionOptions()">
|
|
978
973
|
<ng-template #content>
|
|
979
|
-
<div [class]="cx('overlay')" [style]="sx('overlay')" (click)="onOverlayClick($event)" [pBind]="ptm('overlay')" [attr.data-p]="overlayDataP">
|
|
980
|
-
<ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-container>
|
|
981
|
-
@if (contentTemplate() || _contentTemplate) {
|
|
982
|
-
<ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate"></ng-container>
|
|
974
|
+
<div [class]="cx('overlay')" [style]="sx('overlay')" (click)="onOverlayClick($event)" [pBind]="ptm('overlay')" [attr.data-p]="overlayDataP()">
|
|
975
|
+
<ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-container>
|
|
976
|
+
@if (contentTemplate() || _contentTemplate()) {
|
|
977
|
+
<ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate()"></ng-container>
|
|
983
978
|
} @else {
|
|
984
979
|
<div [class]="cx('content')" [pBind]="ptm('content')">
|
|
985
980
|
<div [class]="cx('meter')" [pBind]="ptm('meter')">
|
|
986
|
-
<div [class]="cx('meterLabel')" [ngStyle]="{ width: meter
|
|
981
|
+
<div [class]="cx('meterLabel')" [ngStyle]="{ width: meter()?.width ?? '' }" [pBind]="ptm('meterLabel')" [attr.data-p]="meterDataP()"></div>
|
|
987
982
|
</div>
|
|
988
|
-
<div [class]="cx('meterText')" [pBind]="ptm('meterText')">{{ infoText }}</div>
|
|
983
|
+
<div [class]="cx('meterText')" [pBind]="ptm('meterText')">{{ infoText() }}</div>
|
|
989
984
|
</div>
|
|
990
985
|
}
|
|
991
|
-
<ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-container>
|
|
986
|
+
<ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-container>
|
|
992
987
|
</div>
|
|
993
988
|
</ng-template>
|
|
994
989
|
</p-overlay>
|
|
@@ -998,27 +993,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
998
993
|
type: Component,
|
|
999
994
|
args: [{
|
|
1000
995
|
selector: 'p-password',
|
|
1001
|
-
standalone: true,
|
|
1002
996
|
imports: [CommonModule, InputText, AutoFocus, TimesIcon, EyeSlashIcon, EyeIcon, Overlay, SharedModule, BindModule],
|
|
1003
997
|
template: `
|
|
1004
998
|
<input
|
|
1005
999
|
#input
|
|
1006
|
-
[attr.label]="label"
|
|
1007
|
-
[attr.aria-label]="ariaLabel"
|
|
1008
|
-
[attr.aria-labelledBy]="ariaLabelledBy"
|
|
1009
|
-
[attr.id]="inputId"
|
|
1010
|
-
[attr.tabindex]="tabindex"
|
|
1000
|
+
[attr.label]="label()"
|
|
1001
|
+
[attr.aria-label]="ariaLabel()"
|
|
1002
|
+
[attr.aria-labelledBy]="ariaLabelledBy()"
|
|
1003
|
+
[attr.id]="inputId()"
|
|
1004
|
+
[attr.tabindex]="tabindex()"
|
|
1011
1005
|
pInputText
|
|
1012
1006
|
[pSize]="size()"
|
|
1013
|
-
[ngStyle]="inputStyle"
|
|
1014
|
-
[class]="cn(cx('pcInputText'), inputStyleClass)"
|
|
1015
|
-
[attr.type]="unmasked ? 'text' : 'password'"
|
|
1016
|
-
[attr.placeholder]="placeholder"
|
|
1017
|
-
[attr.autocomplete]="autocomplete"
|
|
1018
|
-
[value]="value"
|
|
1007
|
+
[ngStyle]="inputStyle()"
|
|
1008
|
+
[class]="cn(cx('pcInputText'), inputStyleClass())"
|
|
1009
|
+
[attr.type]="unmasked() ? 'text' : 'password'"
|
|
1010
|
+
[attr.placeholder]="placeholder()"
|
|
1011
|
+
[attr.autocomplete]="autocomplete()"
|
|
1012
|
+
[value]="value()"
|
|
1019
1013
|
[variant]="$variant()"
|
|
1020
1014
|
[attr.name]="name()"
|
|
1021
|
-
[attr.maxlength]="maxlength()
|
|
1015
|
+
[attr.maxlength]="maxlength()"
|
|
1022
1016
|
[attr.minlength]="minlength()"
|
|
1023
1017
|
[attr.required]="required() ? '' : undefined"
|
|
1024
1018
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
@@ -1027,57 +1021,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1027
1021
|
(focus)="onInputFocus($event)"
|
|
1028
1022
|
(blur)="onInputBlur($event)"
|
|
1029
1023
|
(keyup)="onKeyUp($event)"
|
|
1030
|
-
[pAutoFocus]="autofocus"
|
|
1024
|
+
[pAutoFocus]="autofocus()"
|
|
1031
1025
|
[pt]="ptm('pcInputText')"
|
|
1032
1026
|
[unstyled]="unstyled()"
|
|
1033
1027
|
/>
|
|
1034
|
-
@if (showClear && value != null) {
|
|
1035
|
-
@if (!clearIconTemplate() && !_clearIconTemplate) {
|
|
1028
|
+
@if (showClear() && value() != null) {
|
|
1029
|
+
@if (!clearIconTemplate() && !_clearIconTemplate()) {
|
|
1036
1030
|
<svg data-p-icon="times" [class]="cx('clearIcon')" (click)="clear()" [pBind]="ptm('clearIcon')" />
|
|
1037
1031
|
}
|
|
1038
1032
|
<span (click)="clear()" [class]="cx('clearIcon')" [pBind]="ptm('clearIcon')">
|
|
1039
|
-
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate"></ng-template>
|
|
1033
|
+
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate()"></ng-template>
|
|
1040
1034
|
</span>
|
|
1041
1035
|
}
|
|
1042
1036
|
|
|
1043
|
-
@if (toggleMask) {
|
|
1044
|
-
@if (unmasked) {
|
|
1045
|
-
@if (!hideIconTemplate() && !_hideIconTemplate) {
|
|
1037
|
+
@if (toggleMask()) {
|
|
1038
|
+
@if (unmasked()) {
|
|
1039
|
+
@if (!hideIconTemplate() && !_hideIconTemplate()) {
|
|
1046
1040
|
<svg data-p-icon="eyeslash" [class]="cx('maskIcon')" [pBind]="ptm('maskIcon')" (click)="onMaskToggle()" />
|
|
1047
1041
|
}
|
|
1048
|
-
@if (hideIconTemplate() || _hideIconTemplate) {
|
|
1042
|
+
@if (hideIconTemplate() || _hideIconTemplate()) {
|
|
1049
1043
|
<span (click)="onMaskToggle()" [pBind]="ptm('maskIcon')">
|
|
1050
|
-
<ng-template *ngTemplateOutlet="hideIconTemplate() || _hideIconTemplate; context: { class: cx('maskIcon') }"></ng-template>
|
|
1044
|
+
<ng-template *ngTemplateOutlet="hideIconTemplate() || _hideIconTemplate(); context: { class: cx('maskIcon') }"></ng-template>
|
|
1051
1045
|
</span>
|
|
1052
1046
|
}
|
|
1053
1047
|
}
|
|
1054
|
-
@if (!unmasked) {
|
|
1055
|
-
@if (!showIconTemplate() && !_showIconTemplate) {
|
|
1048
|
+
@if (!unmasked()) {
|
|
1049
|
+
@if (!showIconTemplate() && !_showIconTemplate()) {
|
|
1056
1050
|
<svg data-p-icon="eye" [class]="cx('unmaskIcon')" [pBind]="ptm('unmaskIcon')" (click)="onMaskToggle()" />
|
|
1057
1051
|
}
|
|
1058
|
-
@if (showIconTemplate() || _showIconTemplate) {
|
|
1052
|
+
@if (showIconTemplate() || _showIconTemplate()) {
|
|
1059
1053
|
<span (click)="onMaskToggle()" [pBind]="ptm('unmaskIcon')">
|
|
1060
|
-
<ng-template *ngTemplateOutlet="showIconTemplate() || _showIconTemplate; context: { class: cx('unmaskIcon') }"></ng-template>
|
|
1054
|
+
<ng-template *ngTemplateOutlet="showIconTemplate() || _showIconTemplate(); context: { class: cx('unmaskIcon') }"></ng-template>
|
|
1061
1055
|
</span>
|
|
1062
1056
|
}
|
|
1063
1057
|
}
|
|
1064
1058
|
}
|
|
1065
1059
|
|
|
1066
|
-
<p-overlay #overlay [hostAttrSelector]="$attrSelector" [(visible)]="overlayVisible" [options]="overlayOptions" [target]="'@parent'" [appendTo]="$appendTo()" [unstyled]="unstyled()" [pt]="ptm('pcOverlay')" [motionOptions]="motionOptions()">
|
|
1060
|
+
<p-overlay #overlay [hostAttrSelector]="$attrSelector" [(visible)]="overlayVisible" [options]="overlayOptions()" [target]="'@parent'" [appendTo]="$appendTo()" [unstyled]="unstyled()" [pt]="ptm('pcOverlay')" [motionOptions]="motionOptions()">
|
|
1067
1061
|
<ng-template #content>
|
|
1068
|
-
<div [class]="cx('overlay')" [style]="sx('overlay')" (click)="onOverlayClick($event)" [pBind]="ptm('overlay')" [attr.data-p]="overlayDataP">
|
|
1069
|
-
<ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-container>
|
|
1070
|
-
@if (contentTemplate() || _contentTemplate) {
|
|
1071
|
-
<ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate"></ng-container>
|
|
1062
|
+
<div [class]="cx('overlay')" [style]="sx('overlay')" (click)="onOverlayClick($event)" [pBind]="ptm('overlay')" [attr.data-p]="overlayDataP()">
|
|
1063
|
+
<ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-container>
|
|
1064
|
+
@if (contentTemplate() || _contentTemplate()) {
|
|
1065
|
+
<ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate()"></ng-container>
|
|
1072
1066
|
} @else {
|
|
1073
1067
|
<div [class]="cx('content')" [pBind]="ptm('content')">
|
|
1074
1068
|
<div [class]="cx('meter')" [pBind]="ptm('meter')">
|
|
1075
|
-
<div [class]="cx('meterLabel')" [ngStyle]="{ width: meter
|
|
1069
|
+
<div [class]="cx('meterLabel')" [ngStyle]="{ width: meter()?.width ?? '' }" [pBind]="ptm('meterLabel')" [attr.data-p]="meterDataP()"></div>
|
|
1076
1070
|
</div>
|
|
1077
|
-
<div [class]="cx('meterText')" [pBind]="ptm('meterText')">{{ infoText }}</div>
|
|
1071
|
+
<div [class]="cx('meterText')" [pBind]="ptm('meterText')">{{ infoText() }}</div>
|
|
1078
1072
|
</div>
|
|
1079
1073
|
}
|
|
1080
|
-
<ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-container>
|
|
1074
|
+
<ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-container>
|
|
1081
1075
|
</div>
|
|
1082
1076
|
</ng-template>
|
|
1083
1077
|
</p-overlay>
|
|
@@ -1086,67 +1080,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1086
1080
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1087
1081
|
encapsulation: ViewEncapsulation.None,
|
|
1088
1082
|
host: {
|
|
1089
|
-
'[class]': "
|
|
1083
|
+
'[class]': "cx('root')",
|
|
1090
1084
|
'[style]': "sx('root')",
|
|
1091
|
-
'[attr.data-p]': 'containerDataP'
|
|
1085
|
+
'[attr.data-p]': 'containerDataP()'
|
|
1092
1086
|
},
|
|
1093
1087
|
hostDirectives: [Bind]
|
|
1094
1088
|
}]
|
|
1095
|
-
}], propDecorators: { ariaLabel: [{
|
|
1096
|
-
type: Input
|
|
1097
|
-
}], ariaLabelledBy: [{
|
|
1098
|
-
type: Input
|
|
1099
|
-
}], label: [{
|
|
1100
|
-
type: Input
|
|
1101
|
-
}], promptLabel: [{
|
|
1102
|
-
type: Input
|
|
1103
|
-
}], mediumRegex: [{
|
|
1104
|
-
type: Input
|
|
1105
|
-
}], strongRegex: [{
|
|
1106
|
-
type: Input
|
|
1107
|
-
}], weakLabel: [{
|
|
1108
|
-
type: Input
|
|
1109
|
-
}], mediumLabel: [{
|
|
1110
|
-
type: Input
|
|
1111
|
-
}], maxLength: [{
|
|
1112
|
-
type: Input,
|
|
1113
|
-
args: [{ transform: numberAttribute }]
|
|
1114
|
-
}], strongLabel: [{
|
|
1115
|
-
type: Input
|
|
1116
|
-
}], inputId: [{
|
|
1117
|
-
type: Input
|
|
1118
|
-
}], feedback: [{
|
|
1119
|
-
type: Input,
|
|
1120
|
-
args: [{ transform: booleanAttribute }]
|
|
1121
|
-
}], toggleMask: [{
|
|
1122
|
-
type: Input,
|
|
1123
|
-
args: [{ transform: booleanAttribute }]
|
|
1124
|
-
}], inputStyleClass: [{
|
|
1125
|
-
type: Input
|
|
1126
|
-
}], styleClass: [{
|
|
1127
|
-
type: Input
|
|
1128
|
-
}], inputStyle: [{
|
|
1129
|
-
type: Input
|
|
1130
|
-
}], showTransitionOptions: [{
|
|
1131
|
-
type: Input
|
|
1132
|
-
}], hideTransitionOptions: [{
|
|
1133
|
-
type: Input
|
|
1134
|
-
}], autocomplete: [{
|
|
1135
|
-
type: Input
|
|
1136
|
-
}], placeholder: [{
|
|
1137
|
-
type: Input
|
|
1138
|
-
}], showClear: [{
|
|
1139
|
-
type: Input,
|
|
1140
|
-
args: [{ transform: booleanAttribute }]
|
|
1141
|
-
}], autofocus: [{
|
|
1142
|
-
type: Input,
|
|
1143
|
-
args: [{ transform: booleanAttribute }]
|
|
1144
|
-
}], tabindex: [{
|
|
1145
|
-
type: Input,
|
|
1146
|
-
args: [{ transform: numberAttribute }]
|
|
1147
|
-
}], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], overlayOptions: [{
|
|
1148
|
-
type: Input
|
|
1149
|
-
}], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { ...{ descendants: false }, isSignal: true }] }], hideIconTemplate: [{ type: i0.ContentChild, args: ['hideicon', { ...{ descendants: false }, isSignal: true }] }], showIconTemplate: [{ type: i0.ContentChild, args: ['showicon', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
1089
|
+
}], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], promptLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "promptLabel", required: false }] }], mediumRegex: [{ type: i0.Input, args: [{ isSignal: true, alias: "mediumRegex", required: false }] }], strongRegex: [{ type: i0.Input, args: [{ isSignal: true, alias: "strongRegex", required: false }] }], weakLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "weakLabel", required: false }] }], mediumLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "mediumLabel", required: false }] }], strongLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "strongLabel", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], feedback: [{ type: i0.Input, args: [{ isSignal: true, alias: "feedback", required: false }] }], toggleMask: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleMask", required: false }] }], inputStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyleClass", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], overlayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOptions", required: false }] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { ...{ descendants: false }, isSignal: true }] }], hideIconTemplate: [{ type: i0.ContentChild, args: ['hideicon', { ...{ descendants: false }, isSignal: true }] }], showIconTemplate: [{ type: i0.ContentChild, args: ['showicon', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
1150
1090
|
class PasswordModule {
|
|
1151
1091
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PasswordModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1152
1092
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: PasswordModule, imports: [Password, PasswordDirective, SharedModule, BindModule], exports: [PasswordDirective, Password, SharedModule, BindModule] });
|