diff --git a/src/components/config/PrimeVue.d.ts b/src/components/config/PrimeVue.d.ts index 31c33c6b4e..5653bb252c 100644 --- a/src/components/config/PrimeVue.d.ts +++ b/src/components/config/PrimeVue.d.ts @@ -6,6 +6,27 @@ interface PrimeVueConfiguration { } interface PrimeVueLocaleOptions { + startsWith?: string; + contains?: string; + notContains?: string; + endWith?: string; + equals?: string; + notEquals?: string; + noFilter?: string; + lt?: string; + lte?: string; + gt?: string; + gte?: string; + dateIs?: string; + dateIsNot?: string; + dateBefore?: string; + dateAfter?: string; + clear?: string; + apply?: string; + matchAll?: string; + matchAny?: string; + addRule?: string; + removeRule?: string; accept?: string; reject?: string; choose?: string; @@ -17,7 +38,6 @@ interface PrimeVueLocaleOptions { monthNames: string[]; monthNamesShort: string[]; today?: string; - clear?: string; weekHeader?: string; firstDayOfWeek?: number; dateFormat?: string; @@ -25,6 +45,8 @@ interface PrimeVueLocaleOptions { medium?: string; strong?: string; passwordPrompt?: string; + emptyFilterMessage?: string; + emptyMessage?: string; } export const install: PluginFunction<{}>; @@ -35,4 +57,4 @@ declare module 'vue/types/vue' { config: PrimeVueConfiguration; } } -} \ No newline at end of file +} diff --git a/src/components/config/PrimeVue.js b/src/components/config/PrimeVue.js index 0b12f40bdc..a06c191358 100644 --- a/src/components/config/PrimeVue.js +++ b/src/components/config/PrimeVue.js @@ -1,6 +1,29 @@ +import {FilterMatchMode} from '../api'; + const defaultOptions = { ripple: false, locale: { + startsWith: 'Starts with', + contains: 'Contains', + notContains: 'Not contains', + endsWith: 'Ends with', + equals: 'Equals', + notEquals: 'Not equals', + noFilter: 'No Filter', + lt: 'Less than', + lte: 'Less than or equal to', + gt: 'Greater than', + gte: 'Greater than or equal to', + dateIs: 'Date is', + dateIsNot: 'Date is not', + dateBefore: 'Date is before', + dateAfter: 'Date is after', + clear: 'Clear', + apply: 'Apply', + matchAll: 'Match All', + matchAny: 'Match Any', + addRule: 'Add Rule', + removeRule: 'Remove Rule', accept: 'Yes', reject: 'No', choose: 'Choose', @@ -12,15 +35,40 @@ const defaultOptions = { monthNames: ["January","February","March","April","May","June","July","August","September","October","November","December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], today: 'Today', - clear: 'Clear', weekHeader: 'Wk', firstDayOfWeek: 0, dateFormat: 'mm/dd/yy', weak: 'Weak', medium: 'Medium', strong: 'Strong', - passwordPrompt: 'Enter a password' - } + passwordPrompt: 'Enter a password', + emptyFilterMessage: 'No results found', + emptyMessage: 'No available options' + }, + filterMatchModeOptions: { + text: [ + FilterMatchMode.STARTS_WITH, + FilterMatchMode.CONTAINS, + FilterMatchMode.NOT_CONTAINS, + FilterMatchMode.ENDS_WITH, + FilterMatchMode.EQUALS, + FilterMatchMode.NOT_EQUALS + ], + numeric: [ + FilterMatchMode.EQUALS, + FilterMatchMode.NOT_EQUALS, + FilterMatchMode.LESS_THAN, + FilterMatchMode.LESS_THAN_OR_EQUAL_TO, + FilterMatchMode.GREATER_THAN, + FilterMatchMode.GREATER_THAN_OR_EQUAL_TO + ], + date: [ + FilterMatchMode.DATE_IS, + FilterMatchMode.DATE_IS_NOT, + FilterMatchMode.DATE_BEFORE, + FilterMatchMode.DATE_AFTER + ] + }, }; export default {