162 lines
21 KiB
JavaScript
162 lines
21 KiB
JavaScript
|
import { Injectable, signal } from '@angular/core';
|
||
|
import { Subject } from 'rxjs';
|
||
|
import { FilterMatchMode } from './filtermatchmode';
|
||
|
import * as i0 from "@angular/core";
|
||
|
export class PrimeNGConfig {
|
||
|
ripple = false;
|
||
|
inputStyle = signal('outlined');
|
||
|
overlayOptions = {};
|
||
|
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]
|
||
|
};
|
||
|
translation = {
|
||
|
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',
|
||
|
is: 'Is',
|
||
|
isNot: 'Is not',
|
||
|
before: 'Before',
|
||
|
after: 'After',
|
||
|
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',
|
||
|
upload: 'Upload',
|
||
|
cancel: 'Cancel',
|
||
|
pending: 'Pending',
|
||
|
fileSizeTypes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
||
|
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||
|
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
||
|
dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
||
|
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'],
|
||
|
chooseYear: 'Choose Year',
|
||
|
chooseMonth: 'Choose Month',
|
||
|
chooseDate: 'Choose Date',
|
||
|
prevDecade: 'Previous Decade',
|
||
|
nextDecade: 'Next Decade',
|
||
|
prevYear: 'Previous Year',
|
||
|
nextYear: 'Next Year',
|
||
|
prevMonth: 'Previous Month',
|
||
|
nextMonth: 'Next Month',
|
||
|
prevHour: 'Previous Hour',
|
||
|
nextHour: 'Next Hour',
|
||
|
prevMinute: 'Previous Minute',
|
||
|
nextMinute: 'Next Minute',
|
||
|
prevSecond: 'Previous Second',
|
||
|
nextSecond: 'Next Second',
|
||
|
am: 'am',
|
||
|
pm: 'pm',
|
||
|
dateFormat: 'mm/dd/yy',
|
||
|
firstDayOfWeek: 0,
|
||
|
today: 'Today',
|
||
|
weekHeader: 'Wk',
|
||
|
weak: 'Weak',
|
||
|
medium: 'Medium',
|
||
|
strong: 'Strong',
|
||
|
passwordPrompt: 'Enter a password',
|
||
|
emptyMessage: 'No results found',
|
||
|
searchMessage: '{0} results are available',
|
||
|
selectionMessage: '{0} items selected',
|
||
|
emptySelectionMessage: 'No selected item',
|
||
|
emptySearchMessage: 'No results found',
|
||
|
emptyFilterMessage: 'No results found',
|
||
|
aria: {
|
||
|
trueLabel: 'True',
|
||
|
falseLabel: 'False',
|
||
|
nullLabel: 'Not Selected',
|
||
|
star: '1 star',
|
||
|
stars: '{star} stars',
|
||
|
selectAll: 'All items selected',
|
||
|
unselectAll: 'All items unselected',
|
||
|
close: 'Close',
|
||
|
previous: 'Previous',
|
||
|
next: 'Next',
|
||
|
navigation: 'Navigation',
|
||
|
scrollTop: 'Scroll Top',
|
||
|
moveTop: 'Move Top',
|
||
|
moveUp: 'Move Up',
|
||
|
moveDown: 'Move Down',
|
||
|
moveBottom: 'Move Bottom',
|
||
|
moveToTarget: 'Move to Target',
|
||
|
moveToSource: 'Move to Source',
|
||
|
moveAllToTarget: 'Move All to Target',
|
||
|
moveAllToSource: 'Move All to Source',
|
||
|
pageLabel: '{page}',
|
||
|
firstPageLabel: 'First Page',
|
||
|
lastPageLabel: 'Last Page',
|
||
|
nextPageLabel: 'Next Page',
|
||
|
prevPageLabel: 'Previous Page',
|
||
|
rowsPerPageLabel: 'Rows per page',
|
||
|
previousPageLabel: 'Previous Page',
|
||
|
jumpToPageDropdownLabel: 'Jump to Page Dropdown',
|
||
|
jumpToPageInputLabel: 'Jump to Page Input',
|
||
|
selectRow: 'Row Selected',
|
||
|
unselectRow: 'Row Unselected',
|
||
|
expandRow: 'Row Expanded',
|
||
|
collapseRow: 'Row Collapsed',
|
||
|
showFilterMenu: 'Show Filter Menu',
|
||
|
hideFilterMenu: 'Hide Filter Menu',
|
||
|
filterOperator: 'Filter Operator',
|
||
|
filterConstraint: 'Filter Constraint',
|
||
|
editRow: 'Row Edit',
|
||
|
saveEdit: 'Save Edit',
|
||
|
cancelEdit: 'Cancel Edit',
|
||
|
listView: 'List View',
|
||
|
gridView: 'Grid View',
|
||
|
slide: 'Slide',
|
||
|
slideNumber: '{slideNumber}',
|
||
|
zoomImage: 'Zoom Image',
|
||
|
zoomIn: 'Zoom In',
|
||
|
zoomOut: 'Zoom Out',
|
||
|
rotateRight: 'Rotate Right',
|
||
|
rotateLeft: 'Rotate Left',
|
||
|
listLabel: 'Option List',
|
||
|
selectColor: 'Select a color',
|
||
|
removeLabel: 'Remove',
|
||
|
browseFiles: 'Browse Files',
|
||
|
maximizeLabel: 'Maximize'
|
||
|
}
|
||
|
};
|
||
|
zIndex = {
|
||
|
modal: 1100,
|
||
|
overlay: 1000,
|
||
|
menu: 1000,
|
||
|
tooltip: 1100
|
||
|
};
|
||
|
translationSource = new Subject();
|
||
|
translationObserver = this.translationSource.asObservable();
|
||
|
getTranslation(key) {
|
||
|
return this.translation[key];
|
||
|
}
|
||
|
setTranslation(value) {
|
||
|
this.translation = { ...this.translation, ...value };
|
||
|
this.translationSource.next(this.translation);
|
||
|
}
|
||
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PrimeNGConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
||
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PrimeNGConfig, providedIn: 'root' });
|
||
|
}
|
||
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PrimeNGConfig, decorators: [{
|
||
|
type: Injectable,
|
||
|
args: [{ providedIn: 'root' }]
|
||
|
}] });
|
||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJpbWVuZ2NvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy9hcGkvcHJpbWVuZ2NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztB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