{"version":3,"file":"../../components/modals.js","sources":["components/modals.js"],"sourcesContent":["\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* global jQuery, $ */\n\n/* eslint-disable */\nvar modalDialog = function () {\n return {\n constants: {\n btnRoles: {\n accept: 'accept',\n cancel: 'cancel',\n close: 'close',\n none: 'none'\n },\n btnTitles: {\n accept: 'Принять',\n cancel: 'Отмена',\n close: 'Закрыть'\n },\n btnClasses: {\n accept: '-primary',\n cancel: '',\n close: '-close'\n },\n dataKeys: {\n main: 'modalDialogUserData',\n userContainer: 'modalDialogUserConteiner',\n buttonData: 'modalDialogButtonData'\n }\n },\n busyIndicator: function busyIndicator(visible) {\n var indicator = $('.loader.-global');\n\n if (visible === undefined || !!visible && indicator.length === 0 || !visible && indicator.length > 0) {\n if (indicator.length > 0) {\n indicator.remove();\n indicator = null;\n } else {\n indicator = $('
').appendTo('body');\n }\n }\n\n return indicator;\n },\n showBaseWnd: function showBaseWnd(options) {\n var settings = $.extend({\n // пользовательский объект, он пробрасывается во все обработчики событий.\n // Предназначен для хранения пользовательской инфы\n userTag: null,\n buttons: null,\n // массив отображаемых кнопок\n inputs: null,\n // массив отображаемых инпутов\n footer: null,\n // свойства футера\n title: '',\n // заголовок окна\n \"class\": '',\n // дополнительные классы\n isVertical: null,\n // является ли модалка вертикальной\n size: null,\n // размер модалки пока есть big, large\n isCelebrating: null,\n // является ли модалка красивой, поздравительной\n // отображать ли кнопку-крестик в правом верхнем углу\n // (она интерпретируется как this.constants.btnRoles.close)\n showCrossButton: true,\n attrNameFocus: '[data-modalfocus]',\n // строка для поиска элемента, который нужно сфокусировать после отображения окна\n onDrawContent: null,\n // Событие на запрос контента function(sender, userTag)\n onOpen: null,\n // событие окно открывается function(sender, userTag)\n afterOpen: null,\n // событие окно открылось function(sender, userTag)\n onClose: null,\n // событие окно закрывается function(sender, userTag, btnStatus)\n afterClose: null // событие окно закрылось function(sender, userTag, btnStatus)\n\n }, options);\n var wndData = {\n settings: settings,\n buttons: [],\n inputs: [],\n content: null,\n modalResult: null\n };\n var modalWnd = $(\"