primevue 3.32.0 → 3.32.2
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/accordion/Accordion.d.ts +2 -2
- package/accordiontab/AccordionTab.d.ts +4 -3
- package/autocomplete/AutoComplete.d.ts +17 -7
- package/autocomplete/AutoComplete.vue +2 -2
- package/autocomplete/autocomplete.cjs.js +3 -2
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +3 -2
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +3 -2
- package/autocomplete/autocomplete.min.js +1 -1
- package/avatar/Avatar.d.ts +2 -2
- package/avatargroup/AvatarGroup.d.ts +2 -2
- package/badge/Badge.d.ts +2 -2
- package/badgedirective/BadgeDirective.d.ts +2 -1
- package/basecomponent/BaseComponent.vue +67 -12
- package/basecomponent/basecomponent.cjs.js +76 -22
- package/basecomponent/basecomponent.cjs.min.js +1 -1
- package/basecomponent/basecomponent.esm.js +76 -22
- package/basecomponent/basecomponent.esm.min.js +1 -1
- package/basecomponent/basecomponent.js +76 -22
- package/basecomponent/basecomponent.min.js +1 -1
- package/basedirective/basedirective.cjs.js +47 -7
- package/basedirective/basedirective.cjs.min.js +1 -1
- package/basedirective/basedirective.esm.js +47 -7
- package/basedirective/basedirective.esm.min.js +1 -1
- package/basedirective/basedirective.js +47 -7
- package/basedirective/basedirective.min.js +1 -1
- package/baseicon/BaseIcon.vue +44 -32
- package/baseicon/baseicon.cjs.js +19 -30
- package/baseicon/baseicon.cjs.min.js +1 -1
- package/baseicon/baseicon.esm.js +19 -30
- package/baseicon/baseicon.esm.min.js +1 -1
- package/baseicon/baseicon.js +20 -32
- package/baseicon/baseicon.min.js +1 -1
- package/blockui/BlockUI.d.ts +2 -2
- package/breadcrumb/Breadcrumb.d.ts +2 -2
- package/button/Button.d.ts +2 -2
- package/button/Button.vue +2 -2
- package/button/button.cjs.js +2 -2
- package/button/button.cjs.min.js +1 -1
- package/button/button.esm.js +2 -2
- package/button/button.esm.min.js +1 -1
- package/button/button.js +2 -2
- package/button/button.min.js +1 -1
- package/calendar/Calendar.d.ts +30 -6
- package/calendar/Calendar.vue +9 -8
- package/calendar/calendar.cjs.js +19 -10
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +19 -10
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +19 -10
- package/calendar/calendar.min.js +1 -1
- package/card/Card.d.ts +2 -2
- package/carousel/Carousel.d.ts +2 -2
- package/carousel/Carousel.vue +2 -1
- package/carousel/carousel.cjs.js +4 -3
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +4 -3
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +4 -3
- package/carousel/carousel.min.js +1 -1
- package/cascadeselect/CascadeSelect.d.ts +2 -2
- package/chart/Chart.d.ts +2 -2
- package/checkbox/Checkbox.d.ts +2 -2
- package/chip/Chip.d.ts +6 -4
- package/chips/Chips.d.ts +13 -4
- package/chips/Chips.vue +1 -1
- package/chips/chips.cjs.js +1 -0
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +1 -0
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +1 -0
- package/chips/chips.min.js +1 -1
- package/colorpicker/ColorPicker.d.ts +2 -2
- package/colorpicker/ColorPicker.vue +1 -40
- package/colorpicker/colorpicker.cjs.js +8 -47
- package/colorpicker/colorpicker.cjs.min.js +1 -1
- package/colorpicker/colorpicker.esm.js +8 -47
- package/colorpicker/colorpicker.esm.min.js +1 -1
- package/colorpicker/colorpicker.js +8 -47
- package/colorpicker/colorpicker.min.js +1 -1
- package/column/Column.d.ts +13 -10
- package/columngroup/ColumnGroup.d.ts +2 -2
- package/config/PrimeVue.d.ts +2 -2
- package/confirmdialog/ConfirmDialog.d.ts +3 -2
- package/confirmpopup/ConfirmPopup.d.ts +3 -2
- package/contextmenu/ContextMenu.d.ts +3 -2
- package/core/core.js +551 -489
- package/core/core.min.js +10 -10
- package/datatable/BodyCell.vue +2 -0
- package/datatable/DataTable.d.ts +4 -2
- package/datatable/DataTable.vue +45 -15
- package/datatable/TableBody.vue +1 -1
- package/datatable/datatable.cjs.js +119 -74
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.esm.js +119 -74
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +119 -74
- package/datatable/datatable.min.js +1 -1
- package/dataview/DataView.d.ts +2 -2
- package/dataview/DataView.vue +2 -1
- package/dataview/dataview.cjs.js +4 -3
- package/dataview/dataview.cjs.min.js +1 -1
- package/dataview/dataview.esm.js +4 -3
- package/dataview/dataview.esm.min.js +1 -1
- package/dataview/dataview.js +4 -3
- package/dataview/dataview.min.js +1 -1
- package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
- package/deferredcontent/DeferredContent.d.ts +2 -2
- package/dialog/Dialog.d.ts +13 -3
- package/dialog/Dialog.vue +10 -7
- package/dialog/dialog.cjs.js +13 -7
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +14 -8
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +13 -7
- package/dialog/dialog.min.js +1 -1
- package/divider/Divider.d.ts +2 -2
- package/dock/Dock.d.ts +2 -2
- package/dropdown/Dropdown.d.ts +21 -10
- package/dropdown/Dropdown.vue +9 -0
- package/dropdown/dropdown.cjs.js +8 -0
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +8 -0
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +8 -0
- package/dropdown/dropdown.min.js +1 -1
- package/editor/BaseEditor.vue +8 -6
- package/editor/Editor.d.ts +2 -2
- package/editor/editor.cjs.js +8 -6
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +8 -6
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +8 -6
- package/editor/editor.min.js +1 -1
- package/fieldset/Fieldset.d.ts +2 -2
- package/fileupload/FileUpload.d.ts +12 -7
- package/fileupload/FileUpload.vue +4 -0
- package/fileupload/fileupload.cjs.js +4 -0
- package/fileupload/fileupload.cjs.min.js +1 -1
- package/fileupload/fileupload.esm.js +4 -0
- package/fileupload/fileupload.esm.min.js +1 -1
- package/fileupload/fileupload.js +5 -2
- package/fileupload/fileupload.min.js +1 -1
- package/focustrap/FocusTrap.d.ts +2 -1
- package/galleria/Galleria.d.ts +2 -2
- package/galleria/GalleriaItem.vue +2 -2
- package/galleria/GalleriaThumbnails.vue +5 -1
- package/galleria/galleria.cjs.js +16 -7
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +16 -7
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +16 -7
- package/galleria/galleria.min.js +1 -1
- package/image/Image.d.ts +6 -4
- package/image/Image.vue +8 -6
- package/image/image.cjs.js +18 -5
- package/image/image.cjs.min.js +1 -1
- package/image/image.esm.js +19 -6
- package/image/image.esm.min.js +1 -1
- package/image/image.js +18 -5
- package/image/image.min.js +1 -1
- package/inlinemessage/InlineMessage.d.ts +2 -2
- package/inplace/Inplace.d.ts +2 -2
- package/inputmask/InputMask.d.ts +2 -2
- package/inputnumber/InputNumber.d.ts +2 -2
- package/inputnumber/InputNumber.vue +1 -0
- package/inputnumber/inputnumber.cjs.js +1 -0
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +1 -0
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +1 -0
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputswitch/InputSwitch.d.ts +2 -2
- package/inputtext/InputText.d.ts +2 -2
- package/knob/Knob.d.ts +2 -2
- package/listbox/Listbox.d.ts +11 -5
- package/megamenu/MegaMenu.d.ts +3 -2
- package/menu/Menu.d.ts +2 -2
- package/menubar/Menubar.d.ts +3 -2
- package/message/BaseMessage.vue +5 -0
- package/message/Message.d.ts +4 -2
- package/message/message.cjs.js +1 -1
- package/message/message.cjs.min.js +1 -1
- package/message/message.esm.js +1 -1
- package/message/message.esm.min.js +1 -1
- package/message/message.js +1 -1
- package/message/message.min.js +1 -1
- package/multiselect/MultiSelect.d.ts +16 -6
- package/multiselect/MultiSelect.vue +1 -1
- package/multiselect/multiselect.cjs.js +1 -0
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +1 -0
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +1 -0
- package/multiselect/multiselect.min.js +1 -1
- package/orderlist/OrderList.d.ts +2 -2
- package/organizationchart/OrganizationChart.d.ts +2 -2
- package/overlaypanel/OverlayPanel.d.ts +2 -2
- package/package.json +9 -4
- package/paginator/Paginator.d.ts +2 -2
- package/panel/Panel.d.ts +3 -2
- package/panelmenu/PanelMenu.d.ts +3 -2
- package/passthrough/index.cjs.js +16 -60
- package/passthrough/index.cjs.min.js +1 -1
- package/passthrough/index.d.ts +0 -9
- package/passthrough/index.esm.js +16 -60
- package/passthrough/index.esm.min.js +1 -1
- package/passthrough/index.js +18 -59
- package/passthrough/index.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +365 -359
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.d.ts +1 -2
- package/passthrough/tailwind/index.esm.js +365 -359
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +365 -359
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/Password.d.ts +6 -4
- package/password/Password.vue +1 -0
- package/password/password.cjs.js +2 -1
- package/password/password.cjs.min.js +1 -1
- package/password/password.esm.js +2 -1
- package/password/password.esm.min.js +1 -1
- package/password/password.js +2 -1
- package/password/password.min.js +1 -1
- package/picklist/PickList.d.ts +2 -2
- package/picklist/PickList.vue +9 -7
- package/picklist/picklist.cjs.js +27 -9
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +27 -9
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +27 -9
- package/picklist/picklist.min.js +1 -1
- package/progressbar/ProgressBar.d.ts +2 -2
- package/progressspinner/ProgressSpinner.d.ts +2 -2
- package/radiobutton/RadioButton.d.ts +2 -2
- package/rating/Rating.d.ts +3 -2
- package/resources/themes/arya-blue/theme.css +4 -4
- package/resources/themes/arya-green/theme.css +4 -4
- package/resources/themes/arya-orange/theme.css +4 -4
- package/resources/themes/arya-purple/theme.css +4 -4
- package/resources/themes/bootstrap4-dark-blue/theme.css +8 -11
- package/resources/themes/bootstrap4-dark-purple/theme.css +8 -11
- package/resources/themes/bootstrap4-light-blue/theme.css +8 -11
- package/resources/themes/bootstrap4-light-purple/theme.css +8 -11
- package/resources/themes/fluent-light/theme.css +4 -4
- package/resources/themes/lara-dark-blue/theme.css +4 -4
- package/resources/themes/lara-dark-indigo/theme.css +4 -4
- package/resources/themes/lara-dark-purple/theme.css +4 -4
- package/resources/themes/lara-dark-teal/theme.css +4 -4
- package/resources/themes/lara-light-blue/theme.css +4 -4
- package/resources/themes/lara-light-indigo/theme.css +4 -4
- package/resources/themes/lara-light-purple/theme.css +4 -4
- package/resources/themes/lara-light-teal/theme.css +4 -4
- package/resources/themes/luna-amber/theme.css +4 -4
- package/resources/themes/luna-blue/theme.css +4 -4
- package/resources/themes/luna-green/theme.css +4 -4
- package/resources/themes/luna-pink/theme.css +4 -4
- package/resources/themes/md-dark-deeppurple/theme.css +4 -4
- package/resources/themes/md-dark-indigo/theme.css +4 -4
- package/resources/themes/md-light-deeppurple/theme.css +4 -4
- package/resources/themes/md-light-indigo/theme.css +4 -4
- package/resources/themes/mdc-dark-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-dark-indigo/theme.css +4 -4
- package/resources/themes/mdc-light-deeppurple/theme.css +4 -4
- package/resources/themes/mdc-light-indigo/theme.css +4 -4
- package/resources/themes/mira/theme.css +4 -4
- package/resources/themes/nano/theme.css +4 -4
- package/resources/themes/nova/theme.css +4 -4
- package/resources/themes/nova-accent/theme.css +4 -4
- package/resources/themes/nova-alt/theme.css +4 -4
- package/resources/themes/nova-vue/theme.css +4 -4
- package/resources/themes/rhea/theme.css +4 -4
- package/resources/themes/saga-blue/theme.css +4 -4
- package/resources/themes/saga-green/theme.css +4 -4
- package/resources/themes/saga-orange/theme.css +4 -4
- package/resources/themes/saga-purple/theme.css +4 -4
- package/resources/themes/soho-dark/theme.css +4 -4
- package/resources/themes/soho-light/theme.css +4 -4
- package/resources/themes/tailwind-light/theme.css +4 -4
- package/resources/themes/vela-blue/theme.css +4 -4
- package/resources/themes/vela-green/theme.css +4 -4
- package/resources/themes/vela-orange/theme.css +4 -4
- package/resources/themes/vela-purple/theme.css +4 -4
- package/resources/themes/viva-dark/theme.css +4 -4
- package/resources/themes/viva-light/theme.css +4 -4
- package/ripple/Ripple.d.ts +2 -1
- package/scrollpanel/ScrollPanel.d.ts +2 -2
- package/scrolltop/ScrollTop.d.ts +2 -2
- package/selectbutton/SelectButton.d.ts +6 -2
- package/selectbutton/SelectButton.vue +2 -1
- package/selectbutton/selectbutton.cjs.js +2 -1
- package/selectbutton/selectbutton.cjs.min.js +1 -1
- package/selectbutton/selectbutton.esm.js +2 -1
- package/selectbutton/selectbutton.esm.min.js +1 -1
- package/selectbutton/selectbutton.js +2 -1
- package/selectbutton/selectbutton.min.js +1 -1
- package/sidebar/Sidebar.d.ts +10 -4
- package/sidebar/Sidebar.vue +2 -2
- package/sidebar/sidebar.cjs.js +4 -2
- package/sidebar/sidebar.cjs.min.js +1 -1
- package/sidebar/sidebar.esm.js +5 -3
- package/sidebar/sidebar.esm.min.js +1 -1
- package/sidebar/sidebar.js +4 -2
- package/sidebar/sidebar.min.js +1 -1
- package/skeleton/Skeleton.d.ts +2 -2
- package/slider/Slider.d.ts +2 -2
- package/speeddial/SpeedDial.d.ts +9 -7
- package/speeddial/SpeedDial.vue +1 -1
- package/speeddial/speeddial.cjs.js +1 -1
- package/speeddial/speeddial.cjs.min.js +1 -1
- package/speeddial/speeddial.esm.js +1 -1
- package/speeddial/speeddial.esm.min.js +1 -1
- package/speeddial/speeddial.js +1 -1
- package/speeddial/speeddial.min.js +1 -1
- package/splitbutton/SplitButton.d.ts +4 -2
- package/splitter/Splitter.d.ts +2 -2
- package/splitterpanel/SplitterPanel.d.ts +2 -2
- package/steps/Steps.d.ts +2 -2
- package/styleclass/StyleClass.d.ts +2 -1
- package/tabmenu/TabMenu.d.ts +2 -2
- package/tabpanel/TabPanel.d.ts +2 -2
- package/tabview/TabView.d.ts +2 -2
- package/tag/Tag.d.ts +2 -2
- package/terminal/Terminal.d.ts +2 -2
- package/textarea/Textarea.d.ts +2 -2
- package/tieredmenu/TieredMenu.d.ts +3 -2
- package/timeline/Timeline.d.ts +2 -2
- package/toast/BaseToast.vue +2 -0
- package/toast/Toast.d.ts +16 -4
- package/toast/toast.cjs.js +1 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +1 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +1 -1
- package/toast/toast.min.js +1 -1
- package/togglebutton/ToggleButton.d.ts +3 -2
- package/toolbar/Toolbar.d.ts +2 -2
- package/tooltip/Tooltip.d.ts +2 -1
- package/tree/Tree.d.ts +6 -2
- package/treeselect/TreeSelect.d.ts +3 -2
- package/treetable/TreeTable.d.ts +3 -2
- package/treetable/TreeTable.vue +4 -2
- package/treetable/treetable.cjs.js +6 -5
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +6 -5
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +6 -5
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/TriStateCheckbox.d.ts +5 -2
- package/ts-helpers.d.ts +2 -0
- package/virtualscroller/VirtualScroller.d.ts +8 -6
- package/web-types.json +1 -1
package/password/Password.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { InputTextPassThroughOptionType } from '../inputtext';
|
|
13
|
-
import { ClassComponent, GlobalComponentConstructor, Nullable } from '../ts-helpers';
|
|
13
|
+
import { ClassComponent, GlobalComponentConstructor, Nullable, PTOptions } from '../ts-helpers';
|
|
14
14
|
|
|
15
15
|
export declare type PasswordPassThroughOptionType = PasswordPassThroughAttributes | ((options: PasswordPassThroughMethodOptions) => PasswordPassThroughAttributes | string) | string | null | undefined;
|
|
16
16
|
|
|
@@ -243,7 +243,7 @@ export interface PasswordProps extends InputHTMLAttributes {
|
|
|
243
243
|
* Used to pass attributes to DOM elements inside the component.
|
|
244
244
|
* @type {PasswordPassThroughOptions}
|
|
245
245
|
*/
|
|
246
|
-
pt?: PasswordPassThroughOptions
|
|
246
|
+
pt?: PTOptions<PasswordPassThroughOptions>;
|
|
247
247
|
/**
|
|
248
248
|
* When enabled, it removes component related styles in the core.
|
|
249
249
|
* @defaultValue false
|
|
@@ -269,21 +269,23 @@ export interface PasswordSlots {
|
|
|
269
269
|
content(): VNode[];
|
|
270
270
|
/**
|
|
271
271
|
* Custom hide icon template.
|
|
272
|
+
* @param {Object} scope - hideicon slot's params.
|
|
272
273
|
*/
|
|
273
274
|
hideicon(scope: {
|
|
274
275
|
/**
|
|
275
276
|
* Hide icon click event
|
|
276
277
|
*/
|
|
277
|
-
onClick()
|
|
278
|
+
onClick: () => void;
|
|
278
279
|
}): VNode[];
|
|
279
280
|
/**
|
|
280
281
|
* Custom show icon template.
|
|
282
|
+
* @param {Object} scope - showicon slot's params.
|
|
281
283
|
*/
|
|
282
284
|
showicon(scope: {
|
|
283
285
|
/**
|
|
284
286
|
* Show icon click event
|
|
285
287
|
*/
|
|
286
|
-
onClick()
|
|
288
|
+
onClick: () => void;
|
|
287
289
|
}): VNode[];
|
|
288
290
|
}
|
|
289
291
|
|
package/password/Password.vue
CHANGED
package/password/password.cjs.js
CHANGED
|
@@ -437,6 +437,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
437
437
|
"aria-haspopup": true,
|
|
438
438
|
placeholder: _ctx.placeholder,
|
|
439
439
|
required: _ctx.required,
|
|
440
|
+
disabled: _ctx.disabled,
|
|
440
441
|
onInput: $options.onInput,
|
|
441
442
|
onFocus: $options.onFocus,
|
|
442
443
|
onBlur: $options.onBlur,
|
|
@@ -444,7 +445,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
444
445
|
onInvalid: $options.onInvalid
|
|
445
446
|
}, _objectSpread(_objectSpread({}, _ctx.inputProps), _ctx.ptm('input')), {
|
|
446
447
|
unstyled: _ctx.unstyled
|
|
447
|
-
}), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "unstyled"]), _ctx.toggleMask && $data.unmasked ? vue.renderSlot(_ctx.$slots, "hideicon", {
|
|
448
|
+
}), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "disabled", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "unstyled"]), _ctx.toggleMask && $data.unmasked ? vue.renderSlot(_ctx.$slots, "hideicon", {
|
|
448
449
|
key: 0,
|
|
449
450
|
onClick: $options.onMaskToggle
|
|
450
451
|
}, function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("primevue/icons/eye"),t=require("primevue/icons/eyeslash"),n=require("primevue/inputtext"),r=require("primevue/overlayeventbus"),i=require("primevue/portal"),l=require("primevue/utils"),o=require("primevue/basecomponent"),s=require("primevue/usestyle"),a=require("vue");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(e),d=u(t),c=u(n),f=u(r),m=u(i),h=u(o),y={root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}},v=s.useStyle("\n.p-password {\n display: inline-flex;\n}\n\n.p-password .p-password-panel {\n min-width: 100%;\n}\n\n.p-password-meter {\n height: 10px;\n}\n\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n\n.p-fluid .p-password {\n display: flex;\n}\n\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n",{name:"password",manual:!0}),g={name:"Password",extends:{name:"BasePassword",extends:h.default,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.instance;return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":t.filled,"p-inputwrapper-focus":t.focused,"p-input-icon-right":e.props.toggleMask}]},input:function(e){return["p-password-input",{"p-disabled":e.props.disabled}]},panel:function(e){var t=e.instance;return["p-password-panel p-component",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},meter:"p-password-meter",meterLabel:function(e){var t=e.instance;return"p-password-strength ".concat(t.meter?t.meter.strength:"")},info:"p-password-info"},inlineStyles:y,loadStyle:v.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(l.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){l.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),l.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){l.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?l.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=l.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",l.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new l.ConnectedOverlayScrollHandler(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!l.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){f.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return l.UniqueComponentId()+"_panel"}},components:{PInputText:c.default,Portal:m.default,EyeSlashIcon:d.default,EyeIcon:p.default}};function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){var t=L(e,"string");return"symbol"===b(t)?t:String(t)}function L(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var P=["id"];g.render=function(e,t,n,r,i,l){var o=a.resolveComponent("PInputText"),s=a.resolveComponent("Portal");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[a.createVNode(o,a.mergeProps({ref:"input",id:e.inputId,type:l.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||l.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,onInput:l.onInput,onFocus:l.onFocus,onBlur:l.onBlur,onKeyup:l.onKeyUp,onInvalid:l.onInvalid},k(k({},e.inputProps),e.ptm("input")),{unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid","unstyled"]),e.toggleMask&&i.unmasked?a.renderSlot(e.$slots,"hideicon",{key:0,onClick:l.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"i":"EyeSlashIcon"),a.mergeProps({class:e.hideIcon,onClick:l.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),e.toggleMask&&!i.unmasked?a.renderSlot(e.$slots,"showicon",{key:1,onClick:l.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"i":"EyeIcon"),a.mergeProps({class:e.showIcon,onClick:l.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),a.toDisplayString(i.infoText),17),a.createVNode(s,{appendTo:e.appendTo},{default:a.withCtx((function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:a.withCtx((function(){return[i.overlayVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:l.overlayRef,id:e.panelId||l.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)})},k(k({},e.panelProps),e.ptm("panel"))),[a.renderSlot(e.$slots,"header"),a.renderSlot(e.$slots,"content",{},(function(){return[a.createElementVNode("div",a.mergeProps({class:e.cx("meter")},e.ptm("meter")),[a.createElementVNode("div",a.mergeProps({class:e.cx("meterLabel"),style:{width:i.meter?i.meter.width:""}},e.ptm("meterLabel")),null,16)],16),a.createElementVNode("div",a.mergeProps({class:e.cx("info")},e.ptm("info")),a.toDisplayString(i.infoText),17)]})),a.renderSlot(e.$slots,"footer")],16,P)):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},module.exports=g;
|
|
1
|
+
"use strict";var e=require("primevue/icons/eye"),t=require("primevue/icons/eyeslash"),n=require("primevue/inputtext"),r=require("primevue/overlayeventbus"),i=require("primevue/portal"),l=require("primevue/utils"),o=require("primevue/basecomponent"),s=require("primevue/usestyle"),a=require("vue");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(e),d=u(t),c=u(n),f=u(r),m=u(i),h=u(o),y={root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}},v=s.useStyle("\n.p-password {\n display: inline-flex;\n}\n\n.p-password .p-password-panel {\n min-width: 100%;\n}\n\n.p-password-meter {\n height: 10px;\n}\n\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n\n.p-fluid .p-password {\n display: flex;\n}\n\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n",{name:"password",manual:!0}),g={name:"Password",extends:{name:"BasePassword",extends:h.default,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.instance;return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":t.filled,"p-inputwrapper-focus":t.focused,"p-input-icon-right":e.props.toggleMask}]},input:function(e){return["p-password-input",{"p-disabled":e.props.disabled}]},panel:function(e){var t=e.instance;return["p-password-panel p-component",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},meter:"p-password-meter",meterLabel:function(e){var t=e.instance;return"p-password-strength ".concat(t.meter?t.meter.strength:"")},info:"p-password-info"},inlineStyles:y,loadStyle:v.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(l.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){l.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),l.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){l.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?l.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=l.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",l.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new l.ConnectedOverlayScrollHandler(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!l.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){f.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return l.UniqueComponentId()+"_panel"}},components:{PInputText:c.default,Portal:m.default,EyeSlashIcon:d.default,EyeIcon:p.default}};function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){var t=L(e,"string");return"symbol"===b(t)?t:String(t)}function L(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var P=["id"];g.render=function(e,t,n,r,i,l){var o=a.resolveComponent("PInputText"),s=a.resolveComponent("Portal");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[a.createVNode(o,a.mergeProps({ref:"input",id:e.inputId,type:l.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||l.panelUniqueId,"aria-expanded":i.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,disabled:e.disabled,onInput:l.onInput,onFocus:l.onFocus,onBlur:l.onBlur,onKeyup:l.onKeyUp,onInvalid:l.onInvalid},k(k({},e.inputProps),e.ptm("input")),{unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","onInput","onFocus","onBlur","onKeyup","onInvalid","unstyled"]),e.toggleMask&&i.unmasked?a.renderSlot(e.$slots,"hideicon",{key:0,onClick:l.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"i":"EyeSlashIcon"),a.mergeProps({class:e.hideIcon,onClick:l.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),e.toggleMask&&!i.unmasked?a.renderSlot(e.$slots,"showicon",{key:1,onClick:l.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"i":"EyeIcon"),a.mergeProps({class:e.showIcon,onClick:l.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),a.toDisplayString(i.infoText),17),a.createVNode(s,{appendTo:e.appendTo},{default:a.withCtx((function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:a.withCtx((function(){return[i.overlayVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:l.overlayRef,id:e.panelId||l.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)})},k(k({},e.panelProps),e.ptm("panel"))),[a.renderSlot(e.$slots,"header"),a.renderSlot(e.$slots,"content",{},(function(){return[a.createElementVNode("div",a.mergeProps({class:e.cx("meter")},e.ptm("meter")),[a.createElementVNode("div",a.mergeProps({class:e.cx("meterLabel"),style:{width:i.meter?i.meter.width:""}},e.ptm("meterLabel")),null,16)],16),a.createElementVNode("div",a.mergeProps({class:e.cx("info")},e.ptm("info")),a.toDisplayString(i.infoText),17)]})),a.renderSlot(e.$slots,"footer")],16,P)):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},module.exports=g;
|
package/password/password.esm.js
CHANGED
|
@@ -426,6 +426,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
426
426
|
"aria-haspopup": true,
|
|
427
427
|
placeholder: _ctx.placeholder,
|
|
428
428
|
required: _ctx.required,
|
|
429
|
+
disabled: _ctx.disabled,
|
|
429
430
|
onInput: $options.onInput,
|
|
430
431
|
onFocus: $options.onFocus,
|
|
431
432
|
onBlur: $options.onBlur,
|
|
@@ -433,7 +434,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
433
434
|
onInvalid: $options.onInvalid
|
|
434
435
|
}, _objectSpread(_objectSpread({}, _ctx.inputProps), _ctx.ptm('input')), {
|
|
435
436
|
unstyled: _ctx.unstyled
|
|
436
|
-
}), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "unstyled"]), _ctx.toggleMask && $data.unmasked ? renderSlot(_ctx.$slots, "hideicon", {
|
|
437
|
+
}), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "disabled", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "unstyled"]), _ctx.toggleMask && $data.unmasked ? renderSlot(_ctx.$slots, "hideicon", {
|
|
437
438
|
key: 0,
|
|
438
439
|
onClick: $options.onMaskToggle
|
|
439
440
|
}, function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"primevue/icons/eye";import t from"primevue/icons/eyeslash";import n from"primevue/inputtext";import i from"primevue/overlayeventbus";import r from"primevue/portal";import{ZIndexUtils as l,DomHandler as o,ConnectedOverlayScrollHandler as s,UniqueComponentId as a}from"primevue/utils";import u from"primevue/basecomponent";import{useStyle as p}from"primevue/usestyle";import{resolveComponent as d,openBlock as c,createElementBlock as f,mergeProps as h,createVNode as m,renderSlot as y,createBlock as v,resolveDynamicComponent as b,createCommentVNode as g,createElementVNode as w,toDisplayString as k,withCtx as S,Transition as x}from"vue";var L={root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}},O=p("\n.p-password {\n display: inline-flex;\n}\n\n.p-password .p-password-panel {\n min-width: 100%;\n}\n\n.p-password-meter {\n height: 10px;\n}\n\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n\n.p-fluid .p-password {\n display: flex;\n}\n\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n",{name:"password",manual:!0}),I={name:"Password",extends:{name:"BasePassword",extends:u,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.instance;return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":t.filled,"p-inputwrapper-focus":t.focused,"p-input-icon-right":e.props.toggleMask}]},input:function(e){return["p-password-input",{"p-disabled":e.props.disabled}]},panel:function(e){var t=e.instance;return["p-password-panel p-component",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},meter:"p-password-meter",meterLabel:function(e){var t=e.instance;return"p-password-strength ".concat(t.meter?t.meter.strength:"")},info:"p-password-info"},inlineStyles:L,loadStyle:O.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(l.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){l.set("overlay",e,this.$primevue.config.zIndex.overlay),o.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){l.clear(e)},alignOverlay:function(){"self"===this.appendTo?o.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=o.getOuterWidth(this.$refs.input.$el)+"px",o.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new s(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!o.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){i.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return a()+"_panel"}},components:{PInputText:n,Portal:r,EyeSlashIcon:t,EyeIcon:e}};function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){var t=C(e,"string");return"symbol"===T(t)?t:String(t)}function C(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==T(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var R=["id"];I.render=function(e,t,n,i,r,l){var o=d("PInputText"),s=d("Portal");return c(),f("div",h({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[m(o,h({ref:"input",id:e.inputId,type:l.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||l.panelUniqueId,"aria-expanded":r.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,onInput:l.onInput,onFocus:l.onFocus,onBlur:l.onBlur,onKeyup:l.onKeyUp,onInvalid:l.onInvalid},$($({},e.inputProps),e.ptm("input")),{unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid","unstyled"]),e.toggleMask&&r.unmasked?y(e.$slots,"hideicon",{key:0,onClick:l.onMaskToggle},(function(){return[(c(),v(b(e.hideIcon?"i":"EyeSlashIcon"),h({class:e.hideIcon,onClick:l.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):g("",!0),e.toggleMask&&!r.unmasked?y(e.$slots,"showicon",{key:1,onClick:l.onMaskToggle},(function(){return[(c(),v(b(e.showIcon?"i":"EyeIcon"),h({class:e.showIcon,onClick:l.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):g("",!0),w("span",h({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),k(r.infoText),17),m(s,{appendTo:e.appendTo},{default:S((function(){return[m(x,h({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:S((function(){return[r.overlayVisible?(c(),f("div",h({key:0,ref:l.overlayRef,id:e.panelId||l.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)})},$($({},e.panelProps),e.ptm("panel"))),[y(e.$slots,"header"),y(e.$slots,"content",{},(function(){return[w("div",h({class:e.cx("meter")},e.ptm("meter")),[w("div",h({class:e.cx("meterLabel"),style:{width:r.meter?r.meter.width:""}},e.ptm("meterLabel")),null,16)],16),w("div",h({class:e.cx("info")},e.ptm("info")),k(r.infoText),17)]})),y(e.$slots,"footer")],16,R)):g("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)};export{I as default};
|
|
1
|
+
import e from"primevue/icons/eye";import t from"primevue/icons/eyeslash";import n from"primevue/inputtext";import i from"primevue/overlayeventbus";import r from"primevue/portal";import{ZIndexUtils as l,DomHandler as o,ConnectedOverlayScrollHandler as s,UniqueComponentId as a}from"primevue/utils";import u from"primevue/basecomponent";import{useStyle as p}from"primevue/usestyle";import{resolveComponent as d,openBlock as c,createElementBlock as f,mergeProps as h,createVNode as m,renderSlot as y,createBlock as v,resolveDynamicComponent as b,createCommentVNode as g,createElementVNode as w,toDisplayString as k,withCtx as S,Transition as x}from"vue";var L={root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}},O=p("\n.p-password {\n display: inline-flex;\n}\n\n.p-password .p-password-panel {\n min-width: 100%;\n}\n\n.p-password-meter {\n height: 10px;\n}\n\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n\n.p-fluid .p-password {\n display: flex;\n}\n\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n",{name:"password",manual:!0}),I={name:"Password",extends:{name:"BasePassword",extends:u,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.instance;return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":t.filled,"p-inputwrapper-focus":t.focused,"p-input-icon-right":e.props.toggleMask}]},input:function(e){return["p-password-input",{"p-disabled":e.props.disabled}]},panel:function(e){var t=e.instance;return["p-password-panel p-component",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},meter:"p-password-meter",meterLabel:function(e){var t=e.instance;return"p-password-strength ".concat(t.meter?t.meter.strength:"")},info:"p-password-info"},inlineStyles:L,loadStyle:O.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(l.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){l.set("overlay",e,this.$primevue.config.zIndex.overlay),o.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){l.clear(e)},alignOverlay:function(){"self"===this.appendTo?o.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=o.getOuterWidth(this.$refs.input.$el)+"px",o.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new s(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!o.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){i.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return a()+"_panel"}},components:{PInputText:n,Portal:r,EyeSlashIcon:t,EyeIcon:e}};function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function V(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e){var t=C(e,"string");return"symbol"===T(t)?t:String(t)}function C(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==T(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var R=["id"];I.render=function(e,t,n,i,r,l){var o=d("PInputText"),s=d("Portal");return c(),f("div",h({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[m(o,h({ref:"input",id:e.inputId,type:l.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||l.panelUniqueId,"aria-expanded":r.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,disabled:e.disabled,onInput:l.onInput,onFocus:l.onFocus,onBlur:l.onBlur,onKeyup:l.onKeyUp,onInvalid:l.onInvalid},$($({},e.inputProps),e.ptm("input")),{unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","onInput","onFocus","onBlur","onKeyup","onInvalid","unstyled"]),e.toggleMask&&r.unmasked?y(e.$slots,"hideicon",{key:0,onClick:l.onMaskToggle},(function(){return[(c(),v(b(e.hideIcon?"i":"EyeSlashIcon"),h({class:e.hideIcon,onClick:l.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):g("",!0),e.toggleMask&&!r.unmasked?y(e.$slots,"showicon",{key:1,onClick:l.onMaskToggle},(function(){return[(c(),v(b(e.showIcon?"i":"EyeIcon"),h({class:e.showIcon,onClick:l.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):g("",!0),w("span",h({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),k(r.infoText),17),m(s,{appendTo:e.appendTo},{default:S((function(){return[m(x,h({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:S((function(){return[r.overlayVisible?(c(),f("div",h({key:0,ref:l.overlayRef,id:e.panelId||l.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)})},$($({},e.panelProps),e.ptm("panel"))),[y(e.$slots,"header"),y(e.$slots,"content",{},(function(){return[w("div",h({class:e.cx("meter")},e.ptm("meter")),[w("div",h({class:e.cx("meterLabel"),style:{width:r.meter?r.meter.width:""}},e.ptm("meterLabel")),null,16)],16),w("div",h({class:e.cx("info")},e.ptm("info")),k(r.infoText),17)]})),y(e.$slots,"footer")],16,R)):g("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)};export{I as default};
|
package/password/password.js
CHANGED
|
@@ -429,6 +429,7 @@ this.primevue.password = (function (EyeIcon, EyeSlashIcon, InputText, OverlayEve
|
|
|
429
429
|
"aria-haspopup": true,
|
|
430
430
|
placeholder: _ctx.placeholder,
|
|
431
431
|
required: _ctx.required,
|
|
432
|
+
disabled: _ctx.disabled,
|
|
432
433
|
onInput: $options.onInput,
|
|
433
434
|
onFocus: $options.onFocus,
|
|
434
435
|
onBlur: $options.onBlur,
|
|
@@ -436,7 +437,7 @@ this.primevue.password = (function (EyeIcon, EyeSlashIcon, InputText, OverlayEve
|
|
|
436
437
|
onInvalid: $options.onInvalid
|
|
437
438
|
}, _objectSpread(_objectSpread({}, _ctx.inputProps), _ctx.ptm('input')), {
|
|
438
439
|
unstyled: _ctx.unstyled
|
|
439
|
-
}), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "unstyled"]), _ctx.toggleMask && $data.unmasked ? vue.renderSlot(_ctx.$slots, "hideicon", {
|
|
440
|
+
}), null, 16, ["id", "type", "class", "style", "value", "aria-labelledby", "aria-label", "aria-controls", "aria-expanded", "placeholder", "required", "disabled", "onInput", "onFocus", "onBlur", "onKeyup", "onInvalid", "unstyled"]), _ctx.toggleMask && $data.unmasked ? vue.renderSlot(_ctx.$slots, "hideicon", {
|
|
440
441
|
key: 0,
|
|
441
442
|
onClick: $options.onMaskToggle
|
|
442
443
|
}, function () {
|
package/password/password.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primevue=this.primevue||{},this.primevue.password=function(e,t,n,i,r,l,o,s,a){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(e),d=u(t),c=u(n),f=u(i),m=u(r),h=u(o),y={root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}},v=s.useStyle("\n.p-password {\n display: inline-flex;\n}\n\n.p-password .p-password-panel {\n min-width: 100%;\n}\n\n.p-password-meter {\n height: 10px;\n}\n\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n\n.p-fluid .p-password {\n display: flex;\n}\n\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n",{name:"password",manual:!0}),g={name:"Password",extends:{name:"BasePassword",extends:h.default,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.instance;return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":t.filled,"p-inputwrapper-focus":t.focused,"p-input-icon-right":e.props.toggleMask}]},input:function(e){return["p-password-input",{"p-disabled":e.props.disabled}]},panel:function(e){var t=e.instance;return["p-password-panel p-component",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},meter:"p-password-meter",meterLabel:function(e){var t=e.instance;return"p-password-strength ".concat(t.meter?t.meter.strength:"")},info:"p-password-info"},inlineStyles:y,loadStyle:v.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(l.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){l.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),l.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){l.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?l.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=l.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",l.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new l.ConnectedOverlayScrollHandler(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!l.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){f.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return l.UniqueComponentId()+"_panel"}},components:{PInputText:c.default,Portal:m.default,EyeSlashIcon:d.default,EyeIcon:p.default}};function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){var t=L(e,"string");return"symbol"===b(t)?t:String(t)}function L(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==b(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var P=["id"];return g.render=function(e,t,n,i,r,l){var o=a.resolveComponent("PInputText"),s=a.resolveComponent("Portal");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[a.createVNode(o,a.mergeProps({ref:"input",id:e.inputId,type:l.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||l.panelUniqueId,"aria-expanded":r.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,onInput:l.onInput,onFocus:l.onFocus,onBlur:l.onBlur,onKeyup:l.onKeyUp,onInvalid:l.onInvalid},k(k({},e.inputProps),e.ptm("input")),{unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","onInput","onFocus","onBlur","onKeyup","onInvalid","unstyled"]),e.toggleMask&&r.unmasked?a.renderSlot(e.$slots,"hideicon",{key:0,onClick:l.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"i":"EyeSlashIcon"),a.mergeProps({class:e.hideIcon,onClick:l.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),e.toggleMask&&!r.unmasked?a.renderSlot(e.$slots,"showicon",{key:1,onClick:l.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"i":"EyeIcon"),a.mergeProps({class:e.showIcon,onClick:l.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),a.toDisplayString(r.infoText),17),a.createVNode(s,{appendTo:e.appendTo},{default:a.withCtx((function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:a.withCtx((function(){return[r.overlayVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:l.overlayRef,id:e.panelId||l.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)})},k(k({},e.panelProps),e.ptm("panel"))),[a.renderSlot(e.$slots,"header"),a.renderSlot(e.$slots,"content",{},(function(){return[a.createElementVNode("div",a.mergeProps({class:e.cx("meter")},e.ptm("meter")),[a.createElementVNode("div",a.mergeProps({class:e.cx("meterLabel"),style:{width:r.meter?r.meter.width:""}},e.ptm("meterLabel")),null,16)],16),a.createElementVNode("div",a.mergeProps({class:e.cx("info")},e.ptm("info")),a.toDisplayString(r.infoText),17)]})),a.renderSlot(e.$slots,"footer")],16,P)):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},g}(primevue.icons.eye,primevue.icons.eyeslash,primevue.inputtext,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
|
1
|
+
this.primevue=this.primevue||{},this.primevue.password=function(e,t,n,i,r,l,o,s,a){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=u(e),d=u(t),c=u(n),f=u(i),m=u(r),h=u(o),y={root:function(e){return{position:"self"===e.props.appendTo?"relative":void 0}}},v=s.useStyle("\n.p-password {\n display: inline-flex;\n}\n\n.p-password .p-password-panel {\n min-width: 100%;\n}\n\n.p-password-meter {\n height: 10px;\n}\n\n.p-password-strength {\n height: 100%;\n width: 0;\n transition: width 1s ease-in-out;\n}\n\n.p-fluid .p-password {\n display: flex;\n}\n\n.p-password-input::-ms-reveal,\n.p-password-input::-ms-clear {\n display: none;\n}\n",{name:"password",manual:!0}),g={name:"Password",extends:{name:"BasePassword",extends:h.default,props:{modelValue:String,promptLabel:{type:String,default:null},mediumRegex:{type:String,default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:String,default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:String,default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},css:{classes:{root:function(e){var t=e.instance;return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":t.filled,"p-inputwrapper-focus":t.focused,"p-input-icon-right":e.props.toggleMask}]},input:function(e){return["p-password-input",{"p-disabled":e.props.disabled}]},panel:function(e){var t=e.instance;return["p-password-panel p-component",{"p-input-filled":"filled"===t.$primevue.config.inputStyle,"p-ripple-disabled":!1===t.$primevue.config.ripple}]},meter:"p-password-meter",meterLabel:function(e){var t=e.instance;return"p-password-strength ".concat(t.meter?t.meter.strength:"")},info:"p-password-info"},inlineStyles:y,loadStyle:v.load},provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","invalid"],data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(l.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(e){l.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),l.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener()},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(e){l.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?l.DomHandler.relativePosition(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=l.DomHandler.getOuterWidth(this.$refs.input.$el)+"px",l.DomHandler.absolutePosition(this.overlay,this.$refs.input.$el))},testStrength:function(e){var t=0;return this.strongCheckRegExp.test(e)?t=3:this.mediumCheckRegExp.test(e)?t=2:e.length&&(t=1),t},onInput:function(e){this.$emit("update:modelValue",e.target.value),this.$emit("change",e)},onFocus:function(e){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.modelValue),this.overlayVisible=!0),this.$emit("focus",e)},onBlur:function(e){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",e)},onKeyUp:function(e){if(this.feedback){var t=this.checkPasswordStrength(e.target.value),n=t.label;if(this.meter=t.meter,this.infoText=n,"Escape"===e.code)return void(this.overlayVisible&&(this.overlayVisible=!1));this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(this.modelValue){var e=this.checkPasswordStrength(this.modelValue),t=e.label;this.meter=e.meter,this.infoText=t,this.overlayVisible||(this.overlayVisible=!0)}},checkPasswordStrength:function(e){var t=null,n=null;switch(this.testStrength(e)){case 1:t=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:t=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:t=this.strongText,n={strength:"strong",width:"100%"};break;default:t=this.promptText,n=null}return{label:t,meter:n}},onInvalid:function(e){this.$emit("invalid",e)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new l.ConnectedOverlayScrollHandler(this.$refs.input.$el,(function(){e.overlayVisible&&(e.overlayVisible=!1)}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!l.DomHandler.isTouchDevice()&&(e.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(e){this.overlay=e},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(e){f.default.emit("overlay-click",{originalEvent:e,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},filled:function(){return null!=this.modelValue&&this.modelValue.toString().length>0},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},panelUniqueId:function(){return l.UniqueComponentId()+"_panel"}},components:{PInputText:c.default,Portal:m.default,EyeSlashIcon:d.default,EyeIcon:p.default}};function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){var t=L(e,"string");return"symbol"===b(t)?t:String(t)}function L(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==b(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var P=["id"];return g.render=function(e,t,n,i,r,l){var o=a.resolveComponent("PInputText"),s=a.resolveComponent("Portal");return a.openBlock(),a.createElementBlock("div",a.mergeProps({class:e.cx("root"),style:e.sx("root")},e.ptm("root"),{"data-pc-name":"password"}),[a.createVNode(o,a.mergeProps({ref:"input",id:e.inputId,type:l.inputType,class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.modelValue,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.panelProps&&e.panelProps.id||e.panelId||l.panelUniqueId,"aria-expanded":r.overlayVisible,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,disabled:e.disabled,onInput:l.onInput,onFocus:l.onFocus,onBlur:l.onBlur,onKeyup:l.onKeyUp,onInvalid:l.onInvalid},k(k({},e.inputProps),e.ptm("input")),{unstyled:e.unstyled}),null,16,["id","type","class","style","value","aria-labelledby","aria-label","aria-controls","aria-expanded","placeholder","required","disabled","onInput","onFocus","onBlur","onKeyup","onInvalid","unstyled"]),e.toggleMask&&r.unmasked?a.renderSlot(e.$slots,"hideicon",{key:0,onClick:l.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.hideIcon?"i":"EyeSlashIcon"),a.mergeProps({class:e.hideIcon,onClick:l.onMaskToggle},e.ptm("hideIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),e.toggleMask&&!r.unmasked?a.renderSlot(e.$slots,"showicon",{key:1,onClick:l.onMaskToggle},(function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.showIcon?"i":"EyeIcon"),a.mergeProps({class:e.showIcon,onClick:l.onMaskToggle},e.ptm("showIcon")),null,16,["class","onClick"]))]})):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),a.toDisplayString(r.infoText),17),a.createVNode(s,{appendTo:e.appendTo},{default:a.withCtx((function(){return[a.createVNode(a.Transition,a.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:a.withCtx((function(){return[r.overlayVisible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,ref:l.overlayRef,id:e.panelId||l.panelUniqueId,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[0]||(t[0]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)})},k(k({},e.panelProps),e.ptm("panel"))),[a.renderSlot(e.$slots,"header"),a.renderSlot(e.$slots,"content",{},(function(){return[a.createElementVNode("div",a.mergeProps({class:e.cx("meter")},e.ptm("meter")),[a.createElementVNode("div",a.mergeProps({class:e.cx("meterLabel"),style:{width:r.meter?r.meter.width:""}},e.ptm("meterLabel")),null,16)],16),a.createElementVNode("div",a.mergeProps({class:e.cx("info")},e.ptm("info")),a.toDisplayString(r.infoText),17)]})),a.renderSlot(e.$slots,"footer")],16,P)):a.createCommentVNode("",!0)]})),_:3},16,["onEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},g}(primevue.icons.eye,primevue.icons.eyeslash,primevue.inputtext,primevue.overlayeventbus,primevue.portal,primevue.utils,primevue.basecomponent,primevue.usestyle,Vue);
|
package/picklist/PickList.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { ButtonHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue';
|
|
11
11
|
import { ComponentHooks } from '../basecomponent';
|
|
12
12
|
import { ButtonPassThroughOptionType } from '../button';
|
|
13
|
-
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
13
|
+
import { ClassComponent, GlobalComponentConstructor, PTOptions } from '../ts-helpers';
|
|
14
14
|
|
|
15
15
|
export declare type PickListPassThroughOptionType = PickListPassThroughAttributes | ((options: PickListPassThroughMethodOptions) => PickListPassThroughAttributes | string) | string | null | undefined;
|
|
16
16
|
|
|
@@ -373,7 +373,7 @@ export interface PickListProps {
|
|
|
373
373
|
* Used to pass attributes to DOM elements inside the component.
|
|
374
374
|
* @type {PickListPassThroughOptions}
|
|
375
375
|
*/
|
|
376
|
-
pt?: PickListPassThroughOptions
|
|
376
|
+
pt?: PTOptions<PickListPassThroughOptions>;
|
|
377
377
|
/**
|
|
378
378
|
* When enabled, it removes component related styles in the core.
|
|
379
379
|
* @defaultValue false
|
package/picklist/PickList.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="cx('root')" v-bind="ptm('root')">
|
|
3
|
-
<div v-if="showSourceControls" :class="cx('sourceControls')" v-bind="ptm('sourceControls')">
|
|
3
|
+
<div v-if="showSourceControls" :class="cx('sourceControls')" v-bind="ptm('sourceControls')" data-pc-group-section="controls">
|
|
4
4
|
<slot name="sourcecontrolsstart"></slot>
|
|
5
5
|
<PLButton :aria-label="moveUpAriaLabel" :disabled="moveDisabled(0)" type="button" @click="moveUp($event, 0)" :pt="ptm('sourceMoveUpButton')" v-bind="moveUpButtonProps" :unstyled="unstyled">
|
|
6
6
|
<template #icon>
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
</PLButton>
|
|
33
33
|
<slot name="sourcecontrolsend"></slot>
|
|
34
34
|
</div>
|
|
35
|
-
<div :class="cx('sourceWrapper')" v-bind="ptm('sourceWrapper')">
|
|
36
|
-
<div v-if="$slots.sourceheader" :class="cx('sourceHeader')" v-bind="ptm('sourceHeader')">
|
|
35
|
+
<div :class="cx('sourceWrapper')" v-bind="ptm('sourceWrapper')" data-pc-group-section="listwrapper">
|
|
36
|
+
<div v-if="$slots.sourceheader" :class="cx('sourceHeader')" v-bind="ptm('sourceHeader')" data-pc-group-section="header">
|
|
37
37
|
<slot name="sourceheader"></slot>
|
|
38
38
|
</div>
|
|
39
39
|
<transition-group
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
@blur="onListBlur($event, 'sourceList')"
|
|
52
52
|
@keydown="onItemKeyDown($event, 'sourceList')"
|
|
53
53
|
v-bind="{ ...sourceListProps, ...ptm('sourceList'), ...ptm('transition') }"
|
|
54
|
+
data-pc-group-section="list"
|
|
54
55
|
>
|
|
55
56
|
<template v-for="(item, i) of sourceList" :key="getItemKey(item, i)">
|
|
56
57
|
<li
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
</template>
|
|
73
74
|
</transition-group>
|
|
74
75
|
</div>
|
|
75
|
-
<div :class="cx('buttons')" v-bind="ptm('buttons')">
|
|
76
|
+
<div :class="cx('buttons')" v-bind="ptm('buttons')" data-pc-group-section="controls">
|
|
76
77
|
<slot name="movecontrolsstart"></slot>
|
|
77
78
|
<PLButton :aria-label="moveToTargetAriaLabel" type="button" @click="moveToTarget" :disabled="moveDisabled(0)" :pt="ptm('moveToTargetButton')" v-bind="moveToTargetProps" :unstyled="unstyled">
|
|
78
79
|
<template #icon>
|
|
@@ -104,8 +105,8 @@
|
|
|
104
105
|
</PLButton>
|
|
105
106
|
<slot name="movecontrolsend"></slot>
|
|
106
107
|
</div>
|
|
107
|
-
<div :class="cx('targetWrapper')" v-bind="ptm('targetWrapper')">
|
|
108
|
-
<div v-if="$slots.targetheader" :class="cx('targetHeader')" v-bind="ptm('targetHeader')">
|
|
108
|
+
<div :class="cx('targetWrapper')" v-bind="ptm('targetWrapper')" data-pc-group-section="listwrapper">
|
|
109
|
+
<div v-if="$slots.targetheader" :class="cx('targetHeader')" v-bind="ptm('targetHeader')" data-pc-group-section="header">
|
|
109
110
|
<slot name="targetheader"></slot>
|
|
110
111
|
</div>
|
|
111
112
|
<transition-group
|
|
@@ -123,6 +124,7 @@
|
|
|
123
124
|
@blur="onListBlur($event, 'targetList')"
|
|
124
125
|
@keydown="onItemKeyDown($event, 'targetList')"
|
|
125
126
|
v-bind="{ ...targetListProps, ...ptm('targetList'), ...ptm('transition') }"
|
|
127
|
+
data-pc-group-section="list"
|
|
126
128
|
>
|
|
127
129
|
<template v-for="(item, i) of targetList" :key="getItemKey(item, i)">
|
|
128
130
|
<li
|
|
@@ -145,7 +147,7 @@
|
|
|
145
147
|
</template>
|
|
146
148
|
</transition-group>
|
|
147
149
|
</div>
|
|
148
|
-
<div v-if="showTargetControls" :class="cx('targetControls')" v-bind="ptm('targetControls')">
|
|
150
|
+
<div v-if="showTargetControls" :class="cx('targetControls')" v-bind="ptm('targetControls')" data-pc-group-section="controls">
|
|
149
151
|
<slot name="targetcontrolsstart"></slot>
|
|
150
152
|
<PLButton :aria-label="moveUpAriaLabel" :disabled="moveDisabled(1)" type="button" @click="moveUp($event, 1)" :pt="ptm('targetMoveUpButton')" v-bind="moveUpButtonProps" :unstyled="unstyled">
|
|
151
153
|
<template #icon>
|
package/picklist/picklist.cjs.js
CHANGED
|
@@ -786,7 +786,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
786
786
|
}, _ctx.ptm('root')), [_ctx.showSourceControls ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
787
787
|
key: 0,
|
|
788
788
|
"class": _ctx.cx('sourceControls')
|
|
789
|
-
}, _ctx.ptm('sourceControls')
|
|
789
|
+
}, _ctx.ptm('sourceControls'), {
|
|
790
|
+
"data-pc-group-section": "controls"
|
|
791
|
+
}), [vue.renderSlot(_ctx.$slots, "sourcecontrolsstart"), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
790
792
|
"aria-label": $options.moveUpAriaLabel,
|
|
791
793
|
disabled: $options.moveDisabled(0),
|
|
792
794
|
type: "button",
|
|
@@ -856,10 +858,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
856
858
|
_: 3
|
|
857
859
|
}, 16, ["aria-label", "disabled", "pt", "unstyled"]), vue.renderSlot(_ctx.$slots, "sourcecontrolsend")], 16)) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
|
|
858
860
|
"class": _ctx.cx('sourceWrapper')
|
|
859
|
-
}, _ctx.ptm('sourceWrapper')
|
|
861
|
+
}, _ctx.ptm('sourceWrapper'), {
|
|
862
|
+
"data-pc-group-section": "listwrapper"
|
|
863
|
+
}), [_ctx.$slots.sourceheader ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
860
864
|
key: 0,
|
|
861
865
|
"class": _ctx.cx('sourceHeader')
|
|
862
|
-
}, _ctx.ptm('sourceHeader')
|
|
866
|
+
}, _ctx.ptm('sourceHeader'), {
|
|
867
|
+
"data-pc-group-section": "header"
|
|
868
|
+
}), [vue.renderSlot(_ctx.$slots, "sourceheader")], 16)) : vue.createCommentVNode("", true), vue.createVNode(vue.TransitionGroup, vue.mergeProps({
|
|
863
869
|
ref: "sourceList",
|
|
864
870
|
id: $options.idSource + '_list',
|
|
865
871
|
name: "p-picklist-flip",
|
|
@@ -879,7 +885,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
879
885
|
onKeydown: _cache[7] || (_cache[7] = function ($event) {
|
|
880
886
|
return $options.onItemKeyDown($event, 'sourceList');
|
|
881
887
|
})
|
|
882
|
-
}, _objectSpread(_objectSpread(_objectSpread({}, _ctx.sourceListProps), _ctx.ptm('sourceList')), _ctx.ptm('transition'))
|
|
888
|
+
}, _objectSpread(_objectSpread(_objectSpread({}, _ctx.sourceListProps), _ctx.ptm('sourceList')), _ctx.ptm('transition')), {
|
|
889
|
+
"data-pc-group-section": "list"
|
|
890
|
+
}), {
|
|
883
891
|
"default": vue.withCtx(function () {
|
|
884
892
|
return [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.sourceList, function (item, i) {
|
|
885
893
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
|
|
@@ -916,7 +924,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
916
924
|
_: 3
|
|
917
925
|
}, 16, ["id", "class", "style", "aria-activedescendant", "tabindex"])], 16), vue.createElementVNode("div", vue.mergeProps({
|
|
918
926
|
"class": _ctx.cx('buttons')
|
|
919
|
-
}, _ctx.ptm('buttons')
|
|
927
|
+
}, _ctx.ptm('buttons'), {
|
|
928
|
+
"data-pc-group-section": "controls"
|
|
929
|
+
}), [vue.renderSlot(_ctx.$slots, "movecontrolsstart"), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
920
930
|
"aria-label": $options.moveToTargetAriaLabel,
|
|
921
931
|
type: "button",
|
|
922
932
|
onClick: $options.moveToTarget,
|
|
@@ -986,10 +996,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
986
996
|
_: 3
|
|
987
997
|
}, 16, ["aria-label", "onClick", "disabled", "pt", "unstyled"]), vue.renderSlot(_ctx.$slots, "movecontrolsend")], 16), vue.createElementVNode("div", vue.mergeProps({
|
|
988
998
|
"class": _ctx.cx('targetWrapper')
|
|
989
|
-
}, _ctx.ptm('targetWrapper')
|
|
999
|
+
}, _ctx.ptm('targetWrapper'), {
|
|
1000
|
+
"data-pc-group-section": "listwrapper"
|
|
1001
|
+
}), [_ctx.$slots.targetheader ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
990
1002
|
key: 0,
|
|
991
1003
|
"class": _ctx.cx('targetHeader')
|
|
992
|
-
}, _ctx.ptm('targetHeader')
|
|
1004
|
+
}, _ctx.ptm('targetHeader'), {
|
|
1005
|
+
"data-pc-group-section": "header"
|
|
1006
|
+
}), [vue.renderSlot(_ctx.$slots, "targetheader")], 16)) : vue.createCommentVNode("", true), vue.createVNode(vue.TransitionGroup, vue.mergeProps({
|
|
993
1007
|
ref: "targetList",
|
|
994
1008
|
id: $options.idTarget + '_list',
|
|
995
1009
|
name: "p-picklist-flip",
|
|
@@ -1009,7 +1023,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1009
1023
|
onKeydown: _cache[12] || (_cache[12] = function ($event) {
|
|
1010
1024
|
return $options.onItemKeyDown($event, 'targetList');
|
|
1011
1025
|
})
|
|
1012
|
-
}, _objectSpread(_objectSpread(_objectSpread({}, _ctx.targetListProps), _ctx.ptm('targetList')), _ctx.ptm('transition'))
|
|
1026
|
+
}, _objectSpread(_objectSpread(_objectSpread({}, _ctx.targetListProps), _ctx.ptm('targetList')), _ctx.ptm('transition')), {
|
|
1027
|
+
"data-pc-group-section": "list"
|
|
1028
|
+
}), {
|
|
1013
1029
|
"default": vue.withCtx(function () {
|
|
1014
1030
|
return [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList($options.targetList, function (item, i) {
|
|
1015
1031
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("li", vue.mergeProps({
|
|
@@ -1050,7 +1066,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1050
1066
|
}, 16, ["id", "class", "style", "aria-activedescendant", "tabindex"])], 16), _ctx.showTargetControls ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
1051
1067
|
key: 1,
|
|
1052
1068
|
"class": _ctx.cx('targetControls')
|
|
1053
|
-
}, _ctx.ptm('targetControls')
|
|
1069
|
+
}, _ctx.ptm('targetControls'), {
|
|
1070
|
+
"data-pc-group-section": "controls"
|
|
1071
|
+
}), [vue.renderSlot(_ctx.$slots, "targetcontrolsstart"), vue.createVNode(_component_PLButton, vue.mergeProps({
|
|
1054
1072
|
"aria-label": $options.moveUpAriaLabel,
|
|
1055
1073
|
disabled: $options.moveDisabled(1),
|
|
1056
1074
|
type: "button",
|