<commit_before>/*!
 * ${copyright}
 */

// Provides control sap.m.P13nDialog.
sap.ui.define(['jquery.sap.global', './Dialog', './IconTabBar', './IconTabFilter', './P13nDialogRenderer', './library',
		'sap/ui/core/EnabledPropagator', 'jquery.sap.xml'], function(jQuery, Dialog, IconTabBar, IconTabFilter,
		P13nDialogRenderer, library, EnabledPropagator/* , jQuerySap */) {
	"use strict";

	/**
	 * Constructor for a new P13nDialog.
	 * 
	 * @param {string}
	 *          [sId] id for the new control, generated automatically if no id is given
	 * @param {object}
	 *          [mSettings] initial settings for the new control
	 * 
	 * @class The P13nDialog provides you a dialog that contains one or more panels. On each of the panels some changes in
	 *        regards to a table can be proceed. E.g. a panel to set a column as invisible, change the order of it or maybe a
	 *        panel to get table sorted or filtered.
	 * @extends sap.m.Dialog
	 * @author SAP SE
	 * @version ${version}
	 * 
	 * @constructor
	 * @public
	 * @since 1.26
	 * @name sap.m.P13nDialog
	 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
	 */
	var P13nDialog = Dialog.extend("sap.m.P13nDialog", /** @lends sap.m.P13nDialog.prototype */
	{
		metadata : {

			library : "sap.m",
			properties : {
				/**
				 * This property decides whether the 'Reset' button is shown inside the dialog. If this property is set to true,
				 * clicking on the 'Reset' button the 'reset' event will be raised in order to notify that model data should be
				 * reseted.
				 */
				showReset : {
					type : "boolean",
					group : "Appearance",
					defaultValue : false
				}
			},
			aggregations : {

				/**
				 * The dialog panels displayed on the dialog.
				 */
				panels : {
					type : "sap.m.P13nPanel",
					multiple : true,
					singularName : "panel",
					bindable : "bindable"
				}
			},
			events : {

				/**
				 * Event is fired when the P13nDialog is closed by 'Ok' or 'Cancel' button.
				 */
				close : {
					parameters : {

						/**
						 * Describes how the dialog was closed. It can be closed via clicking on 'Ok' or 'Cancel' button.
						 */
						type : {
							type : "string"
						}
					}
				},
				/**
				 * Event is fired when button 'reset' on P13nDialog is clicked.
				 */
				reset : {}
			}
		}
	});

	EnabledPropagator.apply(P13nDialog.prototype, [true]);

	P13nDialog.ButtonType = {
		Ok : "ok",
		Cancel : "cancel"
	};

	P13nDialog.prototype.init = function(oEvent) {
		this.addStyleClass("sapMP13nDialog");
		Dialog.prototype.init.apply(this, arguments);
		this._oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.m");
		this._initDialog();
	};

	P13nDialog.prototype._initDialog = function() {
		var that = this;
		this.setContentWidth("50rem");
		this.setContentHeight("40rem");
		this.setSubHeader(new sap.m.Bar({
			contentLeft : [new sap.m.SegmentedButton({
				select : function(oEvent) {
					var oButton = oEvent.getParameter("button");
					that._switchPanel(oButton);
				}
			})]
		}));
		this.setTitle(this._oResourceBundle.getText("P13NDIALOG_VIEW_SETTINGS"));
		this.addButton(new sap.m.Button({
			text : this._oResourceBundle.getText("P13NDIALOG_OK"),
			press : function() {
				that.fireClose({
					type : P13nDialog.ButtonType.Ok
				});
				that.close();
			}
		}));
		this.addButton(new sap.m.Button({
			text : this._oResourceBundle.getText("P13NDIALOG_CANCEL"),
			press : function() {
				that.fireClose({
					type : P13nDialog.ButtonType.Cancel
				});
				that.close();
			}
		}));
		this._oResetButton = new sap.m.Button({
			text : this._oResourceBundle.getText("P13NDIALOG_RESET"),
			visible : this.getShowReset(),
			press : function() {
				that.fireReset({});
			}
		});
		this.addButton(this._oResetButton);
	};

	P13nDialog.prototype.setShowReset = function(bShow) {
		this._oResetButton.setVisible(bShow);
	};

	/*
	 * Adds some DialogItem <code>oDialogItem</code> to the aggregation named <code>DialogItems</code>.
	 * 
	 * @param {sap.m.P13nDialogItem} oDialogItem The DialogItem to add; if empty, nothing is added. @returns {P13nDialog}<commit_msg>[INTERNAL] sap.m.P13nDialog - remove 'close' and 100% width SegmentedButton<commit_after>/*!
 * ${copyright}
 */

// Provides control sap.m.P13nDialog.
sap.ui.define(['jquery.sap.global', './Dialog', './IconTabBar', './IconTabFilter', './P13nDialogRenderer', './library',
		'sap/ui/core/EnabledPropagator', 'jquery.sap.xml'], function(jQuery, Dialog, IconTabBar, IconTabFilter,
		P13nDialogRenderer, library, EnabledPropagator/* , jQuerySap */) {
	"use strict";

	/**
	 * Constructor for a new P13nDialog.
	 * 
	 * @param {string}
	 *          [sId] id for the new control, generated automatically if no id is given
	 * @param {object}
	 *          [mSettings] initial settings for the new control
	 * 
	 * @class The P13nDialog provides you a dialog that contains one or more panels. On each of the panels some changes in
	 *        regards to a table can be proceed. E.g. a panel to set a column as invisible, change the order of it or
	 *        maybe a panel to get table sorted or filtered.
	 * @extends sap.m.Dialog
	 * @author <NAME>
	 * @version ${version}
	 * 
	 * @constructor
	 * @public
	 * @since 1.26
	 * @name sap.m.P13nDialog
	 * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
	 */
	var P13nDialog = Dialog.extend("sap.m.P13nDialog", /** @lends sap.m.P13nDialog.prototype */
	{
		metadata : {

			library : "sap.m",
			properties : {
				/**
				 * This property decides whether the 'Reset' button is shown inside the dialog. If this property is set to true,
				 * clicking on the 'Reset' button the 'reset' event will be raised in order to notify that model data should be
				 * reseted.
				 */
				showReset : {
					type : "boolean",
					group : "Appearance",
					defaultValue : false
				}
			},
			aggregations : {

				/**
				 * The dialog panels displayed on the dialog.
				 */
				panels : {
					type : "sap.m.P13nPanel",
					multiple : true,
					singularName : "panel",
					bindable : "bindable"
				}
			},
			events : {
				/**
				 * Event is fired when button 'reset' on P13nDialog is clicked.
				 */
				reset : {}
			}
		}
	});

	EnabledPropagator.apply(P13nDialog.prototype, [true]);

	// P13nDialog.ButtonType = {
	// Ok : "ok",
	// Cancel : "cancel"
	// };

	P13nDialog.prototype.init = function(oEvent) {
		this.addStyleClass("sapMP13nDialog");
		Dialog.prototype.init.apply(this, arguments);
		this._oResourceBundle = sap.ui.getCore().getLibraryResourceBundle("sap.m");
		this._initDialog();
	};

	P13nDialog.prototype._initDialog = function() {
		var that = this;
		this.setContentWidth("50rem");
		this.setContentHeight("40rem");
		this.setSubHeader(new sap.m.Bar({
			contentLeft : [new sap.m.SegmentedButton({
				select : function(oEvent) {
					var oButton = oEvent.getParameter("button");
					that._switchPanel(oButton);
				},
				width : '100%'
			})]
		}));
		this.setTitle(this._oResourceBundle.getText("P13NDIALOG_VIEW_SETTINGS"));

		this._oOKButton = new sap.m.Button({
			text : this._oResourceBundle.getText("P13NDIALOG_OK"),
			press : function() {
				that.close();
			}
		});
		this.addButton(this._oOKButton);

		this._oCancelButton = new sap.m.Button({
			text : this._oResourceBundle.getText("P13NDIALOG_CANCEL"),
			press : function() {
				that.close();
			}
		});
		this.addButton(this._oCancelButton);

		this._oResetButton = new sap.m.Button({
			text : this._oResourceBundle.getText("P13NDIALOG_RESET"),
			visible : this.getShowReset(),
			press : function() {
				that.fireReset({});
			}
		});
		this.addButton(this._oResetButton);
	};

	P13nDialog.prototype.setShowReset = function(bShow) {
		this._oResetButton.setVisible(bShow);
	};

	P13nDialog.prototype.getOKButton = function() {
		return this._oOKButton;
	};
	P13nDialog.prototype.getCancelButton = function() {
		return this._oCancelButton;
	};

	/*
	 * Adds some DialogItem <code>oDialogItem</code> to the aggregation named <code>DialogItems</code>.
	 * 
	 * @param {sap.m.P13nDialogItem} oDialogItem The DialogItem to add; if empty, nothing is added. @returns {P13nDialog}
{'fraction_non_alphanumeric': 0.1355911629036174, 'fraction_numerical': 0.015537751881524642, 'mean_word_length': 3.064627528367045, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1988258', 'n_tokens_mistral': 3217, 'n_tokens_neox': 2649, 'n_words': 660}