Ports from v3
parent
895532cfe7
commit
411d002834
|
@ -55,7 +55,7 @@
|
|||
:aria-posinset="i + 1"
|
||||
v-bind="ptm('chipItem')"
|
||||
>
|
||||
<slot name="chip" :class="cx('pcChip')" :value="option" :index="i" :removeCallback="(event) => removeOption(event, i)">
|
||||
<slot name="chip" :class="cx('pcChip')" :value="option" :index="i" :removeCallback="(event) => removeOption(event, i)" v-bind="ptm('pcChip')">
|
||||
<!-- TODO: removetokenicon and removeTokenIcon deprecated since v4.0. Use chipicon slot and chipIcon prop-->
|
||||
<Chip :class="cx('pcChip')" :label="getOptionLabel(option)" :removeIcon="chipIcon || removeTokenIcon" removable :unstyled="unstyled" @remove="removeOption($event, i)" :pt="ptm('pcChip')">
|
||||
<template #removeicon>
|
||||
|
|
|
@ -129,7 +129,7 @@ export interface DataTableSortMeta {
|
|||
/**
|
||||
* Column field
|
||||
*/
|
||||
field: string;
|
||||
field: string | ((item: any) => string) | undefined;
|
||||
/**
|
||||
* Column sort order
|
||||
*/
|
||||
|
|
|
@ -180,6 +180,10 @@ export default {
|
|||
type: String,
|
||||
default: null
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: null
|
||||
|
|
|
@ -731,6 +731,10 @@ export interface DatePickerProps {
|
|||
* Placeholder text for the input.
|
||||
*/
|
||||
placeholder?: string | undefined;
|
||||
/**
|
||||
* Name of the element.
|
||||
*/
|
||||
name?: string | undefined;
|
||||
/**
|
||||
* A valid query selector or an HTMLElement to specify where the overlay gets attached.
|
||||
* @defaultValue body
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
:style="inputStyle"
|
||||
:value="inputFieldValue"
|
||||
:placeholder="placeholder"
|
||||
:name="name"
|
||||
:invalid="invalid"
|
||||
:variant="variant"
|
||||
:unstyled="unstyled"
|
||||
|
|
|
@ -129,6 +129,10 @@ export default {
|
|||
this.$emit('blur', event);
|
||||
},
|
||||
onKeyDown(event) {
|
||||
if (event.ctrlKey || event.metaKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event.code) {
|
||||
case 'ArrowLeft':
|
||||
this.moveToPrev(event);
|
||||
|
|
|
@ -391,7 +391,7 @@ export interface ListboxProps {
|
|||
emptyFilterMessage?: string | undefined;
|
||||
/**
|
||||
* Text to display when there are no options available. Defaults to value from PrimeVue locale configuration.
|
||||
* @defaultValue No results found
|
||||
* @defaultValue No available options
|
||||
*/
|
||||
emptyMessage?: string | undefined;
|
||||
/**
|
||||
|
|
|
@ -526,7 +526,7 @@ export interface MultiSelectProps {
|
|||
emptyFilterMessage?: string | undefined;
|
||||
/**
|
||||
* Text to display when there are no options available. Defaults to value from PrimeVue locale configuration.
|
||||
* @defaultValue No results found'
|
||||
* @defaultValue No available options'
|
||||
*/
|
||||
emptyMessage?: string | undefined;
|
||||
/**
|
||||
|
|
|
@ -12,11 +12,11 @@ export default {
|
|||
default: null
|
||||
},
|
||||
mediumRegex: {
|
||||
type: String,
|
||||
type: [String, RegExp],
|
||||
default: '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})' // eslint-disable-line
|
||||
},
|
||||
strongRegex: {
|
||||
type: String,
|
||||
type: [String, RegExp],
|
||||
default: '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})' // eslint-disable-line
|
||||
},
|
||||
weakLabel: {
|
||||
|
|
|
@ -11,7 +11,7 @@ import type { DefineComponent, DesignToken, EmitFn, GlobalComponentConstructor,
|
|||
import type { ComponentHooks } from '@primevue/core/basecomponent';
|
||||
import type { InputTextPassThroughOptions } from 'primevue/inputtext';
|
||||
import type { PassThroughOptions } from 'primevue/passthrough';
|
||||
import { HTMLAttributes, InputHTMLAttributes, TransitionProps, VNode } from 'vue';
|
||||
import { InputHTMLAttributes, TransitionProps, VNode } from 'vue';
|
||||
|
||||
export declare type PasswordPassThroughOptionType = PasswordPassThroughAttributes | ((options: PasswordPassThroughMethodOptions) => PasswordPassThroughAttributes | string) | string | null | undefined;
|
||||
|
||||
|
@ -182,12 +182,12 @@ export interface PasswordProps extends InputHTMLAttributes {
|
|||
* Regex for a medium level password.
|
||||
* @defaultValue ^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})
|
||||
*/
|
||||
mediumRegex?: string | undefined;
|
||||
mediumRegex?: string | RegExp | undefined;
|
||||
/**
|
||||
* Regex for a strong level password.
|
||||
* @defaultValue ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})
|
||||
*/
|
||||
strongRegex?: string | undefined;
|
||||
strongRegex?: string | RegExp | undefined;
|
||||
/**
|
||||
* Text for a weak password. Defaults to PrimeVue Locale configuration.
|
||||
*/
|
||||
|
|
|
@ -512,7 +512,7 @@ export interface SelectProps {
|
|||
emptyFilterMessage?: string | undefined;
|
||||
/**
|
||||
* Text to display when there are no options available. Defaults to value from PrimeVue locale configuration.
|
||||
* @defaultValue No results found
|
||||
* @defaultValue No available options
|
||||
*/
|
||||
emptyMessage?: string | undefined;
|
||||
/**
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
:disabled="disabled"
|
||||
:severity="severity"
|
||||
:text="text"
|
||||
:icon="icon"
|
||||
:outlined="outlined"
|
||||
:size="size"
|
||||
:aria-label="label"
|
||||
|
|
|
@ -383,11 +383,12 @@ export default {
|
|||
this.onEnterKey(event);
|
||||
},
|
||||
onEscapeKey(event) {
|
||||
if (this.focusedItemInfo.level !== 0) {
|
||||
if (this.popup || this.focusedItemInfo.level !== 0) {
|
||||
const _focusedItemInfo = this.focusedItemInfo;
|
||||
|
||||
this.hide(event, false);
|
||||
!this.popup && (this.focusedItemInfo = { index: Number(_focusedItemInfo.parentKey.split('_')[0]), level: 0, parentKey: '' });
|
||||
this.focusedItemInfo = { index: Number(_focusedItemInfo.parentKey.split('_')[0]), level: 0, parentKey: '' };
|
||||
this.popup && DomHandler.focus(this.target);
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
|
|
|
@ -215,7 +215,7 @@ export interface TreeSelectProps {
|
|||
appendTo?: HintedString<'body' | 'self'> | undefined | HTMLElement;
|
||||
/**
|
||||
* Text to display when there are no options available. Defaults to value from PrimeVue locale configuration.
|
||||
* @defaultValue No results found
|
||||
* @defaultValue No available options
|
||||
*/
|
||||
emptyMessage?: string | undefined;
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue