Fixed #4929 - Add parent param to all pt method options
parent
1a4bba8107
commit
eb00b8ee23
|
@ -31,6 +31,10 @@ export interface AccordionPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: AccordionState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -106,6 +106,7 @@ export default {
|
|||
const tabMetaData = {
|
||||
props: tab.props || {},
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
*/
|
||||
import { AnchorHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue';
|
||||
import { AccordionPassThroughOptions } from '../accordion';
|
||||
import { PassThroughOptions } from '../passthrough';
|
||||
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
||||
|
||||
|
@ -29,9 +28,9 @@ export interface AccordionTabPassThroughMethodOptions {
|
|||
*/
|
||||
props: AccordionTabProps;
|
||||
/**
|
||||
* Defines parent instance.
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: AccordionPassThroughOptions;
|
||||
parent: any;
|
||||
/**
|
||||
* Defines current options.
|
||||
*/
|
||||
|
|
|
@ -38,6 +38,10 @@ export interface AutoCompletePassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: AutoCompleteContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* @module avatar
|
||||
*/
|
||||
import { VNode } from 'vue';
|
||||
import { AvatarGroupPassThroughOptions } from '../avatargroup';
|
||||
import { ComponentHooks } from '../basecomponent';
|
||||
import { PassThroughOptions } from '../passthrough';
|
||||
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
||||
|
@ -27,9 +26,9 @@ export interface AvatarPassThroughMethodOptions {
|
|||
*/
|
||||
props: AvatarProps;
|
||||
/**
|
||||
* Defines parent instance.
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: AvatarGroupPassThroughOptions;
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div :class="cx('root')" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" v-bind="getPTOptions('root')" data-pc-name="avatar">
|
||||
<div :class="cx('root')" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" v-bind="ptm('root')" data-pc-name="avatar">
|
||||
<slot>
|
||||
<span v-if="label" :class="cx('label')" v-bind="getPTOptions('label')">{{ label }}</span>
|
||||
<span v-if="label" :class="cx('label')" v-bind="ptm('label')">{{ label }}</span>
|
||||
<component v-else-if="$slots.icon" :is="$slots.icon" :class="cx('icon')" />
|
||||
<span v-else-if="icon" :class="[cx('icon'), icon]" v-bind="getPTOptions('icon')" />
|
||||
<img v-else-if="image" :src="image" :alt="ariaLabel" @error="onError" v-bind="getPTOptions('image')" />
|
||||
<span v-else-if="icon" :class="[cx('icon'), icon]" v-bind="ptm('icon')" />
|
||||
<img v-else-if="image" :src="image" :alt="ariaLabel" @error="onError" v-bind="ptm('image')" />
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -19,13 +19,6 @@ export default {
|
|||
methods: {
|
||||
onError(event) {
|
||||
this.$emit('error', event);
|
||||
},
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
parent: {
|
||||
instance: this.$parent
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<span :class="cx('root')" v-bind="getPTOptions('root')" data-pc-name="badge">
|
||||
<span :class="cx('root')" v-bind="ptm('root')" data-pc-name="badge">
|
||||
<slot>{{ value }}</slot>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -9,16 +9,6 @@ import BaseBadge from './BaseBadge.vue';
|
|||
|
||||
export default {
|
||||
name: 'Badge',
|
||||
extends: BaseBadge,
|
||||
methods: {
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
extends: BaseBadge
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -18,6 +18,10 @@ export declare type BadgeDirectivePassThroughOptionType = BadgeDirectivePassThro
|
|||
*/
|
||||
export interface BadgePassThroughMethodOptions {
|
||||
context: BadgeContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -202,7 +202,20 @@ export default {
|
|||
return this.unstyled !== undefined ? this.unstyled : this.$config?.unstyled;
|
||||
},
|
||||
$params() {
|
||||
return { instance: this, props: this.$props, state: this.$data, parentInstance: this.$parentInstance };
|
||||
const parentInstance = this.$parentInstance || this.$parent;
|
||||
|
||||
return {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data,
|
||||
parent: {
|
||||
instance: parentInstance,
|
||||
props: parentInstance?.$props,
|
||||
state: parentInstance?.$data
|
||||
},
|
||||
/* @deprecated since v3.43.0. Use the `parent.instance` instead of the `parentInstance`.*/
|
||||
parentInstance
|
||||
};
|
||||
},
|
||||
$style() {
|
||||
return { classes: undefined, inlineStyles: undefined, loadStyle: () => {}, loadCustomStyle: () => {}, ...(this._getHostInstance(this) || {}).$style, ...this.$options.style };
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface BlockUIPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: BlockUIState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -31,6 +31,10 @@ export interface BreadcrumbPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: BreadcrumbContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -26,10 +26,6 @@ export default {
|
|||
methods: {
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
},
|
||||
context: {
|
||||
disabled: this.disabled
|
||||
}
|
||||
|
|
|
@ -37,6 +37,10 @@ export interface CalendarPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: CalendarContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,10 @@ export interface CarouselPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: CarouselContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface CascadeSelectPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: CascadeSelectState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -26,6 +26,10 @@ export interface ChartPassThroughMethodOptions {
|
|||
* Defines valid properties.
|
||||
*/
|
||||
props: ChartProps;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,10 @@ export interface CheckboxPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: CheckboxContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface ChipPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: ChipState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface ChipsPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: ChipsState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface ColorPickerPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: ColorPickerState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -33,9 +33,9 @@ export interface ColumnPassThroughMethodOptions {
|
|||
*/
|
||||
props: ColumnProps;
|
||||
/**
|
||||
* Defines parent instance.
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: DataTablePassThroughOptions;
|
||||
parent: any;
|
||||
/**
|
||||
* Defines current options.
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
* @module columngroup
|
||||
*/
|
||||
import { ComponentHooks } from '../basecomponent';
|
||||
import { DataTablePassThroughOptions } from '../datatable';
|
||||
import { PassThroughOptions } from '../passthrough';
|
||||
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
||||
|
||||
|
@ -25,9 +24,9 @@ export interface ColumnGroupPassThroughMethodOptions {
|
|||
*/
|
||||
props: ColumnGroupProps;
|
||||
/**
|
||||
* Defines parent instance.
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: DataTablePassThroughOptions;
|
||||
parent: any;
|
||||
/**
|
||||
* Defines current options.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface ConfirmDialogPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: ConfirmDialogState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,10 @@ export interface ConfirmPopupPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: ConfirmPopupState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -38,6 +38,10 @@ export interface ContextMenuPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: ContextMenuContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -222,6 +222,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -330,6 +330,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -41,6 +41,10 @@ export interface DataTablePassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: DataTableContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -47,6 +47,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -206,6 +206,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -50,6 +50,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -55,6 +55,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -40,6 +40,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -310,6 +310,7 @@ export default {
|
|||
getColumnPT(key) {
|
||||
const columnMetaData = {
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ export default {
|
|||
const columnGroupMetaData = {
|
||||
props: this.getColumnGroupProps(),
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
@ -61,6 +62,7 @@ export default {
|
|||
const rowMetaData = {
|
||||
props: row.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -234,6 +234,7 @@ export default {
|
|||
const columnGroupMetaData = {
|
||||
props: this.getColumnGroupProps(),
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
@ -252,6 +253,7 @@ export default {
|
|||
const rowMetaData = {
|
||||
props: row.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
@ -269,6 +271,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -31,6 +31,10 @@ export interface DataViewPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: DataViewState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -35,6 +35,10 @@ export interface DataViewLayoutOptionsPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: DataViewLayoutOptionsState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface DeferredContentPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: DeferredContentState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -26,6 +26,10 @@ export interface DividerPassThroughMethodOptions {
|
|||
* Defines valid properties.
|
||||
*/
|
||||
props: DividerProps;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -35,6 +35,10 @@ export interface DockPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: DockContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div ref="container" :id="id" :class="cx('root')" @click="onContainerClick" v-bind="getPTOptions('root')" data-pc-name="dropdown">
|
||||
<div ref="container" :id="id" :class="cx('root')" @click="onContainerClick" v-bind="ptm('root')" data-pc-name="dropdown">
|
||||
<input
|
||||
v-if="editable"
|
||||
ref="focusInput"
|
||||
|
@ -23,7 +23,7 @@
|
|||
@blur="onBlur"
|
||||
@keydown="onKeyDown"
|
||||
@input="onEditableInput"
|
||||
v-bind="{ ...inputProps, ...getPTOptions('input') }"
|
||||
v-bind="{ ...inputProps, ...ptm('input') }"
|
||||
/>
|
||||
<span
|
||||
v-else
|
||||
|
@ -43,25 +43,25 @@
|
|||
@focus="onFocus"
|
||||
@blur="onBlur"
|
||||
@keydown="onKeyDown"
|
||||
v-bind="{ ...inputProps, ...getPTOptions('input') }"
|
||||
v-bind="{ ...inputProps, ...ptm('input') }"
|
||||
>
|
||||
<slot name="value" :value="modelValue" :placeholder="placeholder">{{ label === 'p-emptylabel' ? ' ' : label || 'empty' }}</slot>
|
||||
</span>
|
||||
<slot v-if="showClear && modelValue != null" name="clearicon" :class="cx('clearIcon')" :onClick="onClearClick" :clearCallback="onClearClick">
|
||||
<component :is="clearIcon ? 'i' : 'TimesIcon'" ref="clearIcon" :class="[cx('clearIcon'), clearIcon]" @click="onClearClick" v-bind="{ ...clearIconProps, ...getPTOptions('clearIcon') }" data-pc-section="clearicon" />
|
||||
<component :is="clearIcon ? 'i' : 'TimesIcon'" ref="clearIcon" :class="[cx('clearIcon'), clearIcon]" @click="onClearClick" v-bind="{ ...clearIconProps, ...ptm('clearIcon') }" data-pc-section="clearicon" />
|
||||
</slot>
|
||||
<div :class="cx('trigger')" v-bind="getPTOptions('trigger')">
|
||||
<div :class="cx('trigger')" v-bind="ptm('trigger')">
|
||||
<slot v-if="loading" name="loadingicon" :class="cx('loadingIcon')">
|
||||
<span v-if="loadingIcon" :class="[cx('loadingIcon'), 'pi-spin', loadingIcon]" aria-hidden="true" v-bind="getPTOptions('loadingIcon')" />
|
||||
<SpinnerIcon v-else :class="cx('loadingIcon')" spin aria-hidden="true" v-bind="getPTOptions('loadingIcon')" />
|
||||
<span v-if="loadingIcon" :class="[cx('loadingIcon'), 'pi-spin', loadingIcon]" aria-hidden="true" v-bind="ptm('loadingIcon')" />
|
||||
<SpinnerIcon v-else :class="cx('loadingIcon')" spin aria-hidden="true" v-bind="ptm('loadingIcon')" />
|
||||
</slot>
|
||||
<slot v-else name="dropdownicon" :class="cx('dropdownIcon')">
|
||||
<component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="[cx('dropdownIcon'), dropdownIcon]" aria-hidden="true" v-bind="getPTOptions('dropdownIcon')" />
|
||||
<component :is="dropdownIcon ? 'span' : 'ChevronDownIcon'" :class="[cx('dropdownIcon'), dropdownIcon]" aria-hidden="true" v-bind="ptm('dropdownIcon')" />
|
||||
</slot>
|
||||
</div>
|
||||
<Portal :appendTo="appendTo">
|
||||
<transition name="p-connected-overlay" @enter="onOverlayEnter" @after-enter="onOverlayAfterEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave" v-bind="getPTOptions('transition')">
|
||||
<div v-if="overlayVisible" :ref="overlayRef" :class="[cx('panel'), panelClass]" :style="panelStyle" @click="onOverlayClick" @keydown="onOverlayKeyDown" v-bind="{ ...panelProps, ...getPTOptions('panel') }">
|
||||
<transition name="p-connected-overlay" @enter="onOverlayEnter" @after-enter="onOverlayAfterEnter" @leave="onOverlayLeave" @after-leave="onOverlayAfterLeave" v-bind="ptm('transition')">
|
||||
<div v-if="overlayVisible" :ref="overlayRef" :class="[cx('panel'), panelClass]" :style="panelStyle" @click="onOverlayClick" @keydown="onOverlayKeyDown" v-bind="{ ...panelProps, ...ptm('panel') }">
|
||||
<span
|
||||
ref="firstHiddenFocusableElementOnOverlay"
|
||||
role="presentation"
|
||||
|
@ -69,13 +69,13 @@
|
|||
class="p-hidden-accessible p-hidden-focusable"
|
||||
:tabindex="0"
|
||||
@focus="onFirstHiddenFocus"
|
||||
v-bind="getPTOptions('hiddenFirstFocusableEl')"
|
||||
v-bind="ptm('hiddenFirstFocusableEl')"
|
||||
:data-p-hidden-accessible="true"
|
||||
:data-p-hidden-focusable="true"
|
||||
></span>
|
||||
<slot name="header" :value="modelValue" :options="visibleOptions"></slot>
|
||||
<div v-if="filter" :class="cx('header')" v-bind="getPTOptions('header')">
|
||||
<div :class="cx('filterContainer')" v-bind="getPTOptions('filterContainer')">
|
||||
<div v-if="filter" :class="cx('header')" v-bind="ptm('header')">
|
||||
<div :class="cx('filterContainer')" v-bind="ptm('filterContainer')">
|
||||
<input
|
||||
ref="filterInput"
|
||||
type="text"
|
||||
|
@ -90,29 +90,22 @@
|
|||
@keydown="onFilterKeyDown"
|
||||
@blur="onFilterBlur"
|
||||
@input="onFilterChange"
|
||||
v-bind="{ ...filterInputProps, ...getPTOptions('filterInput') }"
|
||||
v-bind="{ ...filterInputProps, ...ptm('filterInput') }"
|
||||
/>
|
||||
<slot name="filtericon" :class="cx('filterIcon')">
|
||||
<component :is="filterIcon ? 'span' : 'FilterIcon'" :class="[cx('filterIcon'), filterIcon]" v-bind="getPTOptions('filterIcon')" />
|
||||
<component :is="filterIcon ? 'span' : 'FilterIcon'" :class="[cx('filterIcon'), filterIcon]" v-bind="ptm('filterIcon')" />
|
||||
</slot>
|
||||
</div>
|
||||
<span role="status" aria-live="polite" class="p-hidden-accessible" v-bind="getPTOptions('hiddenFilterResult')" :data-p-hidden-accessible="true">
|
||||
<span role="status" aria-live="polite" class="p-hidden-accessible" v-bind="ptm('hiddenFilterResult')" :data-p-hidden-accessible="true">
|
||||
{{ filterResultMessageText }}
|
||||
</span>
|
||||
</div>
|
||||
<div :class="cx('wrapper')" :style="{ 'max-height': virtualScrollerDisabled ? scrollHeight : '' }" v-bind="getPTOptions('wrapper')">
|
||||
<VirtualScroller :ref="virtualScrollerRef" v-bind="virtualScrollerOptions" :items="visibleOptions" :style="{ height: scrollHeight }" :tabindex="-1" :disabled="virtualScrollerDisabled" :pt="getPTOptions('virtualScroller')">
|
||||
<div :class="cx('wrapper')" :style="{ 'max-height': virtualScrollerDisabled ? scrollHeight : '' }" v-bind="ptm('wrapper')">
|
||||
<VirtualScroller :ref="virtualScrollerRef" v-bind="virtualScrollerOptions" :items="visibleOptions" :style="{ height: scrollHeight }" :tabindex="-1" :disabled="virtualScrollerDisabled" :pt="ptm('virtualScroller')">
|
||||
<template v-slot:content="{ styleClass, contentRef, items, getItemOptions, contentStyle, itemSize }">
|
||||
<ul :ref="(el) => listRef(el, contentRef)" :id="id + '_list'" :class="[cx('list'), styleClass]" :style="contentStyle" role="listbox" v-bind="getPTOptions('list')">
|
||||
<ul :ref="(el) => listRef(el, contentRef)" :id="id + '_list'" :class="[cx('list'), styleClass]" :style="contentStyle" role="listbox" v-bind="ptm('list')">
|
||||
<template v-for="(option, i) of items" :key="getOptionRenderKey(option, getOptionIndex(i, getItemOptions))">
|
||||
<li
|
||||
v-if="isOptionGroup(option)"
|
||||
:id="id + '_' + getOptionIndex(i, getItemOptions)"
|
||||
:style="{ height: itemSize ? itemSize + 'px' : undefined }"
|
||||
:class="cx('itemGroup')"
|
||||
role="option"
|
||||
v-bind="getPTOptions('itemGroup')"
|
||||
>
|
||||
<li v-if="isOptionGroup(option)" :id="id + '_' + getOptionIndex(i, getItemOptions)" :style="{ height: itemSize ? itemSize + 'px' : undefined }" :class="cx('itemGroup')" role="option" v-bind="ptm('itemGroup')">
|
||||
<slot name="optiongroup" :option="option.optionGroup" :index="getOptionIndex(i, getItemOptions)">{{ getOptionGroupLabel(option.optionGroup) }}</slot>
|
||||
</li>
|
||||
<li
|
||||
|
@ -137,10 +130,10 @@
|
|||
<slot name="option" :option="option" :index="getOptionIndex(i, getItemOptions)">{{ getOptionLabel(option) }}</slot>
|
||||
</li>
|
||||
</template>
|
||||
<li v-if="filterValue && (!items || (items && items.length === 0))" :class="cx('emptyMessage')" role="option" v-bind="getPTOptions('emptyMessage')" :data-p-hidden-accessible="true">
|
||||
<li v-if="filterValue && (!items || (items && items.length === 0))" :class="cx('emptyMessage')" role="option" v-bind="ptm('emptyMessage')" :data-p-hidden-accessible="true">
|
||||
<slot name="emptyfilter">{{ emptyFilterMessageText }}</slot>
|
||||
</li>
|
||||
<li v-else-if="!options || (options && options.length === 0)" :class="cx('emptyMessage')" role="option" v-bind="getPTOptions('emptyMessage')" :data-p-hidden-accessible="true">
|
||||
<li v-else-if="!options || (options && options.length === 0)" :class="cx('emptyMessage')" role="option" v-bind="ptm('emptyMessage')" :data-p-hidden-accessible="true">
|
||||
<slot name="empty">{{ emptyMessageText }}</slot>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -151,10 +144,10 @@
|
|||
</VirtualScroller>
|
||||
</div>
|
||||
<slot name="footer" :value="modelValue" :options="visibleOptions"></slot>
|
||||
<span v-if="!options || (options && options.length === 0)" role="status" aria-live="polite" class="p-hidden-accessible" v-bind="getPTOptions('hiddenEmptyMessage')" :data-p-hidden-accessible="true">
|
||||
<span v-if="!options || (options && options.length === 0)" role="status" aria-live="polite" class="p-hidden-accessible" v-bind="ptm('hiddenEmptyMessage')" :data-p-hidden-accessible="true">
|
||||
{{ emptyMessageText }}
|
||||
</span>
|
||||
<span role="status" aria-live="polite" class="p-hidden-accessible" v-bind="getPTOptions('hiddenSelectedMessage')" :data-p-hidden-accessible="true">
|
||||
<span role="status" aria-live="polite" class="p-hidden-accessible" v-bind="ptm('hiddenSelectedMessage')" :data-p-hidden-accessible="true">
|
||||
{{ selectedMessageText }}
|
||||
</span>
|
||||
<span
|
||||
|
@ -164,7 +157,7 @@
|
|||
class="p-hidden-accessible p-hidden-focusable"
|
||||
:tabindex="0"
|
||||
@focus="onLastHiddenFocus"
|
||||
v-bind="getPTOptions('hiddenLastFocusableEl')"
|
||||
v-bind="ptm('hiddenLastFocusableEl')"
|
||||
:data-p-hidden-accessible="true"
|
||||
:data-p-hidden-focusable="true"
|
||||
></span>
|
||||
|
@ -260,20 +253,8 @@ export default {
|
|||
getOptionRenderKey(option, index) {
|
||||
return (this.dataKey ? ObjectUtils.resolveFieldData(option, this.dataKey) : this.getOptionLabel(option)) + '_' + index;
|
||||
},
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
}
|
||||
});
|
||||
},
|
||||
getPTItemOptions(option, itemOptions, index, key) {
|
||||
return this.ptm(key, {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
},
|
||||
context: {
|
||||
selected: this.isSelected(option),
|
||||
focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions),
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface EditorPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: EditorState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface FieldsetPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: FieldsetState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -33,6 +33,10 @@ export interface FileUploadPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: FileUploadState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -36,6 +36,10 @@ export interface GalleriaPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: GalleriaContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface ImagePassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: ImageState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface InlineMessagePassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: InlineMessageState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface InplacePassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: InplaceState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -22,6 +22,10 @@ export interface InputGroupPassThroughMethodOptions {
|
|||
* Defines instance.
|
||||
*/
|
||||
instance: any;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -22,6 +22,10 @@ export interface InputGroupAddonPassThroughMethodOptions {
|
|||
* Defines instance.
|
||||
*/
|
||||
instance: any;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -29,6 +29,10 @@ export interface InputMaskPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: InputMaskContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<span :class="cx('root')" v-bind="getPTOptions('root')" data-pc-name="inputnumber">
|
||||
<span :class="cx('root')" v-bind="ptm('root')" data-pc-name="inputnumber">
|
||||
<INInputText
|
||||
ref="input"
|
||||
:id="inputId"
|
||||
|
@ -27,7 +27,7 @@
|
|||
:unstyled="unstyled"
|
||||
data-pc-section="input"
|
||||
/>
|
||||
<span v-if="showButtons && buttonLayout === 'stacked'" :class="cx('buttonGroup')" v-bind="getPTOptions('buttonGroup')">
|
||||
<span v-if="showButtons && buttonLayout === 'stacked'" :class="cx('buttonGroup')" v-bind="ptm('buttonGroup')">
|
||||
<INButton
|
||||
:class="[cx('incrementButton'), incrementButtonClass]"
|
||||
v-on="upButtonListeners"
|
||||
|
@ -173,14 +173,6 @@ export default {
|
|||
this.constructParser();
|
||||
},
|
||||
methods: {
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
}
|
||||
});
|
||||
},
|
||||
getOptions() {
|
||||
return {
|
||||
localeMatcher: this.localeMatcher,
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface InputSwitchPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: InputSwitchState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="ptm('root', ptmParams)" data-pc-name="inputtext" />
|
||||
<input :class="cx('root')" :value="modelValue" @input="onInput" v-bind="getPTOptions('root')" data-pc-name="inputtext" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -18,17 +18,13 @@ export default {
|
|||
filled() {
|
||||
return this.modelValue != null && this.modelValue.toString().length > 0;
|
||||
},
|
||||
ptmParams() {
|
||||
return {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
},
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
context: {
|
||||
filled: this.filled,
|
||||
disabled: this.$attrs.disabled || this.$attrs.disabled === ''
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -29,6 +29,10 @@ export interface KnobPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: KnobState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -35,6 +35,10 @@ export interface ListboxPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: ListboxContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -35,6 +35,10 @@ export interface MegaMenuPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: MegaMenuContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -37,6 +37,10 @@ export interface MenuPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: MenuContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -35,6 +35,10 @@ export interface MenubarPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: MenubarContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<template>
|
||||
<transition name="p-message" appear v-bind="getPTOptions('transition')">
|
||||
<div v-show="visible" :class="cx('root')" role="alert" aria-live="assertive" aria-atomic="true" v-bind="getPTOptions('root')" data-pc-name="message">
|
||||
<transition name="p-message" appear v-bind="ptm('transition')">
|
||||
<div v-show="visible" :class="cx('root')" role="alert" aria-live="assertive" aria-atomic="true" v-bind="ptm('root')" data-pc-name="message">
|
||||
<slot v-if="$slots.container" name="container" :onClose="close" :closeCallback="close"></slot>
|
||||
<div v-else :class="cx('wrapper')" v-bind="getPTOptions('wrapper')">
|
||||
<div v-else :class="cx('wrapper')" v-bind="ptm('wrapper')">
|
||||
<slot name="messageicon" class="p-message-icon">
|
||||
<component :is="icon ? 'span' : iconComponent" :class="[cx('icon'), icon]" v-bind="getPTOptions('icon')"></component>
|
||||
<component :is="icon ? 'span' : iconComponent" :class="[cx('icon'), icon]" v-bind="ptm('icon')"></component>
|
||||
</slot>
|
||||
<div class="p-message-text" :class="cx('text')" v-bind="getPTOptions('text')">
|
||||
<div class="p-message-text" :class="cx('text')" v-bind="ptm('text')">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<button v-if="closable" v-ripple :class="cx('closeButton')" :aria-label="closeAriaLabel" type="button" @click="close($event)" v-bind="{ ...closeButtonProps, ...getPTOptions('button'), ...getPTOptions('closeButton') }">
|
||||
<button v-if="closable" v-ripple :class="cx('closeButton')" :aria-label="closeAriaLabel" type="button" @click="close($event)" v-bind="{ ...closeButtonProps, ...ptm('button'), ...ptm('closeButton') }">
|
||||
<slot name="closeicon">
|
||||
<i v-if="closeIcon" :class="[cx('closeIcon'), closeIcon]" v-bind="{ ...getPTOptions('buttonIcon'), ...getPTOptions('closeIcon') }" />
|
||||
<TimesIcon v-else :class="[cx('closeIcon'), closeIcon]" v-bind="{ ...getPTOptions('buttonIcon'), ...getPTOptions('closeIcon') }" />
|
||||
<i v-if="closeIcon" :class="[cx('closeIcon'), closeIcon]" v-bind="{ ...ptm('buttonIcon'), ...ptm('closeIcon') }" />
|
||||
<TimesIcon v-else :class="[cx('closeIcon'), closeIcon]" v-bind="{ ...ptm('buttonIcon'), ...ptm('closeIcon') }" />
|
||||
</slot>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -52,14 +52,6 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
}
|
||||
});
|
||||
},
|
||||
close(event) {
|
||||
this.visible = false;
|
||||
this.$emit('close', event);
|
||||
|
|
|
@ -37,6 +37,10 @@ export interface MultiSelectPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: MultiSelectContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -37,6 +37,10 @@ export interface OrderListPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: OrderListContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,10 @@ export interface OrganizationChartPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: OrganizationChartContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface OverlayPanelPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: OverlayPanelState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface PanelPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: PanelState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -37,6 +37,10 @@ export interface PanelMenuPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: PanelMenuContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -33,6 +33,10 @@ export interface PasswordPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: PasswordState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -37,6 +37,10 @@ export interface PickListPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: PickListContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div role="progressbar" :class="cx('root')" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100" v-bind="getPTOptions('root')">
|
||||
<div v-if="determinate" :class="cx('value')" :style="progressStyle" v-bind="getPTOptions('value')">
|
||||
<div v-if="value != null && value !== 0 && showValue" :class="cx('label')" v-bind="getPTOptions('label')">
|
||||
<div role="progressbar" :class="cx('root')" aria-valuemin="0" :aria-valuenow="value" aria-valuemax="100" v-bind="ptm('root')">
|
||||
<div v-if="determinate" :class="cx('value')" :style="progressStyle" v-bind="ptm('value')">
|
||||
<div v-if="value != null && value !== 0 && showValue" :class="cx('label')" v-bind="ptm('label')">
|
||||
<slot>{{ value + '%' }}</slot>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="indeterminate" :class="cx('container')" v-bind="getPTOptions('container')">
|
||||
<div :class="cx('value')" v-bind="getPTOptions('value')"></div>
|
||||
<div v-if="indeterminate" :class="cx('container')" v-bind="ptm('container')">
|
||||
<div :class="cx('value')" v-bind="ptm('value')"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -17,16 +17,6 @@ import BaseProgressBar from './BaseProgressBar.vue';
|
|||
export default {
|
||||
name: 'ProgressBar',
|
||||
extends: BaseProgressBar,
|
||||
methods: {
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
progressStyle() {
|
||||
return {
|
||||
|
|
|
@ -25,6 +25,10 @@ export interface ProgressSpinnerPassThroughMethodOptions {
|
|||
* Defines valid properties.
|
||||
*/
|
||||
props: ProgressSpinnerProps;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface RadioButtonPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: RadioButtonState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,10 @@ export interface RatingPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: RatingContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
* @module row
|
||||
*/
|
||||
import { ComponentHooks } from '../basecomponent';
|
||||
import { ColumnGroupPassThroughOptions } from '../columngroup';
|
||||
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||
|
||||
export declare type RowPassThroughOptionType = RowPassThroughAttributes | ((options: RowPassThroughMethodOptions) => RowPassThroughAttributes | string) | string | null | undefined;
|
||||
|
@ -24,9 +23,9 @@ export interface RowPassThroughMethodOptions {
|
|||
*/
|
||||
props: RowProps;
|
||||
/**
|
||||
* Defines parent instance.
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: ColumnGroupPassThroughOptions;
|
||||
parent: any;
|
||||
/**
|
||||
* Defines current options.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface ScrollPanelPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: ScrollPanelState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface ScrollTopPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: ScrollTopState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,10 @@ export interface SelectButtonPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: SelectButtonContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface SidebarPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: SidebarState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -25,6 +25,10 @@ export interface SkeletonPassThroughMethodOptions {
|
|||
* Defines valid properties.
|
||||
*/
|
||||
props: SkeletonProps;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -25,6 +25,10 @@ export interface SliderPassThroughMethodOptions {
|
|||
* Defines valid properties.
|
||||
*/
|
||||
props: SliderProps;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -36,6 +36,10 @@ export interface SpeedDialPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: SpeedDialContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -33,6 +33,10 @@ export interface SplitButtonPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: SplitButtonState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,10 @@ export interface SplitterPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: SplitterContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface SplitterPanelPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: SplitterPanelContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -31,6 +31,10 @@ export interface StepsPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: StepsContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -35,6 +35,10 @@ export interface TabMenuPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: TabMenuContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
import { AnchorHTMLAttributes, HTMLAttributes, LiHTMLAttributes, VNode } from 'vue';
|
||||
import { ComponentHooks } from '../basecomponent';
|
||||
import { PassThroughOptions } from '../passthrough';
|
||||
import { TabViewPassThroughOptions } from '../tabview';
|
||||
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
||||
|
||||
export declare type TabPanelPassThroughOptionType = TabPanelPassThroughAttributes | ((options: TabPanelPassThroughMethodOptions) => TabPanelPassThroughAttributes | string) | string | null | undefined;
|
||||
|
@ -27,14 +26,14 @@ export interface TabPanelPassThroughMethodOptions {
|
|||
* Defines valid properties.
|
||||
*/
|
||||
props: TabPanelProps;
|
||||
/**
|
||||
* Defines parent instance.
|
||||
*/
|
||||
parent: TabViewPassThroughOptions;
|
||||
/**
|
||||
* Defines current options.
|
||||
*/
|
||||
context: TabPanelContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -154,6 +154,7 @@ export default {
|
|||
const tabMetaData = {
|
||||
props: tab.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -26,6 +26,10 @@ export interface TagPassThroughMethodOptions {
|
|||
* Defines valid properties.
|
||||
*/
|
||||
props: TagProps;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -29,6 +29,10 @@ export interface TerminalPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: TerminalState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -30,6 +30,10 @@ export interface TextareaPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: TextareaContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -29,6 +29,10 @@ export interface TimelinePassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: TimelineContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,10 @@ export interface ToastPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: ToastState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -34,6 +34,10 @@ export interface ToggleButtonPassThroughMethodOptions {
|
|||
* Defines current options.
|
||||
*/
|
||||
context: ToggleButtonContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -26,6 +26,10 @@ export interface ToolbarPassThroughMethodOptions {
|
|||
* Defines valid properties.
|
||||
*/
|
||||
props: ToolbarProps;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -19,6 +19,10 @@ export declare type TooltipDirectivePassThroughOptionType = TooltipDirectivePass
|
|||
*/
|
||||
export interface TooltipPassThroughMethodOptions {
|
||||
context: TooltipContext;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<template>
|
||||
<div :class="cx('root')" v-bind="getPTOptions('root')" data-pc-name="tree">
|
||||
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="tree">
|
||||
<template v-if="loading && loadingMode === 'mask'">
|
||||
<div :class="cx('loadingOverlay')" v-bind="getPTOptions('loadingOverlay')">
|
||||
<div :class="cx('loadingOverlay')" v-bind="ptm('loadingOverlay')">
|
||||
<slot name="loadingicon" :class="cx('loadingIcon')">
|
||||
<i v-if="loadingIcon" :class="[cx('loadingIcon'), 'pi-spin', loadingIcon]" v-bind="getPTOptions('loadingIcon')" />
|
||||
<SpinnerIcon v-else spin :class="cx('loadingIcon')" v-bind="getPTOptions('loadingIcon')" />
|
||||
<i v-if="loadingIcon" :class="[cx('loadingIcon'), 'pi-spin', loadingIcon]" v-bind="ptm('loadingIcon')" />
|
||||
<SpinnerIcon v-else spin :class="cx('loadingIcon')" v-bind="ptm('loadingIcon')" />
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
<div v-if="filter" :class="cx('filterContainer')" v-bind="getPTOptions('filterContainer')">
|
||||
<input v-model="filterValue" type="text" autocomplete="off" :class="cx('input')" :placeholder="filterPlaceholder" @keydown="onFilterKeydown" v-bind="getPTOptions('input')" />
|
||||
<div v-if="filter" :class="cx('filterContainer')" v-bind="ptm('filterContainer')">
|
||||
<input v-model="filterValue" type="text" autocomplete="off" :class="cx('input')" :placeholder="filterPlaceholder" @keydown="onFilterKeydown" v-bind="ptm('input')" />
|
||||
<slot name="searchicon" :class="cx('searchIcon')">
|
||||
<SearchIcon :class="cx('searchIcon')" v-bind="getPTOptions('searchIcon')" />
|
||||
<SearchIcon :class="cx('searchIcon')" v-bind="ptm('searchIcon')" />
|
||||
</slot>
|
||||
</div>
|
||||
<div :class="cx('wrapper')" :style="{ maxHeight: scrollHeight }" v-bind="getPTOptions('wrapper')">
|
||||
<ul :class="cx('container')" role="tree" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" v-bind="getPTOptions('container')">
|
||||
<div :class="cx('wrapper')" :style="{ maxHeight: scrollHeight }" v-bind="ptm('wrapper')">
|
||||
<ul :class="cx('container')" role="tree" :aria-labelledby="ariaLabelledby" :aria-label="ariaLabel" v-bind="ptm('container')">
|
||||
<TreeNode
|
||||
v-for="(node, index) of valueToRender"
|
||||
:key="node.key"
|
||||
|
@ -61,14 +61,6 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
getPTOptions(key) {
|
||||
return this.ptm(key, {
|
||||
parent: {
|
||||
props: this.$parent?.$props,
|
||||
state: this.$parent?.$data
|
||||
}
|
||||
});
|
||||
},
|
||||
onNodeToggle(node) {
|
||||
const key = node.key;
|
||||
|
||||
|
|
|
@ -34,6 +34,10 @@ export interface TreeSelectPassThroughMethodOptions {
|
|||
* Defines current inline state.
|
||||
*/
|
||||
state: TreeSelectState;
|
||||
/**
|
||||
* Defines parent options.
|
||||
*/
|
||||
parent: any;
|
||||
/**
|
||||
* Defines passthrough(pt) options in global config.
|
||||
*/
|
||||
|
|
|
@ -33,8 +33,8 @@ import CheckIcon from 'primevue/icons/check';
|
|||
import ChevronDownIcon from 'primevue/icons/chevrondown';
|
||||
import ChevronRightIcon from 'primevue/icons/chevronright';
|
||||
import MinusIcon from 'primevue/icons/minus';
|
||||
import Ripple from 'primevue/ripple';
|
||||
import SpinnerIcon from 'primevue/icons/spinner';
|
||||
import Ripple from 'primevue/ripple';
|
||||
import { DomHandler, ObjectUtils } from 'primevue/utils';
|
||||
import { mergeProps } from 'vue';
|
||||
|
||||
|
@ -120,6 +120,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
@ -145,6 +146,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
|
@ -47,6 +47,7 @@ export default {
|
|||
const columnMetaData = {
|
||||
props: this.column.props,
|
||||
parent: {
|
||||
instance: this,
|
||||
props: this.$props,
|
||||
state: this.$data
|
||||
},
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue