<commit_before>import declare from 'dojo/_base/declare';
import lang from 'dojo/_base/lang';
import action from '../../Action';
import utility from 'argos/Utility';
import List from 'argos/List';
import _GroupListMixin from '../_GroupListMixin';
import _MetricListMixin from '../_MetricListMixin';
import _RightDrawerListMixin from '../_RightDrawerListMixin';
import MODEL_NAMES from '../../Models/Names';
import getResource from 'argos/I18n';


const resource = getResource('accountList');

/**
 * @class crm.Views.Account.List
 *
 * @extends argos.List
 * @requires argos.List
 * @requires argos.Format
 * @requires argos.Utility
 * @requires argos.Convert
 *
 * @requires crm.Action
 * @requires crm.Views._GroupListMixin
 * @requires crm.Views._MetricListMixin
 * @requires crm.Views._RightDrawerListMixin
 *
 */
const __class = declare('crm.Views.Account.List', [List, _RightDrawerListMixin, _MetricListMixin, _GroupListMixin], {
  // Templates
  itemTemplate: new Simplate([
    '<p class="listview-heading">{%: $.AccountName %}</p>',
    '<p class="micro-text">{%: $.Industry %}</p>',
    '<p class="micro-text">',
    '{%: $$.joinFields(" | ", [$.Type, $.SubType]) %}',
    '</p>',
    '<p class="micro-text">{%: $.AccountManager && $.AccountManager.UserInfo ? $.AccountManager.UserInfo.UserName : "" %}',
    '{% if ($.Owner && $.Owner.OwnerDescription) { %} | {%: $.Owner.OwnerDescription %}{% } %}</p>',
    '<p class="micro-text">{%: $.WebAddress %}</p>',
    '{% if ($.MainPhone) { %}',
    '<p class="micro-text">',
    '{%: $$.phoneAbbreviationText %} <span class="hyperlink" data-action="callMain" data-key="{%: $.$key %}">{%: argos.Format.phone($.MainPhone) %}</span>', // TODO: Avoid global
    '</p>',
    '{% } %}',
    '{% if ($.Fax) { %}',
    '<p class="micro-text">',
    '{%: $$.faxAbbreviationText + argos.Format.phone($.Fax) %}', // TODO: Avoid global
    '</p>',
    '{% } %}',
  ]),
  groupsEnabled: true,
  enableDynamicGroupLayout: true,
  groupLayoutItemTemplate: new Simplate([
    '<div style="float:left; ">',
    '<p class="listview-heading"><span class="group-label">{%= $$.getGroupFieldLabelByName($,"AccountName") %} </span><span class="group-entry"><strong>{%= $$.getGroupFieldValueByName($,"AccountName") %}</strong></span></h2>',
    '<p class="micro-text"><span class="group-label">{%= $$.getGroupFieldLabelByName($,"MainPhone") %} </span><span class="group-entry">{%= $$.getGroupFieldValueByName($, "MainPhone") %}</span></p>',
    '</div><div style="float:left;">',
    '<p class="micro-text"><span class="group-label">{%= $$.getGroupFieldLabelByName($,"Status") %} </span><span class="group-entry">{%= $$.getGroupFieldValueByName($, "Status") %}</span></p>',
    '<p class="micro-text"><span class="group-label">{%= $$.getGroupFieldLabelByName($,"Type") %} </span><span class="group-entry">{%= $$.getGroupFieldValueByName($, "Type") %}</span></p>',
    '</div>',
  ]),


  joinFields: function joinFields(sep, fields) {
    return utility.joinFields(sep, fields);
  },

  // Localization
  titleText: resource.titleText,
  activitiesText: resource.titleText,
  notesText: resource.notesText,
  scheduleText: resource.scheduleText,
  editActionText: resource.editActionText,
  callMainActionText: resource.callMainActionText,
  viewContactsActionText: resource.viewContactsActionText,
  addNoteActionText: resource.addNoteActionText,
  addActivityActionText: resource.addActivityActionText,
  addAttachmentActionText: resource.addAttachmentActionText,
  phoneAbbreviationText: resource.phoneAbbreviationText,
  faxAbbreviationText: resource.faxAbbreviationText,
  offlineText: resource.offlineText,

  // View Properties
  detailView: 'account_detail',
  itemIconClass: 'spreadsheet', // todo: replace with appropriate icon
  id: 'account_list',
  security: 'Entities/Account/View',
  insertView: 'account_edit',
  insertSecurity: 'Entities/Account/Add',
  entityName: 'Account',
  allowSelection: true,
  enableActions: true,
  pageSize: 10,
  offlineIds: null,<commit_msg>INFORCRM-16225: Let Account listview use page size as defined in listbase<commit_after>import declare from 'dojo/_base/declare';
import lang from 'dojo/_base/lang';
import action from '../../Action';
import utility from 'argos/Utility';
import List from 'argos/List';
import _GroupListMixin from '../_GroupListMixin';
import _MetricListMixin from '../_MetricListMixin';
import _RightDrawerListMixin from '../_RightDrawerListMixin';
import MODEL_NAMES from '../../Models/Names';
import getResource from 'argos/I18n';


const resource = getResource('accountList');

/**
 * @class crm.Views.Account.List
 *
 * @extends argos.List
 * @requires argos.List
 * @requires argos.Format
 * @requires argos.Utility
 * @requires argos.Convert
 *
 * @requires crm.Action
 * @requires crm.Views._GroupListMixin
 * @requires crm.Views._MetricListMixin
 * @requires crm.Views._RightDrawerListMixin
 *
 */
const __class = declare('crm.Views.Account.List', [List, _RightDrawerListMixin, _MetricListMixin, _GroupListMixin], {
  // Templates
  itemTemplate: new Simplate([
    '<p class="listview-heading">{%: $.AccountName %}</p>',
    '<p class="micro-text">{%: $.Industry %}</p>',
    '<p class="micro-text">',
    '{%: $$.joinFields(" | ", [$.Type, $.SubType]) %}',
    '</p>',
    '<p class="micro-text">{%: $.AccountManager && $.AccountManager.UserInfo ? $.AccountManager.UserInfo.UserName : "" %}',
    '{% if ($.Owner && $.Owner.OwnerDescription) { %} | {%: $.Owner.OwnerDescription %}{% } %}</p>',
    '<p class="micro-text">{%: $.WebAddress %}</p>',
    '{% if ($.MainPhone) { %}',
    '<p class="micro-text">',
    '{%: $$.phoneAbbreviationText %} <span class="hyperlink" data-action="callMain" data-key="{%: $.$key %}">{%: argos.Format.phone($.MainPhone) %}</span>', // TODO: Avoid global
    '</p>',
    '{% } %}',
    '{% if ($.Fax) { %}',
    '<p class="micro-text">',
    '{%: $$.faxAbbreviationText + argos.Format.phone($.Fax) %}', // TODO: Avoid global
    '</p>',
    '{% } %}',
  ]),
  groupsEnabled: true,
  enableDynamicGroupLayout: true,
  groupLayoutItemTemplate: new Simplate([
    '<div style="float:left; ">',
    '<p class="listview-heading"><span class="group-label">{%= $$.getGroupFieldLabelByName($,"AccountName") %} </span><span class="group-entry"><strong>{%= $$.getGroupFieldValueByName($,"AccountName") %}</strong></span></h2>',
    '<p class="micro-text"><span class="group-label">{%= $$.getGroupFieldLabelByName($,"MainPhone") %} </span><span class="group-entry">{%= $$.getGroupFieldValueByName($, "MainPhone") %}</span></p>',
    '</div><div style="float:left;">',
    '<p class="micro-text"><span class="group-label">{%= $$.getGroupFieldLabelByName($,"Status") %} </span><span class="group-entry">{%= $$.getGroupFieldValueByName($, "Status") %}</span></p>',
    '<p class="micro-text"><span class="group-label">{%= $$.getGroupFieldLabelByName($,"Type") %} </span><span class="group-entry">{%= $$.getGroupFieldValueByName($, "Type") %}</span></p>',
    '</div>',
  ]),


  joinFields: function joinFields(sep, fields) {
    return utility.joinFields(sep, fields);
  },

  // Localization
  titleText: resource.titleText,
  activitiesText: resource.titleText,
  notesText: resource.notesText,
  scheduleText: resource.scheduleText,
  editActionText: resource.editActionText,
  callMainActionText: resource.callMainActionText,
  viewContactsActionText: resource.viewContactsActionText,
  addNoteActionText: resource.addNoteActionText,
  addActivityActionText: resource.addActivityActionText,
  addAttachmentActionText: resource.addAttachmentActionText,
  phoneAbbreviationText: resource.phoneAbbreviationText,
  faxAbbreviationText: resource.faxAbbreviationText,
  offlineText: resource.offlineText,

  // View Properties
  detailView: 'account_detail',
  itemIconClass: 'spreadsheet', // todo: replace with appropriate icon
  id: 'account_list',
  security: 'Entities/Account/View',
  insertView: 'account_edit',
  insertSecurity: 'Entities/Account/Add',
  entityName: 'Account',
  allowSelection: true,
  enableActions: true,
  offlineIds: null,
{'fraction_non_alphanumeric': 0.19970304380103934, 'fraction_numerical': 0.0016085127443702053, 'mean_word_length': 5.09577677224736, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '631712', 'n_tokens_mistral': 2688, 'n_tokens_neox': 2640, 'n_words': 483}