Merge branch 'master' of https://github.com/primefaces/primevue
commit
2d47f24d6f
|
@ -3,13 +3,15 @@
|
|||
* Badge directive is a small status indicator for another element.
|
||||
*
|
||||
* - [Live Demo](https://primevue.org/badge)
|
||||
*
|
||||
* @module badgedirective
|
||||
*/
|
||||
import { DirectiveBinding, ObjectDirective } from 'vue';
|
||||
|
||||
/**
|
||||
* Defines modifiers of Badge directive.
|
||||
*/
|
||||
export declare type BadgeDirectiveModifiers = {
|
||||
export interface BadgeDirectiveModifiers {
|
||||
/**
|
||||
* Success severity for Badge directive.
|
||||
*/
|
||||
|
@ -26,7 +28,7 @@ export declare type BadgeDirectiveModifiers = {
|
|||
* Danger severity for Badge directive.
|
||||
*/
|
||||
danger?: string | undefined;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Binding of Badge directive.
|
||||
|
|
|
@ -458,7 +458,7 @@ describe('DataTable.vue', () => {
|
|||
await wrapper.setProps({ selection: null, selectionMode: 'single' });
|
||||
|
||||
await wrapper.vm.onRowClick({
|
||||
originalEvent: { target: wrapper.findAll('tr.p-selectable-row')[0] },
|
||||
originalEvent: { target: wrapper.findAll('tr.p-selectable-row')[0].element },
|
||||
data: smallData[0],
|
||||
index: 0
|
||||
});
|
||||
|
@ -472,13 +472,13 @@ describe('DataTable.vue', () => {
|
|||
await wrapper.setProps({ selection: null, selectionMode: 'multiple' });
|
||||
|
||||
await wrapper.vm.onRowClick({
|
||||
originalEvent: { shiftKey: true, target: wrapper.findAll('tr.p-selectable-row')[0] },
|
||||
originalEvent: { shiftKey: true, target: wrapper.findAll('tr.p-selectable-row')[0].element },
|
||||
data: smallData[0],
|
||||
index: 0
|
||||
});
|
||||
|
||||
await wrapper.vm.onRowClick({
|
||||
originalEvent: { shiftKey: true, target: wrapper.findAll('tr.p-selectable-row')[1] },
|
||||
originalEvent: { shiftKey: true, target: wrapper.findAll('tr.p-selectable-row')[1].element },
|
||||
data: smallData[1],
|
||||
index: 1
|
||||
});
|
||||
|
@ -492,13 +492,13 @@ describe('DataTable.vue', () => {
|
|||
await wrapper.setProps({ selection: null, selectionMode: 'multiple', metaKeySelection: false });
|
||||
|
||||
await wrapper.vm.onRowClick({
|
||||
originalEvent: { target: wrapper.findAll('tr.p-selectable-row')[0] },
|
||||
originalEvent: { target: wrapper.findAll('tr.p-selectable-row')[0].element },
|
||||
data: smallData[0],
|
||||
index: 0
|
||||
});
|
||||
|
||||
await wrapper.vm.onRowClick({
|
||||
originalEvent: { target: wrapper.findAll('tr.p-selectable-row')[1] },
|
||||
originalEvent: { target: wrapper.findAll('tr.p-selectable-row')[1].element },
|
||||
data: smallData[1],
|
||||
index: 1
|
||||
});
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
* Focus Trap keeps focus within a certain DOM element while tabbing.
|
||||
*
|
||||
* - [Live Demo](https://primevue.org/focustrap)
|
||||
*
|
||||
* @module focustrap
|
||||
*/
|
||||
import { DirectiveBinding, ObjectDirective } from 'vue';
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
* Ripple directive adds ripple effect to the host element.
|
||||
*
|
||||
* - [Live Demo](https://primevue.org/ripple)
|
||||
*
|
||||
* @module ripple
|
||||
*/
|
||||
import { DirectiveBinding, ObjectDirective } from 'vue';
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
* StyleClass manages css classes declaratively to during enter/leave animations or just to toggle classes on an element.
|
||||
*
|
||||
* - [Live Demo](https://primevue.org/styleclass)
|
||||
*
|
||||
* @module styleclass
|
||||
*/
|
||||
import { DirectiveBinding, ObjectDirective } from 'vue';
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
* Tooltip directive provides advisory information for a component.
|
||||
*
|
||||
* - [Live Demo](https://primevue.org/tooltip)
|
||||
*
|
||||
* @module tooltip
|
||||
*
|
||||
*/
|
||||
import { DirectiveBinding, ObjectDirective } from 'vue';
|
||||
|
||||
|
@ -42,7 +45,7 @@ export interface TooltipOptions {
|
|||
/**
|
||||
* Defines modifiers of Tooltip.
|
||||
*/
|
||||
export declare type TooltipDirectiveModifiers = {
|
||||
export interface TooltipDirectiveModifiers {
|
||||
/**
|
||||
* Right position for Tooltip.
|
||||
*/
|
||||
|
@ -63,7 +66,7 @@ export declare type TooltipDirectiveModifiers = {
|
|||
* Focus event for Tooltip.
|
||||
*/
|
||||
focus?: string | undefined;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Binding of Tooltip directive.
|
||||
|
|
|
@ -54,7 +54,6 @@ export default {
|
|||
const emits = values[`${docName}Emits`];
|
||||
const slots = values[`${docName}Slots`];
|
||||
const methods = componentValues ? componentValues['default'].methods : null;
|
||||
|
||||
const types = APIDocs[moduleName]['types'];
|
||||
let events = this.findEvents(values);
|
||||
const interfaces = this.findOtherInterfaces(values, docName);
|
||||
|
@ -109,7 +108,11 @@ export default {
|
|||
});
|
||||
}
|
||||
|
||||
if (interfaces && interfaces.length) {
|
||||
if (interfaces && interfaces.length > 0) {
|
||||
const isValidDirective = this.checkDirectiveInterfaces(interfaces, docName);
|
||||
|
||||
if (!isValidDirective) return;
|
||||
|
||||
newDoc.children.push({
|
||||
id: `api.${moduleName}.interfaces`,
|
||||
label: 'Interfaces',
|
||||
|
@ -266,6 +269,11 @@ export default {
|
|||
}
|
||||
|
||||
return interfaces;
|
||||
},
|
||||
checkDirectiveInterfaces(interfaces, docName) {
|
||||
const findMainInterface = interfaces.find((interfaceData) => interfaceData.key.includes('DirectiveBinding'));
|
||||
|
||||
return !findMainInterface || findMainInterface.values.props.length > 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue