<commit_before>/** @module deliteful/list/PageableList */
define(["dcl/dcl",
		"delite/register",
		"dojo/on",
		"dojo/string",
		"dojo/when",
		"dojo/Deferred",
		"dojo/dom-class",
		"dojo/sniff",
		"./List",
		"./Renderer",
		"../ProgressIndicator",
        "delite/handlebars",
        "requirejs-text/text!./List/_PageLoaderRenderer.html",
		"requirejs-dplugins/i18n!./List/nls/Pageable"
], function (dcl, register, on, string, when, Deferred, domClass, has,
		List, Renderer, ProgressIndicator, handlebars, template, messages) {

	/*
	 * A clickable renderer that initiate the loading of a page in a pageable list.
	 * It renders an item that has the following properties:
	 * - loadMessage: the label to display when a page is not currently loading
	 * - loadingMessage: the label to display when a page is loading
	 */
	var _PageLoaderRenderer = register("d-list-loader", [HTMLElement, Renderer], {

		/*
		 * The CSS class of the widget
		 * @member {string}
		 * @default "d-list-loader"
		 */
		baseClass: "d-list-loader",

		_setItemAttr: function (item) {
			this._set("item", item);
			if (this.item && !this.loading) {
				this._label.innerHTML = this.item.loadMessage;
			}
		},

		/*
		 * Indicates whether or not a page is currently loading.
		 * @member {boolean}<commit_msg>Fix tabs in source file.<commit_after>/** @module deliteful/list/PageableList */
define(["dcl/dcl",
		"delite/register",
		"dojo/on",
		"dojo/string",
		"dojo/when",
		"dojo/Deferred",
		"dojo/dom-class",
		"dojo/sniff",
		"./List",
		"./Renderer",
		"../ProgressIndicator",
		"delite/handlebars",
		"requirejs-text/text!./List/_PageLoaderRenderer.html",
		"requirejs-dplugins/i18n!./List/nls/Pageable"
], function (dcl, register, on, string, when, Deferred, domClass, has,
		List, Renderer, ProgressIndicator, handlebars, template, messages) {

	/*
	 * A clickable renderer that initiate the loading of a page in a pageable list.
	 * It renders an item that has the following properties:
	 * - loadMessage: the label to display when a page is not currently loading
	 * - loadingMessage: the label to display when a page is loading
	 */
	var _PageLoaderRenderer = register("d-list-loader", [HTMLElement, Renderer], {

		/*
		 * The CSS class of the widget
		 * @member {string}
		 * @default "d-list-loader"
		 */
		baseClass: "d-list-loader",

		_setItemAttr: function (item) {
			this._set("item", item);
			if (this.item && !this.loading) {
				this._label.innerHTML = this.item.loadMessage;
			}
		},

		/*
		 * Indicates whether or not a page is currently loading.
		 * @member {boolean}
{'fraction_non_alphanumeric': 0.14429400386847197, 'fraction_numerical': 0.0015473887814313346, 'mean_word_length': 3.4586206896551723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6396939', 'n_tokens_mistral': 944, 'n_tokens_neox': 845, 'n_words': 233}