All files / src/app/shared/components/select select-messages.model.ts

100% Statements 12/12
100% Branches 0/0
100% Functions 2/2
100% Lines 11/11

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30    99x   99x         317x           317x   317x 317x       317x 317x 317x   317x   99x  
import { I18n } from '@ngx-translate/i18n-polyfill';
 
import * as _ from 'lodash';
 
export class SelectMessages {
  i18n: I18n;
 
  empty: string;
  selectionLimit: any;
  customValidations = {};
  filter: string;
  add: string;
  noOptions: string;
 
  constructor(messages: {}, i18n: I18n) {
    this.i18n = i18n;
 
    this.empty = this.i18n('No items selected.');
    this.selectionLimit = {
      tooltip: this.i18n('Deselect item to select again'),
      text: this.i18n('Selection limit reached')
    };
    this.filter = this.i18n('Filter tags');
    this.add = this.i18n('Add badge'); // followed by " '{{filter.value}}'"
    this.noOptions = this.i18n('There are no items available.');
 
    _.merge(this, messages);
  }
}