Merge branch 'master' of https://github.com/primefaces/primevue
commit
d5ef62389c
65
CHANGELOG.md
65
CHANGELOG.md
|
@ -1,11 +1,74 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [3.40.1](https://github.com/primefaces/primevue/tree/3.40.1) (2023-11-09)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/primefaces/primevue/compare/3.40.0...3.40.1)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- InputGroupAddon esm broken [\#4788](https://github.com/primefaces/primevue/issues/4788)
|
||||||
|
|
||||||
|
## [3.40.0](https://github.com/primefaces/primevue/tree/3.40.0) (2023-11-09)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/primefaces/primevue/compare/3.39.0...3.40.0)
|
||||||
|
|
||||||
|
**Breaking Changes:**
|
||||||
|
|
||||||
|
- AccordionTab: isTabActive property is deprecated [\#4783](https://github.com/primefaces/primevue/issues/4783)
|
||||||
|
- Remove vue-router support from Menu components [\#4739](https://github.com/primefaces/primevue/issues/4739)
|
||||||
|
- Tooltip: escape should be false by default [\#4738](https://github.com/primefaces/primevue/issues/4738)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- DataTable/TreeTable: Frozen column improvements [\#4786](https://github.com/primefaces/primevue/issues/4786)
|
||||||
|
- Table row is not highlighted with context menu [\#4785](https://github.com/primefaces/primevue/issues/4785)
|
||||||
|
- core: Error BaseStyle\_\_default.default is undefined [\#4648](https://github.com/primefaces/primevue/issues/4648)
|
||||||
|
- DataTable: editingRows watcher implementation defect [\#4757](https://github.com/primefaces/primevue/issues/4757)
|
||||||
|
- MultiSelect Name: prop overshadowing [\#4743](https://github.com/primefaces/primevue/issues/4743)
|
||||||
|
- SpeedDial: unstyled implementation defect breaks the calculations [\#4740](https://github.com/primefaces/primevue/issues/4740)
|
||||||
|
- Tooltip: autoHide does not work properly [\#4737](https://github.com/primefaces/primevue/issues/4737)
|
||||||
|
- Calendar: Console.Error/Crash when pressing Escape key using Inline Calendar [\#4732](https://github.com/primefaces/primevue/issues/4732)
|
||||||
|
- Calendar does not show the right month (for the minimal departure date) when it's dynamically set [\#4157](https://github.com/primefaces/primevue/issues/4157)
|
||||||
|
|
||||||
|
**Implemented New Features and Enhancements:**
|
||||||
|
|
||||||
|
- Collision Enhancements [\#4784](https://github.com/primefaces/primevue/issues/4784)
|
||||||
|
- TabMenu/Steps: active option for item templating [\#4780](https://github.com/primefaces/primevue/issues/4780)
|
||||||
|
- PanelMenu: root option for item templating [\#4779](https://github.com/primefaces/primevue/issues/4779)
|
||||||
|
- Steps: new activeStep property [\#4778](https://github.com/primefaces/primevue/issues/4778)
|
||||||
|
- ContextMenu: hasSubmenu options for item templating [\#4764](https://github.com/primefaces/primevue/issues/4764)
|
||||||
|
- TieredMenu: New start and end templating [\#4760](https://github.com/primefaces/primevue/issues/4760)
|
||||||
|
- PanelMenu: active options for item templating [\#4750](https://github.com/primefaces/primevue/issues/4750)
|
||||||
|
- New InputGroup Component [\#4742](https://github.com/primefaces/primevue/issues/4742)
|
||||||
|
|
||||||
|
## [3.39.0](https://github.com/primefaces/primevue/tree/3.39.0) (2023-11-01)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/primefaces/primevue/compare/3.38.1...3.39.0)
|
||||||
|
|
||||||
|
**Breaking Changes:**
|
||||||
|
|
||||||
|
- Change slot parameter function name on* to *CallBack [\#4728](https://github.com/primefaces/primevue/issues/4728)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- ConfirmPopup: arrow defect [\#4730](https://github.com/primefaces/primevue/issues/4730)
|
||||||
|
- Overlaypanel: Overlaypanel closes when any key is pressed [\#4712](https://github.com/primefaces/primevue/issues/4712)
|
||||||
|
- Steps: Property 'step' does not exist on type 'StepsRouterBindProps'. [\#4703](https://github.com/primefaces/primevue/issues/4703)
|
||||||
|
- Datatable: Cannot set properties of null (setting 'tabIndex') [\#4498](https://github.com/primefaces/primevue/issues/4498)
|
||||||
|
- Menubar: Custom locale config overwriting default untouched config properties [\#4270](https://github.com/primefaces/primevue/issues/4270)
|
||||||
|
|
||||||
|
**Implemented New Features and Enhancements:**
|
||||||
|
|
||||||
|
- SplitButton: new buttoncontent and item slots [\#4729](https://github.com/primefaces/primevue/issues/4729)
|
||||||
|
- Datatable: Lara Dark Theme Color Inconsistencies [\#4714](https://github.com/primefaces/primevue/issues/4714)
|
||||||
|
|
||||||
## [3.38.1](https://github.com/primefaces/primevue/tree/3.38.1) (2023-10-26)
|
## [3.38.1](https://github.com/primefaces/primevue/tree/3.38.1) (2023-10-26)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/primefaces/primevue/compare/3.38.0...3.38.1)
|
[Full Changelog](https://github.com/primefaces/primevue/compare/3.38.0...3.38.1)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
- The package was not published correctly [\#4697](https://github.com/primefaces/primevue/issues/4697)
|
|
||||||
|
- The package was not published correctly [\#4697](https://github.com/primefaces/primevue/issues/4697)
|
||||||
|
|
||||||
## [3.38.0](https://github.com/primefaces/primevue/tree/3.38.0) (2023-10-26)
|
## [3.38.0](https://github.com/primefaces/primevue/tree/3.38.0) (2023-10-26)
|
||||||
|
|
||||||
|
|
|
@ -398,7 +398,11 @@ if (project) {
|
||||||
functionParameters += `<span class="text-primary-700">${param.name}</span>: ${param.type?.name}`;
|
functionParameters += `<span class="text-primary-700">${param.name}</span>: ${param.type?.name}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
type += `\t <span class="ml-3 text-primary-700">${child.name}</span>: <span class="text-primary-500">(${functionParameters}) ⇒ ${child.type?.declaration?.signatures[0]?.type?.name}</span>, <span class="text-primary-300">// ${child.type?.declaration?.signatures[0]?.comment.summary[0]?.text}</span>\n`;
|
if (child.type?.declaration?.signatures[0]?.comment?.getTag('@deprecated')?.content[0]?.text) {
|
||||||
|
type += `\t <span class="ml-3 text-primary-700 line-through">${child.name}</span>: <span class="text-primary-500 line-through">(${functionParameters}) ⇒ ${child.type?.declaration?.signatures[0]?.type?.name}</span>, <span class="text-primary-300 line-through">// ${child.type?.declaration?.signatures[0]?.comment.summary[0]?.text}</span>\n`;
|
||||||
|
} else {
|
||||||
|
type += `\t <span class="ml-3 text-primary-700">${child.name}</span>: <span class="text-primary-500">(${functionParameters}) ⇒ ${child.type?.declaration?.signatures[0]?.type?.name}</span>, <span class="text-primary-300">// ${child.type?.declaration?.signatures[0]?.comment.summary[0]?.text}</span>\n`;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const childType = child.type.elementType ? child.type.elementType.name : child.type.name;
|
const childType = child.type.elementType ? child.type.elementType.name : child.type.name;
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,6 @@ const BreadcrumbProps = [
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'Configuration for the home icon.'
|
description: 'Configuration for the home icon.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'pt',
|
name: 'pt',
|
||||||
type: 'any',
|
type: 'any',
|
||||||
|
|
|
@ -29,12 +29,6 @@ const ContextMenuProps = [
|
||||||
default: 'false',
|
default: 'false',
|
||||||
description: 'Attaches the menu to document instead of a particular item.'
|
description: 'Attaches the menu to document instead of a particular item.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'pt',
|
name: 'pt',
|
||||||
type: 'any',
|
type: 'any',
|
||||||
|
|
|
@ -23,12 +23,6 @@ const DockProps = [
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'Inline style of the element.'
|
description: 'Inline style of the element.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'tooltipOptions',
|
name: 'tooltipOptions',
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
|
|
@ -11,12 +11,6 @@ const MegaMenuProps = [
|
||||||
default: 'horizontal',
|
default: 'horizontal',
|
||||||
description: 'Defines the orientation, valid values are horizontal and vertical.'
|
description: 'Defines the orientation, valid values are horizontal and vertical.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'pt',
|
name: 'pt',
|
||||||
type: 'any',
|
type: 'any',
|
||||||
|
|
|
@ -29,12 +29,6 @@ const MenuProps = [
|
||||||
default: 'true',
|
default: 'true',
|
||||||
description: 'Whether to automatically manage layering.'
|
description: 'Whether to automatically manage layering.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'pt',
|
name: 'pt',
|
||||||
type: 'any',
|
type: 'any',
|
||||||
|
@ -63,11 +57,11 @@ const MenuEvents = [
|
||||||
const MenuSlots = [
|
const MenuSlots = [
|
||||||
{
|
{
|
||||||
name: 'start',
|
name: 'start',
|
||||||
description: 'Custom content before the content'
|
description: 'Custom start content.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'end',
|
name: 'end',
|
||||||
description: 'Custom content after the content'
|
description: 'Custom end content.'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'item',
|
name: 'item',
|
||||||
|
@ -79,7 +73,7 @@ const MenuSlots = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'submenuheader',
|
name: 'submenuheader',
|
||||||
description: 'Custom submenuheader template.'
|
description: 'Custom submenu header template.'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,6 @@ const MenubarProps = [
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'An array of menuitems.'
|
description: 'An array of menuitems.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'pt',
|
name: 'pt',
|
||||||
type: 'any',
|
type: 'any',
|
||||||
|
|
|
@ -11,12 +11,6 @@ const PanelMenuProps = [
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'A map of keys to represent the expansion state in controlled mode.'
|
description: 'A map of keys to represent the expansion state in controlled mode.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'pt',
|
name: 'pt',
|
||||||
type: 'any',
|
type: 'any',
|
||||||
|
|
|
@ -11,18 +11,18 @@ const StepsProps = [
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'An array of menuitems.'
|
description: 'An array of menuitems.'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'activeStep',
|
||||||
|
type: 'number',
|
||||||
|
default: '0',
|
||||||
|
description: 'Active step index of menuitem.'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'readonly',
|
name: 'readonly',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
default: 'true',
|
default: 'true',
|
||||||
description: 'Whether the items are clickable or not.'
|
description: 'Whether the items are clickable or not.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'pt',
|
name: 'pt',
|
||||||
type: 'any',
|
type: 'any',
|
||||||
|
|
|
@ -5,12 +5,6 @@ const TabMenuProps = [
|
||||||
default: 'null',
|
default: 'null',
|
||||||
description: 'An array of menuitems.'
|
description: 'An array of menuitems.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: 'Defines if active route highlight should match the exact route path.'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'activeIndex',
|
name: 'activeIndex',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
|
|
|
@ -29,12 +29,6 @@ const TieredMenuProps = [
|
||||||
default: 'true',
|
default: 'true',
|
||||||
description: 'Whether to automatically manage layering.'
|
description: 'Whether to automatically manage layering.'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'exact',
|
|
||||||
type: 'boolean',
|
|
||||||
default: 'true',
|
|
||||||
description: "Whether to apply 'router-link-active-exact' class if route exactly matches the item path."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'pt',
|
name: 'pt',
|
||||||
type: 'any',
|
type: 'any',
|
||||||
|
@ -50,6 +44,14 @@ const TieredMenuProps = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const TieredMenuSlots = [
|
const TieredMenuSlots = [
|
||||||
|
{
|
||||||
|
name: 'start',
|
||||||
|
description: 'Custom start content.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'end',
|
||||||
|
description: 'Custom end content.'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'item',
|
name: 'item',
|
||||||
description: 'Template of a menuitem.'
|
description: 'Template of a menuitem.'
|
||||||
|
|
|
@ -119,10 +119,6 @@ pre[class*="language-"] {
|
||||||
.token.entity {
|
.token.entity {
|
||||||
cursor: help;
|
cursor: help;
|
||||||
}
|
}
|
||||||
|
|
||||||
.token.namespace {
|
|
||||||
opacity: .7;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
return value?.split('|').map((item) => {
|
return value?.split('|').map((item) => {
|
||||||
return item.replace(/(\[|\]|<|>).*$/gm, '').trim();
|
return item.replace(/(\|\|<|>).*$/gm, '').trim();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
isLinkType(value) {
|
isLinkType(value) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import pkg from '../../../package.json';
|
||||||
import { services } from './services';
|
import { services } from './services';
|
||||||
|
|
||||||
const PrimeVue = {
|
const PrimeVue = {
|
||||||
version: '^3.38.0',
|
version: '^3.40.0',
|
||||||
description:
|
description:
|
||||||
'PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 400+ ready to use UI blocks to build spectacular applications in no time.'
|
'PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 400+ ready to use UI blocks to build spectacular applications in no time.'
|
||||||
};
|
};
|
||||||
|
@ -148,6 +148,7 @@ import PrimeVue from "primevue/config";
|
||||||
import AutoComplete from 'primevue/autocomplete';
|
import AutoComplete from 'primevue/autocomplete';
|
||||||
import Accordion from 'primevue/accordion';
|
import Accordion from 'primevue/accordion';
|
||||||
import AccordionTab from 'primevue/accordiontab';
|
import AccordionTab from 'primevue/accordiontab';
|
||||||
|
import AnimateOnScroll from 'primevue/animateonscroll';
|
||||||
import Avatar from 'primevue/avatar';
|
import Avatar from 'primevue/avatar';
|
||||||
import AvatarGroup from 'primevue/avatargroup';
|
import AvatarGroup from 'primevue/avatargroup';
|
||||||
import Badge from 'primevue/badge';
|
import Badge from 'primevue/badge';
|
||||||
|
@ -256,6 +257,7 @@ app.directive('badge', BadgeDirective);
|
||||||
app.directive('ripple', Ripple);
|
app.directive('ripple', Ripple);
|
||||||
app.directive('styleclass', StyleClass);
|
app.directive('styleclass', StyleClass);
|
||||||
app.directive('focustrap', FocusTrap);
|
app.directive('focustrap', FocusTrap);
|
||||||
|
app.directive('animateonscroll', AnimateOnScroll);
|
||||||
|
|
||||||
app.component('Accordion', Accordion);
|
app.component('Accordion', Accordion);
|
||||||
app.component('AccordionTab', AccordionTab);
|
app.component('AccordionTab', AccordionTab);
|
||||||
|
|
|
@ -85,7 +85,7 @@ export interface AccordionPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
accordiontab?: AccordionTabPassThroughOptionType;
|
accordiontab?: AccordionTabPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
@keydown="onTabKeyDown($event, tab, i)"
|
@keydown="onTabKeyDown($event, tab, i)"
|
||||||
v-bind="{ ...getTabProp(tab, 'headeractionprops'), ...getTabPT(tab, 'headeraction', i) }"
|
v-bind="{ ...getTabProp(tab, 'headeractionprops'), ...getTabPT(tab, 'headeraction', i) }"
|
||||||
>
|
>
|
||||||
<component v-if="tab.children && tab.children.headericon" :is="tab.children.headericon" :isTabActive="isTabActive(i)" :index="i"></component>
|
<component v-if="tab.children && tab.children.headericon" :is="tab.children.headericon" :isTabActive="isTabActive(i)" :active="isTabActive(i)" :index="i"></component>
|
||||||
<component
|
<component
|
||||||
v-else-if="isTabActive(i)"
|
v-else-if="isTabActive(i)"
|
||||||
:is="$slots.collapseicon ? $slots.collapseicon : collapseIcon ? 'span' : 'ChevronDownIcon'"
|
:is="$slots.collapseicon ? $slots.collapseicon : collapseIcon ? 'span' : 'ChevronDownIcon'"
|
||||||
|
|
|
@ -194,8 +194,14 @@ export interface AccordionTabSlots {
|
||||||
/**
|
/**
|
||||||
* Whether the tab is active
|
* Whether the tab is active
|
||||||
* @param {number} index - Index of the tab
|
* @param {number} index - Index of the tab
|
||||||
|
* @deprecated since v3.40.0. Use 'active' property instead.
|
||||||
*/
|
*/
|
||||||
isTabActive: (index: number) => void;
|
isTabActive: (index: number) => void;
|
||||||
|
/**
|
||||||
|
* Whether the tab is active
|
||||||
|
* @param {number} index - Index of the tab
|
||||||
|
*/
|
||||||
|
active: (index: number) => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ export interface AnimateOnScrollOptions {
|
||||||
*/
|
*/
|
||||||
export interface AnimateOnScrollDirectivePassThroughOptions {
|
export interface AnimateOnScrollDirectivePassThroughOptions {
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseDirective.DirectiveHooks}
|
* @see {@link BaseDirective.DirectiveHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: DirectiveHooks;
|
hooks?: DirectiveHooks;
|
||||||
|
@ -66,7 +66,7 @@ export interface AnimateOnScrollDirectiveBinding extends Omit<DirectiveBinding,
|
||||||
*/
|
*/
|
||||||
value?: AnimateOnScrollOptions | undefined;
|
value?: AnimateOnScrollOptions | undefined;
|
||||||
/**
|
/**
|
||||||
* Modifiers of the tooltip.
|
* Modifiers of the AnimateOnScroll.
|
||||||
* @type {AnimateOnScrollDirectiveModifiers}
|
* @type {AnimateOnScrollDirectiveModifiers}
|
||||||
*/
|
*/
|
||||||
modifiers?: AnimateOnScrollDirectiveModifiers | undefined;
|
modifiers?: AnimateOnScrollDirectiveModifiers | undefined;
|
||||||
|
|
|
@ -186,7 +186,7 @@ export interface AutoCompletePassThroughOptions {
|
||||||
*/
|
*/
|
||||||
selectedMessage?: AutoCompletePassThroughOptionType;
|
selectedMessage?: AutoCompletePassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -631,8 +631,14 @@ export interface AutoCompleteSlots {
|
||||||
/**
|
/**
|
||||||
* Remove token icon function.
|
* Remove token icon function.
|
||||||
* @param {Event} event - Browser event
|
* @param {Event} event - Browser event
|
||||||
|
* @deprecated since v3.39.0. Use 'removeCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onClick: (event: Event, index: number) => void;
|
onClick: (event: Event, index: number) => void;
|
||||||
|
/**
|
||||||
|
* Remove token icon function.
|
||||||
|
* @param {Event} event - Browser event
|
||||||
|
*/
|
||||||
|
removeCallback: (event: Event, index: number) => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom loading icon template.
|
* Custom loading icon template.
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<slot name="chip" :value="option">
|
<slot name="chip" :value="option">
|
||||||
<span :class="cx('tokenLabel')" v-bind="ptm('tokenLabel')">{{ getOptionLabel(option) }}</span>
|
<span :class="cx('tokenLabel')" v-bind="ptm('tokenLabel')">{{ getOptionLabel(option) }}</span>
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="removetokenicon" :class="cx('removeTokenIcon')" :index="i" :onClick="(event) => removeOption(event, i)">
|
<slot name="removetokenicon" :class="cx('removeTokenIcon')" :index="i" :onClick="(event) => removeOption(event, i)" :removeCallback="(event) => removeOption(event, i)">
|
||||||
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="[cx('removeTokenIcon'), removeTokenIcon]" @click="removeOption($event, i)" aria-hidden="true" v-bind="ptm('removeTokenIcon')" />
|
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="[cx('removeTokenIcon'), removeTokenIcon]" @click="removeOption($event, i)" aria-hidden="true" v-bind="ptm('removeTokenIcon')" />
|
||||||
</slot>
|
</slot>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -65,7 +65,7 @@ export interface AvatarPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
image?: AvatarPassThroughOptionType;
|
image?: AvatarPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -30,7 +30,7 @@ export interface AvatarGroupPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
root?: AvatarGroupPassThroughOptionType;
|
root?: AvatarGroupPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -49,7 +49,7 @@ export interface BadgePassThroughOptions {
|
||||||
*/
|
*/
|
||||||
root?: BadgePassThroughOptionType;
|
root?: BadgePassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -55,7 +55,7 @@ export interface BadgeDirectivePassThroughOptions {
|
||||||
*/
|
*/
|
||||||
root?: BadgeDirectivePassThroughOptionType;
|
root?: BadgeDirectivePassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseDirective.DirectiveHooks}
|
* @see {@link BaseDirective.DirectiveHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: DirectiveHooks;
|
hooks?: DirectiveHooks;
|
||||||
|
|
|
@ -50,7 +50,7 @@ export interface BlockUIPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
mask?: BlockUIPassThroughOptionType;
|
mask?: BlockUIPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -13,10 +13,6 @@ export default {
|
||||||
home: {
|
home: {
|
||||||
type: null,
|
type: null,
|
||||||
default: null
|
default: null
|
||||||
},
|
|
||||||
exact: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
style: BreadcrumbStyle,
|
style: BreadcrumbStyle,
|
||||||
|
|
|
@ -75,7 +75,7 @@ export interface BreadcrumbPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
separatorIcon?: BreadcrumbPassThroughOptionType;
|
separatorIcon?: BreadcrumbPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -134,6 +134,7 @@ export interface BreadcrumbProps {
|
||||||
home?: MenuItem | undefined;
|
home?: MenuItem | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
||||||
|
* @deprecated since v3.40.0.
|
||||||
* @defaultValue true
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
exact?: boolean | undefined;
|
exact?: boolean | undefined;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<nav :class="cx('root')" v-bind="ptm('root')" data-pc-name="breadcrumb">
|
<nav :class="cx('root')" v-bind="ptm('root')" data-pc-name="breadcrumb">
|
||||||
<ol :class="cx('menu')" v-bind="ptm('menu')">
|
<ol :class="cx('menu')" v-bind="ptm('menu')">
|
||||||
<BreadcrumbItem v-if="home" :item="home" :class="cx('home')" :templates="$slots" :exact="exact" :pt="pt" :unstyled="unstyled" v-bind="ptm('home')" />
|
<BreadcrumbItem v-if="home" :item="home" :class="cx('home')" :templates="$slots" :pt="pt" :unstyled="unstyled" v-bind="ptm('home')" />
|
||||||
<template v-for="(item, i) of model" :key="item.label + '_' + i">
|
<template v-for="(item, i) of model" :key="item.label + '_' + i">
|
||||||
<li v-if="home || i !== 0" :class="cx('separator')" v-bind="ptm('separator')">
|
<li v-if="home || i !== 0" :class="cx('separator')" v-bind="ptm('separator')">
|
||||||
<slot name="separator">
|
<slot name="separator">
|
||||||
<ChevronRightIcon aria-hidden="true" v-bind="ptm('separatorIcon')" />
|
<ChevronRightIcon aria-hidden="true" v-bind="ptm('separatorIcon')" />
|
||||||
</slot>
|
</slot>
|
||||||
</li>
|
</li>
|
||||||
<BreadcrumbItem :item="item" :index="i" :templates="$slots" :exact="exact" :pt="pt" :unstyled="unstyled" />
|
<BreadcrumbItem :item="item" :index="i" :templates="$slots" :pt="pt" :unstyled="unstyled" />
|
||||||
</template>
|
</template>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -22,11 +22,6 @@ import BreadcrumbItem from './BreadcrumbItem.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'Breadcrumb',
|
name: 'Breadcrumb',
|
||||||
extends: BaseBreadcrumb,
|
extends: BaseBreadcrumb,
|
||||||
beforeMount() {
|
|
||||||
if (!this.$slots.item) {
|
|
||||||
console.warn('In future versions, vue-router support will be removed. Item templating should be used.');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
BreadcrumbItem: BreadcrumbItem,
|
BreadcrumbItem: BreadcrumbItem,
|
||||||
ChevronRightIcon: ChevronRightIcon
|
ChevronRightIcon: ChevronRightIcon
|
||||||
|
|
|
@ -1,14 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<li v-if="visible()" :class="[cx('menuitem'), item.class]" v-bind="ptm('menuitem', ptmOptions)">
|
<li v-if="visible()" :class="[cx('menuitem'), item.class]" v-bind="ptm('menuitem', ptmOptions)">
|
||||||
<template v-if="!templates.item">
|
<template v-if="!templates.item">
|
||||||
<router-link v-if="item.to" v-slot="{ navigate, href, isActive, isExactActive }" :to="item.to" custom>
|
<a :href="item.url || '#'" :class="cx('action')" :target="item.target" :aria-current="isCurrentUrl()" @click="onClick" v-bind="ptm('action', ptmOptions)">
|
||||||
<a :href="href" :class="cx('action', { isActive, isExactActive })" :aria-current="isCurrentUrl()" @click="onClick($event, navigate)" v-bind="ptm('action', ptmOptions)">
|
|
||||||
<component v-if="templates.itemicon" :is="templates.itemicon" :item="item" :class="cx('icon')" />
|
|
||||||
<span v-else-if="item.icon" :class="[cx('icon'), item.icon]" v-bind="ptm('icon', ptmOptions)" />
|
|
||||||
<span v-if="item.label" :class="cx('label')" v-bind="ptm('label', ptmOptions)">{{ label() }}</span>
|
|
||||||
</a>
|
|
||||||
</router-link>
|
|
||||||
<a v-else :href="item.url || '#'" :class="cx('action')" :target="item.target" :aria-current="isCurrentUrl()" @click="onClick" v-bind="ptm('action', ptmOptions)">
|
|
||||||
<component v-if="templates && templates.itemicon" :is="templates.itemicon" :item="item" :class="cx('icon', ptmOptions)" />
|
<component v-if="templates && templates.itemicon" :is="templates.itemicon" :item="item" :class="cx('icon', ptmOptions)" />
|
||||||
<span v-else-if="item.icon" :class="[cx('icon'), item.icon]" v-bind="ptm('icon', ptmOptions)" />
|
<span v-else-if="item.icon" :class="[cx('icon'), item.icon]" v-bind="ptm('icon', ptmOptions)" />
|
||||||
<span v-if="item.label" :class="cx('label')" v-bind="ptm('label', ptmOptions)">{{ label() }}</span>
|
<span v-if="item.label" :class="cx('label')" v-bind="ptm('label', ptmOptions)">{{ label() }}</span>
|
||||||
|
@ -29,7 +22,6 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
item: null,
|
item: null,
|
||||||
templates: null,
|
templates: null,
|
||||||
exact: null,
|
|
||||||
index: null
|
index: null
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -40,10 +32,6 @@ export default {
|
||||||
item: this.item
|
item: this.item
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.item.to && navigate) {
|
|
||||||
navigate(event);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
visible() {
|
visible() {
|
||||||
return typeof this.item.visible === 'function' ? this.item.visible() : this.item.visible !== false;
|
return typeof this.item.visible === 'function' ? this.item.visible() : this.item.visible !== false;
|
||||||
|
|
|
@ -42,13 +42,7 @@ const classes = {
|
||||||
home: 'p-breadcrumb-home',
|
home: 'p-breadcrumb-home',
|
||||||
separator: 'p-menuitem-separator',
|
separator: 'p-menuitem-separator',
|
||||||
menuitem: ({ instance }) => ['p-menuitem', { 'p-disabled': instance.disabled() }],
|
menuitem: ({ instance }) => ['p-menuitem', { 'p-disabled': instance.disabled() }],
|
||||||
action: ({ props, isActive, isExactActive }) => [
|
action: 'p-menuitem-link',
|
||||||
'p-menuitem-link',
|
|
||||||
{
|
|
||||||
'router-link-active': isActive,
|
|
||||||
'router-link-active-exact': props.exact && isExactActive
|
|
||||||
}
|
|
||||||
],
|
|
||||||
icon: 'p-menuitem-icon',
|
icon: 'p-menuitem-icon',
|
||||||
label: 'p-menuitem-text'
|
label: 'p-menuitem-text'
|
||||||
};
|
};
|
||||||
|
|
|
@ -66,7 +66,7 @@ export interface ButtonPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
badge?: ButtonPassThroughOptionType;
|
badge?: ButtonPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -305,7 +305,7 @@ export interface CalendarPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
hiddenYear?: CalendarPassThroughOptionType;
|
hiddenYear?: CalendarPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -554,6 +554,12 @@ export default {
|
||||||
showTime() {
|
showTime() {
|
||||||
this.updateCurrentMetaData();
|
this.updateCurrentMetaData();
|
||||||
},
|
},
|
||||||
|
minDate() {
|
||||||
|
this.updateCurrentMetaData();
|
||||||
|
},
|
||||||
|
maxDate() {
|
||||||
|
this.updateCurrentMetaData();
|
||||||
|
},
|
||||||
months() {
|
months() {
|
||||||
if (this.overlay) {
|
if (this.overlay) {
|
||||||
if (!this.focused) {
|
if (!this.focused) {
|
||||||
|
@ -2646,8 +2652,11 @@ export default {
|
||||||
onOverlayKeyDown(event) {
|
onOverlayKeyDown(event) {
|
||||||
switch (event.code) {
|
switch (event.code) {
|
||||||
case 'Escape':
|
case 'Escape':
|
||||||
this.input.focus();
|
if (!this.inline) {
|
||||||
this.overlayVisible = false;
|
this.input.focus();
|
||||||
|
this.overlayVisible = false;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -48,7 +48,7 @@ export interface CardPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
footer?: CardPassThroughOptionType;
|
footer?: CardPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -110,7 +110,7 @@ export interface CarouselPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
footer?: CarouselPassThroughOptionType;
|
footer?: CarouselPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -121,7 +121,7 @@ export interface CascadeSelectPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
hiddenSearchResult?: CascadeSelectPassThroughOptionType;
|
hiddenSearchResult?: CascadeSelectPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<ul :class="cx('list')" v-bind="level === 0 ? ptm('list') : ptm('sublist')">
|
<ul :ref="containerRef" :class="cx('list')" v-bind="level === 0 ? ptm('list') : ptm('sublist')">
|
||||||
<template v-for="(processedOption, index) of options" :key="getOptionLabelToRender(processedOption)">
|
<template v-for="(processedOption, index) of options" :key="getOptionLabelToRender(processedOption)">
|
||||||
<li
|
<li
|
||||||
:id="getOptionId(processedOption)"
|
:id="getOptionId(processedOption)"
|
||||||
|
@ -45,6 +45,7 @@
|
||||||
@option-change="onOptionChange"
|
@option-change="onOptionChange"
|
||||||
:pt="pt"
|
:pt="pt"
|
||||||
:unstyled="unstyled"
|
:unstyled="unstyled"
|
||||||
|
:isParentMount="mounted"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
|
@ -62,6 +63,7 @@ export default {
|
||||||
hostName: 'CascadeSelect',
|
hostName: 'CascadeSelect',
|
||||||
extends: BaseComponent,
|
extends: BaseComponent,
|
||||||
emits: ['option-change'],
|
emits: ['option-change'],
|
||||||
|
container: null,
|
||||||
props: {
|
props: {
|
||||||
selectId: String,
|
selectId: String,
|
||||||
focusedOptionId: String,
|
focusedOptionId: String,
|
||||||
|
@ -74,12 +76,25 @@ export default {
|
||||||
optionGroupChildren: Array,
|
optionGroupChildren: Array,
|
||||||
activeOptionPath: Array,
|
activeOptionPath: Array,
|
||||||
level: Number,
|
level: Number,
|
||||||
templates: null
|
templates: null,
|
||||||
|
isParentMount: Boolean
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mounted: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
isParentMount: {
|
||||||
|
handler(newValue) {
|
||||||
|
newValue && DomHandler.nestedPosition(this.container, this.level);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (ObjectUtils.isNotEmpty(this.parentKey)) {
|
// entering order correction when an item is selected
|
||||||
this.position();
|
(this.isParentMount || this.level === 0) && DomHandler.nestedPosition(this.container, this.level);
|
||||||
}
|
this.mounted = true;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getOptionId(processedOption) {
|
getOptionId(processedOption) {
|
||||||
|
@ -121,16 +136,8 @@ export default {
|
||||||
onOptionChange(event) {
|
onOptionChange(event) {
|
||||||
this.$emit('option-change', event);
|
this.$emit('option-change', event);
|
||||||
},
|
},
|
||||||
position() {
|
containerRef(el) {
|
||||||
const parentItem = this.$el.parentElement;
|
this.container = el;
|
||||||
const containerOffset = DomHandler.getOffset(parentItem);
|
|
||||||
const viewport = DomHandler.getViewport();
|
|
||||||
const sublistWidth = this.$el.offsetParent ? this.$el.offsetWidth : DomHandler.getHiddenElementOuterWidth(this.$el);
|
|
||||||
const itemOuterWidth = DomHandler.getOuterWidth(parentItem.children[0]);
|
|
||||||
|
|
||||||
if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - DomHandler.calculateScrollbarWidth()) {
|
|
||||||
this.$el.style.left = '-100%';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
directives: {
|
directives: {
|
||||||
|
|
|
@ -82,6 +82,15 @@ const css = `
|
||||||
left: 100%;
|
left: 100%;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-cascadeselect-enter-from,
|
||||||
|
.p-cascadeselect-leave-active {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-cascadeselect-enter-active {
|
||||||
|
transition: opacity 150ms;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ export interface ChartPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
canvas?: ChartPassThroughOptionType;
|
canvas?: ChartPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -66,7 +66,7 @@ export interface CheckboxPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
hiddenInput?: CheckboxPassThroughOptionType;
|
hiddenInput?: CheckboxPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -62,7 +62,7 @@ export interface ChipPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
removeIcon?: ChipPassThroughOptionType;
|
removeIcon?: ChipPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -150,13 +150,25 @@ export interface ChipSlots {
|
||||||
/**
|
/**
|
||||||
* Remove icon click event
|
* Remove icon click event
|
||||||
* @param {Event} event - Browser event
|
* @param {Event} event - Browser event
|
||||||
|
* @deprecated since v3.39.0. Use 'removeCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onClick: (event: Event) => void;
|
onClick: (event: Event) => void;
|
||||||
/**
|
/**
|
||||||
* Remove icon keydown event
|
* Remove icon keydown event
|
||||||
* @param {Event} event - Browser event
|
* @param {Event} event - Browser event
|
||||||
|
* @deprecated since v3.39.0. Use 'keydownCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onKeydown: (event: Event) => void;
|
onKeydown: (event: Event) => void;
|
||||||
|
/**
|
||||||
|
* Remove icon click event
|
||||||
|
* @param {Event} event - Browser event
|
||||||
|
*/
|
||||||
|
removeCallback: (event: Event) => void;
|
||||||
|
/**
|
||||||
|
* Remove icon keydown event
|
||||||
|
* @param {Event} event - Browser event
|
||||||
|
*/
|
||||||
|
keydownCallback: (event: Event) => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<span v-else-if="icon" :class="[cx('icon'), icon]" v-bind="ptm('icon')" />
|
<span v-else-if="icon" :class="[cx('icon'), icon]" v-bind="ptm('icon')" />
|
||||||
<div v-if="label" :class="cx('label')" v-bind="ptm('label')">{{ label }}</div>
|
<div v-if="label" :class="cx('label')" v-bind="ptm('label')">{{ label }}</div>
|
||||||
</slot>
|
</slot>
|
||||||
<slot v-if="removable" name="removeicon" :onClick="close" :onKeydown="onKeydown">
|
<slot v-if="removable" name="removeicon" :onClick="close" :onKeydown="onKeydown" :removeCallback="close" :keydownCallback="onKeydown">
|
||||||
<component :is="removeIcon ? 'span' : 'TimesCircleIcon'" tabindex="0" :class="[cx('removeIcon'), removeIcon]" @click="close" @keydown="onKeydown" v-bind="ptm('removeIcon')"></component>
|
<component :is="removeIcon ? 'span' : 'TimesCircleIcon'" tabindex="0" :class="[cx('removeIcon'), removeIcon]" @click="close" @keydown="onKeydown" v-bind="ptm('removeIcon')"></component>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -92,7 +92,7 @@ export interface ChipsPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
input?: ChipsPassThroughOptionType;
|
input?: ChipsPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -238,8 +238,14 @@ export interface ChipsSlots {
|
||||||
/**
|
/**
|
||||||
* Remove token icon function.
|
* Remove token icon function.
|
||||||
* @param {Event} event - Browser event
|
* @param {Event} event - Browser event
|
||||||
|
* @deprecated since v3.39.0. Use 'removeCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onClick: (event: Event, index: number) => void;
|
onClick: (event: Event, index: number) => void;
|
||||||
|
/**
|
||||||
|
* Remove token icon function.
|
||||||
|
* @param {Event} event - Browser event
|
||||||
|
*/
|
||||||
|
removeCallback: (event: Event, index: number) => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<slot name="chip" :class="cx('label')" :value="val">
|
<slot name="chip" :class="cx('label')" :value="val">
|
||||||
<span :class="cx('label')" v-bind="ptm('label')">{{ val }}</span>
|
<span :class="cx('label')" v-bind="ptm('label')">{{ val }}</span>
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="removetokenicon" :class="cx('removeTokenIcon')" :index="i" :onClick="(event) => removeItem(event, i)">
|
<slot name="removetokenicon" :class="cx('removeTokenIcon')" :index="i" :onClick="(event) => removeItem(event, i)" :removeCallback="(event) => removeItem(event, i)">
|
||||||
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="[cx('removeTokenIcon'), removeTokenIcon]" @click="removeItem($event, i)" aria-hidden="true" v-bind="ptm('removeTokenIcon')" />
|
<component :is="removeTokenIcon ? 'span' : 'TimesCircleIcon'" :class="[cx('removeTokenIcon'), removeTokenIcon]" @click="removeItem($event, i)" aria-hidden="true" v-bind="ptm('removeTokenIcon')" />
|
||||||
</slot>
|
</slot>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -95,7 +95,7 @@ export interface ColorPickerPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
hueHandle: ColorPickerPassThroughOptionType;
|
hueHandle: ColorPickerPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -337,7 +337,7 @@ export interface ColumnPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
hiddenInput?: ColumnPassThroughOptionType;
|
hiddenInput?: ColumnPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -48,7 +48,7 @@ export interface ColumnGroupPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
root?: ColumnGroupPassThroughOptionType;
|
root?: ColumnGroupPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -94,7 +94,7 @@ export interface ConfirmDialogPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
acceptButton?: ButtonPassThroughOptions;
|
acceptButton?: ButtonPassThroughOptions;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -222,16 +222,31 @@ export interface ConfirmDialogSlots {
|
||||||
message: any;
|
message: any;
|
||||||
/**
|
/**
|
||||||
* Close dialog function.
|
* Close dialog function.
|
||||||
|
* @deprecated since v3.39.0. Use 'closeCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
/**
|
/**
|
||||||
* Accept function of the component
|
* Accept function of the component
|
||||||
|
* @deprecated since v3.39.0. Use 'acceptCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onAccept: () => void;
|
onAccept: () => void;
|
||||||
/**
|
/**
|
||||||
* Reject function of the component
|
* Reject function of the component
|
||||||
|
* @deprecated since v3.39.0. Use 'rejectCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onReject: () => void;
|
onReject: () => void;
|
||||||
|
/**
|
||||||
|
* Close dialog function.
|
||||||
|
*/
|
||||||
|
closeCallback: () => void;
|
||||||
|
/**
|
||||||
|
* Accept function of the component
|
||||||
|
*/
|
||||||
|
acceptCallback: () => void;
|
||||||
|
/**
|
||||||
|
* Reject function of the component
|
||||||
|
*/
|
||||||
|
rejectCallback: () => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
:unstyled="unstyled"
|
:unstyled="unstyled"
|
||||||
>
|
>
|
||||||
<template v-if="$slots.container" #container="slotProps">
|
<template v-if="$slots.container" #container="slotProps">
|
||||||
<slot name="container" :message="confirmation" :onClose="slotProps.onClose" :onAccept="accept" :onReject="reject" />
|
<slot name="container" :message="confirmation" :onClose="slotProps.onClose" :onAccept="accept" :onReject="reject" :closeCallback="slotProps.onclose" :acceptCallback="accept" :rejectCallback="reject" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="!$slots.container">
|
<template v-if="!$slots.container">
|
||||||
<template v-if="!$slots.message">
|
<template v-if="!$slots.message">
|
||||||
|
|
|
@ -76,7 +76,7 @@ export interface ConfirmPopupPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
acceptButton?: ButtonPassThroughOptions;
|
acceptButton?: ButtonPassThroughOptions;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -176,12 +176,22 @@ export interface ConfirmPopupSlots {
|
||||||
message: any;
|
message: any;
|
||||||
/**
|
/**
|
||||||
* Accept function of the component
|
* Accept function of the component
|
||||||
|
* @deprecated since v3.39.0. Use 'acceptCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onAccept: () => void;
|
onAccept: () => void;
|
||||||
/**
|
/**
|
||||||
* Reject function of the component
|
* Reject function of the component
|
||||||
|
* @deprecated since v3.39.0. Use 'rejectCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onReject: () => void;
|
onReject: () => void;
|
||||||
|
/**
|
||||||
|
* Accept function of the component
|
||||||
|
*/
|
||||||
|
acceptCallback: () => void;
|
||||||
|
/**
|
||||||
|
* Reject function of the component
|
||||||
|
*/
|
||||||
|
rejectCallback: () => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Portal>
|
<Portal>
|
||||||
<transition name="p-confirm-popup" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
<transition name="p-confirm-popup" @enter="onEnter" @after-enter="onAfterEnter" @leave="onLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
||||||
<div v-if="visible" :ref="containerRef" v-focustrap role="alertdialog" :class="cx('root')" :aria-modal="visible" @click="onOverlayClick" @keydown="onOverlayKeydown" v-bind="{ ...$attrs, ...ptm('root') }">
|
<div v-if="visible" :ref="containerRef" v-focustrap role="alertdialog" :class="cx('root')" :aria-modal="visible" @click="onOverlayClick" @keydown="onOverlayKeydown" v-bind="{ ...$attrs, ...ptm('root') }">
|
||||||
<slot v-if="$slots.container" name="container" :message="confirmation" :onAccept="accept" :onReject="reject"></slot>
|
<slot v-if="$slots.container" name="container" :message="confirmation" :onAccept="accept" :onReject="reject" :acceptCallback="accept" :rejectCallback="reject"></slot>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="!$slots.message">
|
<template v-if="!$slots.message">
|
||||||
<div :class="cx('content')" v-bind="ptm('content')">
|
<div :class="cx('content')" v-bind="ptm('content')">
|
||||||
|
|
|
@ -26,10 +26,6 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
exact: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
tabindex: {
|
tabindex: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
|
|
|
@ -90,7 +90,7 @@ export interface ContextMenuPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
submenu?: ContextMenuPassThroughOptionType;
|
submenu?: ContextMenuPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -241,6 +241,7 @@ export interface ContextMenuProps {
|
||||||
global?: boolean | undefined;
|
global?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
||||||
|
* @deprecated since v3.40.0.
|
||||||
* @defaultValue true
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
exact?: boolean | undefined;
|
exact?: boolean | undefined;
|
||||||
|
@ -290,6 +291,10 @@ export interface ContextMenuSlots {
|
||||||
* Label property of the menuitem
|
* Label property of the menuitem
|
||||||
*/
|
*/
|
||||||
label: string | ((...args: any) => string) | undefined;
|
label: string | ((...args: any) => string) | undefined;
|
||||||
|
/**
|
||||||
|
* Whether or not there is a submenu
|
||||||
|
*/
|
||||||
|
hasSubmenu: boolean;
|
||||||
/**
|
/**
|
||||||
* Binding properties of the menuitem
|
* Binding properties of the menuitem
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -122,7 +122,7 @@ describe('ContextMenu.vue', () => {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Archieve',
|
label: 'Archive',
|
||||||
icon: 'pi pi-fw pi-calendar-times',
|
icon: 'pi pi-fw pi-calendar-times',
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
:items="processedItems"
|
:items="processedItems"
|
||||||
:templates="$slots"
|
:templates="$slots"
|
||||||
:activeItemPath="activeItemPath"
|
:activeItemPath="activeItemPath"
|
||||||
:exact="exact"
|
|
||||||
:aria-labelledby="ariaLabelledby"
|
:aria-labelledby="ariaLabelledby"
|
||||||
:aria-label="ariaLabel"
|
:aria-label="ariaLabel"
|
||||||
:level="0"
|
:level="0"
|
||||||
|
@ -77,11 +76,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
|
||||||
if (!this.$slots.item) {
|
|
||||||
console.warn('In future versions, vue-router support will be removed. Item templating should be used.');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.id = this.id || UniqueComponentId();
|
this.id = this.id || UniqueComponentId();
|
||||||
|
|
||||||
|
|
|
@ -22,14 +22,7 @@
|
||||||
>
|
>
|
||||||
<div :class="cx('content')" @click="onItemClick($event, processedItem)" @mouseenter="onItemMouseEnter($event, processedItem)" v-bind="getPTOptions('content', processedItem, index)">
|
<div :class="cx('content')" @click="onItemClick($event, processedItem)" @mouseenter="onItemMouseEnter($event, processedItem)" v-bind="getPTOptions('content', processedItem, index)">
|
||||||
<template v-if="!templates.item">
|
<template v-if="!templates.item">
|
||||||
<router-link v-if="getItemProp(processedItem, 'to') && !isItemDisabled(processedItem)" v-slot="{ navigate, href, isActive, isExactActive }" :to="getItemProp(processedItem, 'to')" custom>
|
<a v-ripple :href="getItemProp(processedItem, 'url')" :class="cx('action')" :target="getItemProp(processedItem, 'target')" tabindex="-1" aria-hidden="true" v-bind="getPTOptions('action', processedItem, index)">
|
||||||
<a v-ripple :href="href" :class="cx('action', { isActive, isExactActive })" tabindex="-1" aria-hidden="true" @click="onItemActionClick($event, navigate)" v-bind="getPTOptions('action', processedItem, index)">
|
|
||||||
<component v-if="templates.itemicon" :is="templates.itemicon" :item="processedItem.item" :class="[cx('icon'), getItemProp(processedItem, 'icon')]" />
|
|
||||||
<span v-else-if="getItemProp(processedItem, 'icon')" :class="[cx('icon'), getItemProp(processedItem, 'icon')]" v-bind="getPTOptions('icon', processedItem, index)" />
|
|
||||||
<span :class="cx('label')" v-bind="getPTOptions('label', processedItem, index)">{{ getItemLabel(processedItem) }}</span>
|
|
||||||
</a>
|
|
||||||
</router-link>
|
|
||||||
<a v-else v-ripple :href="getItemProp(processedItem, 'url')" :class="cx('action')" :target="getItemProp(processedItem, 'target')" tabindex="-1" aria-hidden="true" v-bind="getPTOptions('action', processedItem, index)">
|
|
||||||
<component v-if="templates.itemicon" :is="templates.itemicon" :item="processedItem.item" :class="[cx('icon'), getItemProp(processedItem, 'icon')]" />
|
<component v-if="templates.itemicon" :is="templates.itemicon" :item="processedItem.item" :class="[cx('icon'), getItemProp(processedItem, 'icon')]" />
|
||||||
<span v-else-if="getItemProp(processedItem, 'icon')" :class="[cx('icon'), getItemProp(processedItem, 'icon')]" v-bind="getPTOptions('icon', processedItem, index)" />
|
<span v-else-if="getItemProp(processedItem, 'icon')" :class="[cx('icon'), getItemProp(processedItem, 'icon')]" v-bind="getPTOptions('icon', processedItem, index)" />
|
||||||
<span :class="cx('label')" v-bind="getPTOptions('label', processedItem, index)">{{ getItemLabel(processedItem) }}</span>
|
<span :class="cx('label')" v-bind="getPTOptions('label', processedItem, index)">{{ getItemLabel(processedItem) }}</span>
|
||||||
|
@ -39,7 +32,7 @@
|
||||||
</template>
|
</template>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<component v-else :is="templates.item" :item="processedItem.item" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
|
<component v-else :is="templates.item" :item="processedItem.item" :hasSubmenu="getItemProp(processedItem, 'items')" :label="getItemLabel(processedItem)" :props="getMenuItemProps(processedItem, index)"></component>
|
||||||
</div>
|
</div>
|
||||||
<ContextMenuSub
|
<ContextMenuSub
|
||||||
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
|
v-if="isItemVisible(processedItem) && isItemGroup(processedItem)"
|
||||||
|
@ -51,7 +44,6 @@
|
||||||
:items="processedItem.items"
|
:items="processedItem.items"
|
||||||
:templates="templates"
|
:templates="templates"
|
||||||
:activeItemPath="activeItemPath"
|
:activeItemPath="activeItemPath"
|
||||||
:exact="exact"
|
|
||||||
:level="level + 1"
|
:level="level + 1"
|
||||||
:visible="isItemActive(processedItem) && isItemGroup(processedItem)"
|
:visible="isItemActive(processedItem) && isItemGroup(processedItem)"
|
||||||
:pt="pt"
|
:pt="pt"
|
||||||
|
@ -115,10 +107,6 @@ export default {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
exact: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
activeItemPath: {
|
activeItemPath: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
|
@ -174,9 +162,6 @@ export default {
|
||||||
onItemMouseEnter(event, processedItem) {
|
onItemMouseEnter(event, processedItem) {
|
||||||
this.$emit('item-mouseenter', { originalEvent: event, processedItem });
|
this.$emit('item-mouseenter', { originalEvent: event, processedItem });
|
||||||
},
|
},
|
||||||
onItemActionClick(event, navigate) {
|
|
||||||
navigate && navigate(event);
|
|
||||||
},
|
|
||||||
getAriaSetSize() {
|
getAriaSetSize() {
|
||||||
return this.items.filter((processedItem) => this.isItemVisible(processedItem) && !this.getItemProp(processedItem, 'separator')).length;
|
return this.items.filter((processedItem) => this.isItemVisible(processedItem) && !this.getItemProp(processedItem, 'separator')).length;
|
||||||
},
|
},
|
||||||
|
@ -184,22 +169,7 @@ export default {
|
||||||
return index - this.items.slice(0, index).filter((processedItem) => this.isItemVisible(processedItem) && this.getItemProp(processedItem, 'separator')).length + 1;
|
return index - this.items.slice(0, index).filter((processedItem) => this.isItemVisible(processedItem) && this.getItemProp(processedItem, 'separator')).length + 1;
|
||||||
},
|
},
|
||||||
onEnter() {
|
onEnter() {
|
||||||
this.position();
|
DomHandler.nestedPosition(this.$refs.container, this.level);
|
||||||
},
|
|
||||||
position() {
|
|
||||||
const parentItem = this.$refs.container.parentElement;
|
|
||||||
const containerOffset = DomHandler.getOffset(this.$refs.container.parentElement);
|
|
||||||
const viewport = DomHandler.getViewport();
|
|
||||||
const sublistWidth = this.$refs.container.offsetParent ? this.$refs.container.offsetWidth : DomHandler.getHiddenElementOuterWidth(this.$refs.container);
|
|
||||||
const itemOuterWidth = DomHandler.getOuterWidth(parentItem.children[0]);
|
|
||||||
|
|
||||||
this.$refs.container.style.top = '0px';
|
|
||||||
|
|
||||||
if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - DomHandler.calculateScrollbarWidth()) {
|
|
||||||
this.$refs.container.style.left = -1 * sublistWidth + 'px';
|
|
||||||
} else {
|
|
||||||
this.$refs.container.style.left = itemOuterWidth + 'px';
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getMenuItemProps(processedItem, index) {
|
getMenuItemProps(processedItem, index) {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -35,7 +35,8 @@ const css = `
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-enter-from {
|
.p-contextmenu-enter-from,
|
||||||
|
.p-contextmenu-leave-active {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,13 +64,7 @@ const classes = {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
content: 'p-menuitem-content',
|
content: 'p-menuitem-content',
|
||||||
action: ({ props, isActive, isExactActive }) => [
|
action: 'p-menuitem-link',
|
||||||
'p-menuitem-link',
|
|
||||||
{
|
|
||||||
'router-link-active': isActive,
|
|
||||||
'router-link-active-exact': props.exact && isExactActive
|
|
||||||
}
|
|
||||||
],
|
|
||||||
icon: 'p-menuitem-icon',
|
icon: 'p-menuitem-icon',
|
||||||
label: 'p-menuitem-text',
|
label: 'p-menuitem-text',
|
||||||
submenuIcon: 'p-submenu-icon',
|
submenuIcon: 'p-submenu-icon',
|
||||||
|
|
|
@ -450,7 +450,7 @@ export default {
|
||||||
|
|
||||||
if (align === 'right') {
|
if (align === 'right') {
|
||||||
let right = 0;
|
let right = 0;
|
||||||
let next = this.$el.nextElementSibling;
|
let next = DomHandler.getNextElementSibling(this.$el, '[data-p-frozen-column="true"]');
|
||||||
|
|
||||||
if (next) {
|
if (next) {
|
||||||
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
||||||
|
@ -459,7 +459,7 @@ export default {
|
||||||
this.styleObject.right = right + 'px';
|
this.styleObject.right = right + 'px';
|
||||||
} else {
|
} else {
|
||||||
let left = 0;
|
let left = 0;
|
||||||
let prev = this.$el.previousElementSibling;
|
let prev = DomHandler.getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]');
|
||||||
|
|
||||||
if (prev) {
|
if (prev) {
|
||||||
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
||||||
|
|
|
@ -685,7 +685,7 @@ export interface DataTablePassThroughOptions {
|
||||||
*/
|
*/
|
||||||
column?: ColumnPassThroughOptionType;
|
column?: ColumnPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -402,7 +402,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editingRows: {
|
editingRows: {
|
||||||
deep: true,
|
immediate: true,
|
||||||
handler(newValue) {
|
handler(newValue) {
|
||||||
if (this.dataKey) {
|
if (this.dataKey) {
|
||||||
this.updateEditingRowKeys(newValue);
|
this.updateEditingRowKeys(newValue);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<td :style="containerStyle" :class="containerClass" role="cell" :colspan="columnProp('colspan')" :rowspan="columnProp('rowspan')" v-bind="{ ...getColumnPT('root'), ...getColumnPT('footerCell') }">
|
<td :style="containerStyle" :class="containerClass" role="cell" :colspan="columnProp('colspan')" :rowspan="columnProp('rowspan')" v-bind="{ ...getColumnPT('root'), ...getColumnPT('footerCell') }" :data-p-frozen-column="columnProp('frozen')">
|
||||||
<component v-if="column.children && column.children.footer" :is="column.children.footer" :column="column" />
|
<component v-if="column.children && column.children.footer" :is="column.children.footer" :column="column" />
|
||||||
{{ columnProp('footer') }}
|
{{ columnProp('footer') }}
|
||||||
</td>
|
</td>
|
||||||
|
@ -68,7 +68,7 @@ export default {
|
||||||
|
|
||||||
if (align === 'right') {
|
if (align === 'right') {
|
||||||
let right = 0;
|
let right = 0;
|
||||||
let next = this.$el.nextElementSibling;
|
let next = DomHandler.getNextElementSibling(this.$el, '[data-p-frozen-column="true"]');
|
||||||
|
|
||||||
if (next) {
|
if (next) {
|
||||||
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
||||||
|
@ -77,7 +77,7 @@ export default {
|
||||||
this.styleObject.right = right + 'px';
|
this.styleObject.right = right + 'px';
|
||||||
} else {
|
} else {
|
||||||
let left = 0;
|
let left = 0;
|
||||||
let prev = this.$el.previousElementSibling;
|
let prev = DomHandler.getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]');
|
||||||
|
|
||||||
if (prev) {
|
if (prev) {
|
||||||
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
||||||
|
|
|
@ -270,7 +270,7 @@ export default {
|
||||||
|
|
||||||
if (align === 'right') {
|
if (align === 'right') {
|
||||||
let right = 0;
|
let right = 0;
|
||||||
let next = this.$el.nextElementSibling;
|
let next = DomHandler.getNextElementSibling(this.$el, '[data-p-frozen-column="true"]');
|
||||||
|
|
||||||
if (next) {
|
if (next) {
|
||||||
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
right = DomHandler.getOuterWidth(next) + parseFloat(next.style.right || 0);
|
||||||
|
@ -279,7 +279,7 @@ export default {
|
||||||
this.styleObject.right = right + 'px';
|
this.styleObject.right = right + 'px';
|
||||||
} else {
|
} else {
|
||||||
let left = 0;
|
let left = 0;
|
||||||
let prev = this.$el.previousElementSibling;
|
let prev = DomHandler.getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]');
|
||||||
|
|
||||||
if (prev) {
|
if (prev) {
|
||||||
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
left = DomHandler.getOuterWidth(prev) + parseFloat(prev.style.left || 0);
|
||||||
|
|
|
@ -98,7 +98,7 @@ export interface DataViewPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
footer?: DataViewPassThroughOptionType;
|
footer?: DataViewPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -67,7 +67,7 @@ export interface DataViewLayoutOptionsPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
gridIcon?: DataViewLayoutOptionsPassThroughOptionType;
|
gridIcon?: DataViewLayoutOptionsPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -46,7 +46,7 @@ export interface DeferredContentPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
root?: DeferredContentPassThroughOptionType;
|
root?: DeferredContentPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -88,7 +88,7 @@ export interface DialogPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
mask?: DialogPassThroughOptionType;
|
mask?: DialogPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -339,13 +339,24 @@ export interface DialogSlots {
|
||||||
container(scope: {
|
container(scope: {
|
||||||
/**
|
/**
|
||||||
* Close dialog function.
|
* Close dialog function.
|
||||||
|
* @deprecated since v3.39.0. Use 'closeCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
/**
|
/**
|
||||||
* Maximize/minimize dialog function.
|
* Maximize/minimize dialog function.
|
||||||
* @param {Event} event - Browser event
|
* @param {Event} event - Browser event
|
||||||
|
* @deprecated since v3.39.0. Use 'maximizeCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onMaximize: (event: Event) => void;
|
onMaximize: (event: Event) => void;
|
||||||
|
/**
|
||||||
|
* Close dialog function.
|
||||||
|
*/
|
||||||
|
closeCallback: () => void;
|
||||||
|
/**
|
||||||
|
* Maximize/minimize dialog function.
|
||||||
|
* @param {Event} event - Browser event
|
||||||
|
*/
|
||||||
|
maximizeCallback: (event: Event) => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div v-if="containerVisible" :ref="maskRef" :class="cx('mask')" :style="sx('mask', true, { position, modal })" @click="onMaskClick" v-bind="ptm('mask')">
|
<div v-if="containerVisible" :ref="maskRef" :class="cx('mask')" :style="sx('mask', true, { position, modal })" @click="onMaskClick" v-bind="ptm('mask')">
|
||||||
<transition name="p-dialog" @before-enter="onBeforeEnter" @enter="onEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear v-bind="ptm('transition')">
|
<transition name="p-dialog" @before-enter="onBeforeEnter" @enter="onEnter" @before-leave="onBeforeLeave" @leave="onLeave" @after-leave="onAfterLeave" appear v-bind="ptm('transition')">
|
||||||
<div v-if="visible" :ref="containerRef" v-focustrap="{ disabled: !modal }" :class="cx('root')" :style="sx('root')" role="dialog" :aria-labelledby="ariaLabelledById" :aria-modal="modal" v-bind="{ ...$attrs, ...ptm('root') }">
|
<div v-if="visible" :ref="containerRef" v-focustrap="{ disabled: !modal }" :class="cx('root')" :style="sx('root')" role="dialog" :aria-labelledby="ariaLabelledById" :aria-modal="modal" v-bind="{ ...$attrs, ...ptm('root') }">
|
||||||
<slot v-if="$slots.container" name="container" :onClose="close" :onMaximize="(event) => maximize(event)"></slot>
|
<slot v-if="$slots.container" name="container" :onClose="close" :onMaximize="(event) => maximize(event)" :closeCallback="close" :maximizeCallback="(event) => maximize(event)"></slot>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div v-if="showHeader" :ref="headerContainerRef" :class="cx('header')" @mousedown="initDrag" v-bind="ptm('header')">
|
<div v-if="showHeader" :ref="headerContainerRef" :class="cx('header')" @mousedown="initDrag" v-bind="ptm('header')">
|
||||||
<slot name="header" :class="cx('headerTitle')">
|
<slot name="header" :class="cx('headerTitle')">
|
||||||
|
|
|
@ -46,7 +46,7 @@ export interface DividerPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
content?: DividerPassThroughOptionType;
|
content?: DividerPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -14,10 +14,6 @@ export default {
|
||||||
class: null,
|
class: null,
|
||||||
style: null,
|
style: null,
|
||||||
tooltipOptions: null,
|
tooltipOptions: null,
|
||||||
exact: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
menuId: {
|
menuId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: null
|
||||||
|
|
|
@ -75,7 +75,7 @@ export interface DockPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
icon?: DockPassThroughOptionType;
|
icon?: DockPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -188,6 +188,7 @@ export interface DockProps {
|
||||||
style?: any;
|
style?: any;
|
||||||
/**
|
/**
|
||||||
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
* Whether to apply 'router-link-active-exact' class if route exactly matches the item path.
|
||||||
|
* @deprecated since v3.40.0.
|
||||||
* @defaultValue true
|
* @defaultValue true
|
||||||
*/
|
*/
|
||||||
exact?: boolean | undefined;
|
exact?: boolean | undefined;
|
||||||
|
|
|
@ -1,18 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div :class="containerClass" :style="style" v-bind="ptm('root')" data-pc-name="dock">
|
<div :class="containerClass" :style="style" v-bind="ptm('root')" data-pc-name="dock">
|
||||||
<DockSub
|
<DockSub :model="model" :templates="$slots" :tooltipOptions="tooltipOptions" :position="position" :menuId="menuId" :aria-label="ariaLabel" :aria-labelledby="ariaLabelledby" :tabindex="tabindex" :pt="pt" :unstyled="unstyled"></DockSub>
|
||||||
:model="model"
|
|
||||||
:templates="$slots"
|
|
||||||
:exact="exact"
|
|
||||||
:tooltipOptions="tooltipOptions"
|
|
||||||
:position="position"
|
|
||||||
:menuId="menuId"
|
|
||||||
:aria-label="ariaLabel"
|
|
||||||
:aria-labelledby="ariaLabelledby"
|
|
||||||
:tabindex="tabindex"
|
|
||||||
:pt="pt"
|
|
||||||
:unstyled="unstyled"
|
|
||||||
></DockSub>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -23,11 +11,6 @@ import DockSub from './DockSub.vue';
|
||||||
export default {
|
export default {
|
||||||
name: 'Dock',
|
name: 'Dock',
|
||||||
extends: BaseDock,
|
extends: BaseDock,
|
||||||
beforeMount() {
|
|
||||||
if (!this.$slots.item) {
|
|
||||||
console.warn('In future versions, vue-router support will be removed. Item templating should be used.');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
containerClass() {
|
containerClass() {
|
||||||
return [this.class, this.cx('root')];
|
return [this.class, this.cx('root')];
|
||||||
|
|
|
@ -31,25 +31,7 @@
|
||||||
>
|
>
|
||||||
<div :class="cx('content')" v-bind="getPTOptions('content', processedItem, index)">
|
<div :class="cx('content')" v-bind="getPTOptions('content', processedItem, index)">
|
||||||
<template v-if="!templates['item']">
|
<template v-if="!templates['item']">
|
||||||
<router-link v-if="processedItem.to && !disabled(processedItem)" v-slot="{ navigate, href, isActive, isExactActive }" :to="processedItem.to" custom>
|
|
||||||
<a
|
|
||||||
v-tooltip:[tooltipOptions]="{ value: processedItem.label, disabled: !tooltipOptions }"
|
|
||||||
:href="href"
|
|
||||||
:class="cx('action', { isActive, isExactActive })"
|
|
||||||
:target="processedItem.target"
|
|
||||||
tabindex="-1"
|
|
||||||
aria-hidden="true"
|
|
||||||
@click="onItemActionClick($event, processedItem, navigate)"
|
|
||||||
v-bind="getPTOptions('action', processedItem, index)"
|
|
||||||
>
|
|
||||||
<template v-if="!templates['icon']">
|
|
||||||
<span v-ripple :class="[cx('icon'), processedItem.icon]" v-bind="getPTOptions('icon', processedItem, index)"></span>
|
|
||||||
</template>
|
|
||||||
<component v-else :is="templates['icon']" :item="processedItem" :class="cx('icon')"></component>
|
|
||||||
</a>
|
|
||||||
</router-link>
|
|
||||||
<a
|
<a
|
||||||
v-else
|
|
||||||
v-tooltip:[tooltipOptions]="{ value: processedItem.label, disabled: !tooltipOptions }"
|
v-tooltip:[tooltipOptions]="{ value: processedItem.label, disabled: !tooltipOptions }"
|
||||||
:href="processedItem.url"
|
:href="processedItem.url"
|
||||||
:class="cx('action')"
|
:class="cx('action')"
|
||||||
|
@ -97,10 +79,6 @@ export default {
|
||||||
type: null,
|
type: null,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
exact: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
},
|
|
||||||
tooltipOptions: null,
|
tooltipOptions: null,
|
||||||
menuId: {
|
menuId: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -163,9 +141,6 @@ export default {
|
||||||
onItemMouseEnter(index) {
|
onItemMouseEnter(index) {
|
||||||
this.currentIndex = index;
|
this.currentIndex = index;
|
||||||
},
|
},
|
||||||
onItemActionClick(event, navigate) {
|
|
||||||
navigate && navigate(event);
|
|
||||||
},
|
|
||||||
onItemClick(event, processedItem) {
|
onItemClick(event, processedItem) {
|
||||||
if (this.isSameMenuItem(event)) {
|
if (this.isSameMenuItem(event)) {
|
||||||
const command = this.getItemProp(processedItem, 'command');
|
const command = this.getItemProp(processedItem, 'command');
|
||||||
|
|
|
@ -127,13 +127,7 @@ const classes = {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
content: 'p-menuitem-content',
|
content: 'p-menuitem-content',
|
||||||
action: ({ props, isActive, isExactActive }) => [
|
action: 'p-dock-link',
|
||||||
'p-dock-link',
|
|
||||||
{
|
|
||||||
'router-link-active': isActive,
|
|
||||||
'router-link-active-exact': props.exact && isExactActive
|
|
||||||
}
|
|
||||||
],
|
|
||||||
icon: 'p-dock-icon'
|
icon: 'p-dock-icon'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -164,7 +164,7 @@ export interface DropdownPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
hiddenLastFocusableEl?: DropdownPassThroughOptionType;
|
hiddenLastFocusableEl?: DropdownPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -592,8 +592,14 @@ export interface DropdownSlots {
|
||||||
/**
|
/**
|
||||||
* Clear icon click function.
|
* Clear icon click function.
|
||||||
* @param {Event} event - Browser event
|
* @param {Event} event - Browser event
|
||||||
|
* @deprecated since v3.39.0. Use 'clearCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onClick: (event: Event) => void;
|
onClick: (event: Event) => void;
|
||||||
|
/**
|
||||||
|
* Clear icon click function.
|
||||||
|
* @param {Event} event - Browser event
|
||||||
|
*/
|
||||||
|
clearCallback: (event: Event) => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom dropdown icon template.
|
* Custom dropdown icon template.
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
>
|
>
|
||||||
<slot name="value" :value="modelValue" :placeholder="placeholder">{{ label === 'p-emptylabel' ? ' ' : label || 'empty' }}</slot>
|
<slot name="value" :value="modelValue" :placeholder="placeholder">{{ label === 'p-emptylabel' ? ' ' : label || 'empty' }}</slot>
|
||||||
</span>
|
</span>
|
||||||
<slot v-if="showClear && modelValue != null" name="clearicon" :class="cx('clearIcon')" :onClick="onClearClick">
|
<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, ...ptm('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>
|
</slot>
|
||||||
<div :class="cx('trigger')" v-bind="ptm('trigger')">
|
<div :class="cx('trigger')" v-bind="ptm('trigger')">
|
||||||
|
|
|
@ -177,7 +177,7 @@ export interface EditorPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
content?: EditorPassThroughOptionType;
|
content?: EditorPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -87,7 +87,7 @@ export interface FieldsetPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
content?: FieldsetPassThroughOptionType;
|
content?: FieldsetPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -264,7 +264,7 @@ export interface FileUploadPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
uploadIcon?: FileUploadPassThroughOptionType;
|
uploadIcon?: FileUploadPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -57,7 +57,7 @@ export interface FocusTrapDirectivePassThroughOptions {
|
||||||
*/
|
*/
|
||||||
lastFocusableElement?: FocusTrapDirectivePassThroughOptionType;
|
lastFocusableElement?: FocusTrapDirectivePassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseDirective.DirectiveHooks}
|
* @see {@link BaseDirective.DirectiveHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: DirectiveHooks;
|
hooks?: DirectiveHooks;
|
||||||
|
|
|
@ -171,7 +171,7 @@ export interface GalleriaPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
mask?: GalleriaPassThroughOptionType;
|
mask?: GalleriaPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -116,7 +116,7 @@ export interface ImagePassThroughOptions {
|
||||||
*/
|
*/
|
||||||
preview?: ImagePassThroughOptionType;
|
preview?: ImagePassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
@ -251,8 +251,13 @@ export interface ImageSlots {
|
||||||
style: any;
|
style: any;
|
||||||
/**
|
/**
|
||||||
* Image error function.
|
* Image error function.
|
||||||
|
* @deprecated since v3.39.0. Use 'errorCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onError: () => void;
|
onError: () => void;
|
||||||
|
/**
|
||||||
|
* Preview click function.
|
||||||
|
*/
|
||||||
|
errorCallback: () => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
/**
|
/**
|
||||||
* Custom preview template.
|
* Custom preview template.
|
||||||
|
@ -269,8 +274,13 @@ export interface ImageSlots {
|
||||||
style: any;
|
style: any;
|
||||||
/**
|
/**
|
||||||
* Preview click function.
|
* Preview click function.
|
||||||
|
* @deprecated since v3.39.0. Use 'previewCallback' property instead.
|
||||||
*/
|
*/
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
/**
|
||||||
|
* Preview click function.
|
||||||
|
*/
|
||||||
|
previewCallback: () => void;
|
||||||
}): VNode[];
|
}): VNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<span :class="containerClass" :style="style" v-bind="ptm('root')" data-pc-name="image">
|
<span :class="containerClass" :style="style" v-bind="ptm('root')" data-pc-name="image">
|
||||||
<slot name="image" :onError="onError">
|
<slot name="image" :onError="onError" :errorCallback="onError">
|
||||||
<img :style="imageStyle" :class="[cx('image'), imageClass]" @error="onError" v-bind="{ ...$attrs, ...ptm('image') }" />
|
<img :style="imageStyle" :class="[cx('image'), imageClass]" @error="onError" v-bind="{ ...$attrs, ...ptm('image') }" />
|
||||||
</slot>
|
</slot>
|
||||||
<button v-if="preview" ref="previewButton" type="button" :class="cx('button')" @click="onImageClick" v-bind="{ ...previewButtonProps, ...ptm('button') }">
|
<button v-if="preview" ref="previewButton" type="button" :class="cx('button')" @click="onImageClick" v-bind="{ ...previewButtonProps, ...ptm('button') }">
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
</div>
|
</div>
|
||||||
<transition name="p-image-preview" @before-enter="onBeforeEnter" @enter="onEnter" @leave="onLeave" @before-leave="onBeforeLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
<transition name="p-image-preview" @before-enter="onBeforeEnter" @enter="onEnter" @leave="onLeave" @before-leave="onBeforeLeave" @after-leave="onAfterLeave" v-bind="ptm('transition')">
|
||||||
<div v-if="previewVisible" v-bind="ptm('previewContainer')">
|
<div v-if="previewVisible" v-bind="ptm('previewContainer')">
|
||||||
<slot name="preview" :class="cx('preview')" :style="imagePreviewStyle" :onClick="onPreviewImageClick">
|
<slot name="preview" :class="cx('preview')" :style="imagePreviewStyle" :onClick="onPreviewImageClick" :previewCallback="onPreviewImageClick">
|
||||||
<img :src="$attrs.src" :class="cx('preview')" :style="imagePreviewStyle" @click="onPreviewImageClick" v-bind="ptm('preview')" />
|
<img :src="$attrs.src" :class="cx('preview')" :style="imagePreviewStyle" @click="onPreviewImageClick" v-bind="ptm('preview')" />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -54,7 +54,7 @@ export interface InlineMessagePassThroughOptions {
|
||||||
*/
|
*/
|
||||||
text?: InlineMessagePassThroughOptionType;
|
text?: InlineMessagePassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -61,7 +61,7 @@ export interface InplacePassThroughOptions {
|
||||||
*/
|
*/
|
||||||
closeButton?: ButtonPassThroughOptions;
|
closeButton?: ButtonPassThroughOptions;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<script>
|
||||||
|
import BaseComponent from 'primevue/basecomponent';
|
||||||
|
import InputGroupStyle from 'primevue/inputgroup/style';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'BaseInputGroup',
|
||||||
|
extends: BaseComponent,
|
||||||
|
style: InputGroupStyle,
|
||||||
|
provide() {
|
||||||
|
return {
|
||||||
|
$parentInstance: this
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,114 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* InputGroup displays text, icon, buttons and other content can be grouped next to an input.
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/inputgroup/)
|
||||||
|
*
|
||||||
|
* @module inputgroup
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
import { VNode } from 'vue';
|
||||||
|
import { ComponentHooks } from '../basecomponent';
|
||||||
|
import { PassThroughOptions } from '../passthrough';
|
||||||
|
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
||||||
|
|
||||||
|
export declare type InputGroupPassThroughOptionType = InputGroupPassThroughAttributes | ((options: InputGroupPassThroughMethodOptions) => InputGroupPassThroughAttributes | string) | string | null | undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom passthrough(pt) option method.
|
||||||
|
*/
|
||||||
|
export interface InputGroupPassThroughMethodOptions {
|
||||||
|
/**
|
||||||
|
* Defines instance.
|
||||||
|
*/
|
||||||
|
instance: any;
|
||||||
|
/**
|
||||||
|
* Defines passthrough(pt) options in global config.
|
||||||
|
*/
|
||||||
|
global: object | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom passthrough(pt) options.
|
||||||
|
* @see {@link InputGroupProps.pt}
|
||||||
|
*/
|
||||||
|
export interface InputGroupPassThroughOptions {
|
||||||
|
/**
|
||||||
|
* Used to pass attributes to the root's DOM element.
|
||||||
|
*/
|
||||||
|
root?: InputGroupPassThroughOptionType;
|
||||||
|
/**
|
||||||
|
* Used to manage all lifecycle hooks.
|
||||||
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
|
*/
|
||||||
|
hooks?: ComponentHooks;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom passthrough attributes for each DOM elements
|
||||||
|
*/
|
||||||
|
export interface InputGroupPassThroughAttributes {
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid properties in InputGroup component.
|
||||||
|
*/
|
||||||
|
export interface InputGroupProps {
|
||||||
|
/**
|
||||||
|
* Used to pass attributes to DOM elements inside the component.
|
||||||
|
* @type {InputGroupPassThroughOptions}
|
||||||
|
*/
|
||||||
|
pt?: PassThrough<InputGroupPassThroughOptions>;
|
||||||
|
/**
|
||||||
|
* Used to configure passthrough(pt) options of the component.
|
||||||
|
* @type {PassThroughOptions}
|
||||||
|
*/
|
||||||
|
ptOptions?: PassThroughOptions;
|
||||||
|
/**
|
||||||
|
* When enabled, it removes component related styles in the core.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
unstyled?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid slots in InputGroup component.
|
||||||
|
*/
|
||||||
|
export interface InputGroupSlots {
|
||||||
|
/**
|
||||||
|
* Custom default template.
|
||||||
|
*/
|
||||||
|
default(): VNode[];
|
||||||
|
/**
|
||||||
|
* Dynamic content template.
|
||||||
|
* @todo
|
||||||
|
*/
|
||||||
|
[key: string]: (node: any) => VNode[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid emits in InputGroup component.
|
||||||
|
*/
|
||||||
|
export interface InputGroupEmits {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **PrimeVue - InputGroup**
|
||||||
|
*
|
||||||
|
* _InputGroup displays text, icon, buttons and other content can be grouped next to an input._
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/inputgroup/)
|
||||||
|
* --- ---
|
||||||
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
||||||
|
*
|
||||||
|
* @group Component
|
||||||
|
*/
|
||||||
|
declare class InputGroup extends ClassComponent<InputGroupProps, InputGroupSlots, InputGroupEmits> {}
|
||||||
|
|
||||||
|
declare module '@vue/runtime-core' {
|
||||||
|
interface GlobalComponents {
|
||||||
|
InputGroup: GlobalComponentConstructor<InputGroup>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default InputGroup;
|
|
@ -0,0 +1,14 @@
|
||||||
|
<template>
|
||||||
|
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="inputgroup">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import BaseInputGroup from './BaseInputGroup.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'InputGroup',
|
||||||
|
extends: BaseInputGroup
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"main": "./inputgroup.cjs.js",
|
||||||
|
"module": "./inputgroup.esm.js",
|
||||||
|
"unpkg": "./inputgroup.min.js",
|
||||||
|
"types": "./InputGroup.d.ts",
|
||||||
|
"browser": {
|
||||||
|
"./sfc": "./InputGroup.vue"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { BaseStyle } from '../../base/style';
|
||||||
|
|
||||||
|
export interface InputGroupStyle extends BaseStyle {}
|
|
@ -0,0 +1,10 @@
|
||||||
|
import BaseStyle from 'primevue/base/style';
|
||||||
|
|
||||||
|
const classes = {
|
||||||
|
root: 'p-inputgroup'
|
||||||
|
};
|
||||||
|
|
||||||
|
export default BaseStyle.extend({
|
||||||
|
name: 'inputgroup',
|
||||||
|
classes
|
||||||
|
});
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"main": "./inputgroupstyle.cjs.js",
|
||||||
|
"module": "./inputgroupstyle.esm.js",
|
||||||
|
"unpkg": "./inputgroupstyle.min.js",
|
||||||
|
"types": "./InputGroupStyle.d.ts"
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
<script>
|
||||||
|
import BaseComponent from 'primevue/basecomponent';
|
||||||
|
import InputGroupAddonStyle from 'primevue/inputgroupaddon/style';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'BaseInputGroupAddon',
|
||||||
|
extends: BaseComponent,
|
||||||
|
style: InputGroupAddonStyle,
|
||||||
|
provide() {
|
||||||
|
return {
|
||||||
|
$parentInstance: this
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,114 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* InputGroupAddon displays text, icon, buttons and other content can be grouped next to an input.
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/inputgroup/)
|
||||||
|
*
|
||||||
|
* @module inputgroupaddon
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
import { VNode } from 'vue';
|
||||||
|
import { ComponentHooks } from '../basecomponent';
|
||||||
|
import { PassThroughOptions } from '../passthrough';
|
||||||
|
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
||||||
|
|
||||||
|
export declare type InputGroupAddonPassThroughOptionType = InputGroupAddonPassThroughAttributes | ((options: InputGroupAddonPassThroughMethodOptions) => InputGroupAddonPassThroughAttributes | string) | string | null | undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom passthrough(pt) option method.
|
||||||
|
*/
|
||||||
|
export interface InputGroupAddonPassThroughMethodOptions {
|
||||||
|
/**
|
||||||
|
* Defines instance.
|
||||||
|
*/
|
||||||
|
instance: any;
|
||||||
|
/**
|
||||||
|
* Defines passthrough(pt) options in global config.
|
||||||
|
*/
|
||||||
|
global: object | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom passthrough(pt) options.
|
||||||
|
* @see {@link InputGroupAddonProps.pt}
|
||||||
|
*/
|
||||||
|
export interface InputGroupAddonPassThroughOptions {
|
||||||
|
/**
|
||||||
|
* Used to pass attributes to the root's DOM element.
|
||||||
|
*/
|
||||||
|
root?: InputGroupAddonPassThroughOptionType;
|
||||||
|
/**
|
||||||
|
* Used to manage all lifecycle hooks.
|
||||||
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
|
*/
|
||||||
|
hooks?: ComponentHooks;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom passthrough attributes for each DOM elements
|
||||||
|
*/
|
||||||
|
export interface InputGroupAddonPassThroughAttributes {
|
||||||
|
[key: string]: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid properties in InputGroupAddon component.
|
||||||
|
*/
|
||||||
|
export interface InputGroupAddonProps {
|
||||||
|
/**
|
||||||
|
* Used to pass attributes to DOM elements inside the component.
|
||||||
|
* @type {InputGroupAddonPassThroughOptions}
|
||||||
|
*/
|
||||||
|
pt?: PassThrough<InputGroupAddonPassThroughOptions>;
|
||||||
|
/**
|
||||||
|
* Used to configure passthrough(pt) options of the component.
|
||||||
|
* @type {PassThroughOptions}
|
||||||
|
*/
|
||||||
|
ptOptions?: PassThroughOptions;
|
||||||
|
/**
|
||||||
|
* When enabled, it removes component related styles in the core.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
unstyled?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid slots in InputGroupAddon component.
|
||||||
|
*/
|
||||||
|
export interface InputGroupAddonSlots {
|
||||||
|
/**
|
||||||
|
* Custom default template.
|
||||||
|
*/
|
||||||
|
default(): VNode[];
|
||||||
|
/**
|
||||||
|
* Dynamic content template.
|
||||||
|
* @todo
|
||||||
|
*/
|
||||||
|
[key: string]: (node: any) => VNode[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines valid emits in InputGroupAddon component.
|
||||||
|
*/
|
||||||
|
export interface InputGroupAddonEmits {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **PrimeVue - InputGroupAddon**
|
||||||
|
*
|
||||||
|
* _InputGroupAddon displays text, icon, buttons and other content can be grouped next to an input._
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/inputgroupaddon/)
|
||||||
|
* --- ---
|
||||||
|
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
|
||||||
|
*
|
||||||
|
* @group Component
|
||||||
|
*/
|
||||||
|
declare class InputGroupAddon extends ClassComponent<InputGroupAddonProps, InputGroupAddonSlots, InputGroupAddonEmits> {}
|
||||||
|
|
||||||
|
declare module '@vue/runtime-core' {
|
||||||
|
interface GlobalComponents {
|
||||||
|
InputGroupAddon: GlobalComponentConstructor<InputGroupAddon>;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default InputGroupAddon;
|
|
@ -0,0 +1,14 @@
|
||||||
|
<template>
|
||||||
|
<div :class="cx('root')" v-bind="ptm('root')" data-pc-name="inputgroupaddon">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import BaseInputGroupAddon from './BaseInputGroupAddon.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'InputGroupAddon',
|
||||||
|
extends: BaseInputGroupAddon
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"main": "./inputgroupaddon.cjs.js",
|
||||||
|
"module": "./inputgroupaddon.esm.js",
|
||||||
|
"unpkg": "./inputgroupaddon.min.js",
|
||||||
|
"types": "./InputGroupAddon.d.ts",
|
||||||
|
"browser": {
|
||||||
|
"./sfc": "./InputGroupAddon.vue"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { BaseStyle } from '../../base/style';
|
||||||
|
|
||||||
|
export interface InputGroupAddonStyle extends BaseStyle {}
|
|
@ -0,0 +1,10 @@
|
||||||
|
import BaseStyle from 'primevue/base/style';
|
||||||
|
|
||||||
|
const classes = {
|
||||||
|
root: 'p-inputgroup-addon'
|
||||||
|
};
|
||||||
|
|
||||||
|
export default BaseStyle.extend({
|
||||||
|
name: 'inputgroupaddon',
|
||||||
|
classes
|
||||||
|
});
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"main": "./inputgroupaddonstyle.cjs.js",
|
||||||
|
"module": "./inputgroupaddonstyle.esm.js",
|
||||||
|
"unpkg": "./inputgroupaddonstyle.min.js",
|
||||||
|
"types": "./InputGroupAddonStyle.d.ts"
|
||||||
|
}
|
|
@ -45,7 +45,7 @@ export interface InputMaskPassThroughOptions {
|
||||||
*/
|
*/
|
||||||
root?: InputMaskPassThroughOptionType;
|
root?: InputMaskPassThroughOptionType;
|
||||||
/**
|
/**
|
||||||
* Used to manage all lifecycle hooks
|
* Used to manage all lifecycle hooks.
|
||||||
* @see {@link BaseComponent.ComponentHooks}
|
* @see {@link BaseComponent.ComponentHooks}
|
||||||
*/
|
*/
|
||||||
hooks?: ComponentHooks;
|
hooks?: ComponentHooks;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue