File manager - Edit - /home/web/vm-3fadc827.na4u.ru/www/bitrix/modules/bizproc/install/js/bizproc/script/dist/script.bundle.min.js
Back
this.BX=this.BX||{};(function(e,t,r,n,a,i){"use strict";var o;function c(e,t){var r=typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&typeof e.length==="number"){if(r)e=r;var n=0;var a=function e(){};return{s:a,n:function t(){if(n>=e.length)return{done:true};return{done:false,value:e[n++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i=true,o=false,c;return{s:function t(){r=r.call(e)},n:function e(){var t=r.next();i=t.done;return t},e:function e(t){o=true;c=t},f:function e(){try{if(!i&&r.return!=null)r.return()}finally{if(o)throw c}}}}function s(e,t){if(!e)return;if(typeof e==="string")return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor)r=e.constructor.name;if(r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}function l(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++){n[r]=e[r]}return n}function u(e,t){p(e,t);t.add(e)}function p(e,t){if(t.has(e)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function f(e,t,r){if(!t.has(e)){throw new TypeError("attempted to get private field on non-instance")}return r}var d=null;var b=new WeakSet;var h=new WeakSet;var v=new WeakSet;var y=new WeakSet;var S=function(){function e(){babelHelpers.classCallCheck(this,e);u(this,y);u(this,v);u(this,h);u(this,b);babelHelpers.defineProperty(this,"scriptEditUrl","/bitrix/components/bitrix/bizproc.script.edit/");babelHelpers.defineProperty(this,"scriptListUrl","/bitrix/components/bitrix/bizproc.script.list/");babelHelpers.defineProperty(this,"scriptQueueListUrl","/bitrix/components/bitrix/bizproc.script.queue.list/");babelHelpers.defineProperty(this,"scriptQueueDocumentListUrl","/bitrix/components/bitrix/bizproc.script.queue.document.list/")}babelHelpers.createClass(e,[{key:"startScript",value:function e(n,a){var i=this;var o=this.getDocumentIds.apply(this,babelHelpers.toConsumableArray(a.split(":")));if(!o.length){r.MessageBox.alert(t.Loc.getMessage("BIZPROC_SCRIPT_MANAGER_START_NOTHING_SELECTED"));return}var c=function e(){f(i,b,m).call(i,n,o);return true};if(o.length>1){r.MessageBox.confirm(t.Loc.getMessage("BIZPROC_SCRIPT_MANAGER_START_TEXT_START").replace("#CNT#",o.length),c,t.Loc.getMessage("BIZPROC_SCRIPT_MANAGER_START_BUTTON_START"))}else{c()}}},{key:"renderParametersPopupContent",value:function e(r,n){var a=t.Dom.create("form",{attrs:{className:"bp-script-start-form"}});r.forEach((function(e){var r=BX.Bizproc.FieldType.renderControl(n,e,e.Id,e.Default||"");var i=e.Description?t.Dom.create("span",{text:e.Description,attrs:{className:"bp-script-start-form-row-desc"}}):"";t.Dom.append(t.Tag.render(o||(o=babelHelpers.taggedTemplateLiteral(['\n\t\t\t\t\t<div class="bp-script-start-form-row">\n\t\t\t\t\t\t<span class="bp-script-start-form-row-title">',"</span>\n\t\t\t\t\t\t",'\n\t\t\t\t\t\t<div class="bp-script-start-form-row-field">',"</div>\n\t\t\t\t\t</div>\n\t\t\t\t"])),t.Text.encode(e.Name),i,r),a)}));return a}},{key:"getDocumentIds",value:function e(r,n){var a=[];if(r==="crm_switcher"){var i=f(this,y,C).call(this,n);if(i){a=i.getRows().getSelectedIds()}else if(BX.CRM&&BX.CRM.Kanban&&BX.CRM.Kanban.Grid&&BX.CRM.Kanban.Grid.Instance){a=BX.CRM.Kanban.Grid.Instance.getCheckedId()}}else if(r==="crm_detail"){a=[BX.Crm.EntityEditor.getDefault().getEntityId()]}if(t.Type.isArrayFilled(a)){a=a.map((function(e){return"".concat(n.toUpperCase(),"_").concat(e)}))}return a}},{key:"createScript",value:function r(n,a){return e.openSlider(t.Uri.addParam(this.scriptEditUrl,{documentType:n,placement:a}),{width:930,cacheable:false,allowChangeHistory:false})}},{key:"showScriptList",value:function r(n,a){e.openSlider(t.Uri.addParam(this.scriptListUrl,{documentType:n,placement:a}),{cacheable:false,allowChangeHistory:false}).then((function(e){if(e.isLoaded());}))}},{key:"showScriptQueueList",value:function r(n){e.openSlider(t.Uri.addParam(this.scriptQueueListUrl,{scriptId:n}),{cacheable:false,allowChangeHistory:false})}},{key:"showScriptQueueDocumentList",value:function r(n){e.openSlider(t.Uri.addParam(this.scriptQueueDocumentListUrl,{queueId:n}),{cacheable:false,allowChangeHistory:false})}},{key:"editScript",value:function r(n,a){return e.openSlider(t.Uri.addParam(this.scriptEditUrl,{scriptId:n,placement:a}),{width:930,cacheable:false,allowChangeHistory:false})}},{key:"deleteScript",value:function e(r){return t.ajax.runAction("bizproc.script.delete",{analyticsLabel:"bizprocScriptDelete",data:{scriptId:r}})}},{key:"activateScript",value:function e(r){return t.ajax.runAction("bizproc.script.activate",{analyticsLabel:"bizprocScriptActivate",data:{scriptId:r}})}},{key:"deactivateScript",value:function e(r){return t.ajax.runAction("bizproc.script.deactivate",{analyticsLabel:"bizprocScriptDeactivate",data:{scriptId:r}})}},{key:"terminateScriptQueue",value:function e(n){t.ajax.runAction("bizproc.script.terminateQueue",{analyticsLabel:"bizprocScriptTerminateQueue",data:{queueId:n}}).then((function(e){if(e.data.error){r.MessageBox.alert(e.data.error)}}))}},{key:"deleteScriptQueue",value:function e(n){t.ajax.runAction("bizproc.script.deleteQueue",{analyticsLabel:"bizprocScriptDeleteQueue",data:{queueId:n}}).then((function(e){if(e.data.error){r.MessageBox.alert(e.data.error)}}))}}],[{key:"openSlider",value:function e(r,n){if(!t.Type.isPlainObject(n)){n={}}n=babelHelpers.objectSpread({},{cacheable:false,allowChangeHistory:true,events:{}},n);return new Promise((function(e){if(t.Type.isString(r)&&r.length>1){n.events.onClose=function(t){e(t.getSlider())};BX.SidePanel.Instance.open(r,n)}else{e()}}))}},{key:"Instance",get:function t(){if(d===null){d=new e}return d}}]);return e}();function m(e,a){var i=this;var o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var c=arguments.length>3?arguments[3]:undefined;t.ajax.runAction("bizproc.script.start",{analyticsLabel:"bizprocScriptStart",data:{scriptId:e,documentIds:a,parameters:o}}).then((function(o){if(o.data.error){r.MessageBox.alert(o.data.error)}if(o.data.status==="FILL_PARAMETERS"){f(i,v,I).call(i,e,a,o.data)}else if(o.data.status==="INVALID_PARAMETERS");else if(o.data.status==="QUEUED"){if(c){c.close()}n.UI.Notification.Center.notify({content:t.Loc.getMessage("BIZPROC_SCRIPT_MANAGER_START_QUEUED")});f(i,h,g).call(i,o.data.queueId)}}))}function g(e){var r=this;var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:500;setTimeout((function(){t.ajax.runAction("bizproc.script.execQueue",{data:{queueId:e}}).then((function(i){if(!i.data.finished){f(r,h,g).call(r,e,a)}else{n.UI.Notification.Center.notify({content:t.Loc.getMessage("BIZPROC_SCRIPT_MANAGER_START_FINISHED")})}}))}),a)}function I(e,r,n){var o=this;var s=n.parameters,l=n.documentType,u=n.scriptName;var p=this.renderParametersPopupContent(s,l);var d=new a.Popup(null,null,{events:{onPopupClose:function e(){d.destroy()}},titleBar:u||t.Loc.getMessage("BIZPROC_SCRIPT_MANAGER_START_PARAMS_POPUP_TITLE"),content:p,width:595,contentNoPaddings:true,buttons:[new i.Button({text:t.Loc.getMessage("BIZPROC_SCRIPT_MANAGER_START_BUTTON_SEND_PARAMS"),color:i.Button.Color.SUCCESS,onclick:function t(){var n={};var a=c(new FormData(p).entries()),i;try{for(a.s();!(i=a.n()).done;){var s=i.value;n[s[0]]=s[1]}}catch(e){a.e(e)}finally{a.f()}f(o,b,m).call(o,e,r,n,d)}}),new BX.UI.Button({text:t.Loc.getMessage("UI_MESSAGE_BOX_CANCEL_CAPTION"),color:BX.UI.Button.Color.LINK,onclick:function e(){d.close()}})]});d.show()}function C(e){if(!BX.Main.gridManager){return null}var t="CRM_".concat(e.toUpperCase(),"_LIST");var r=BX.Main.gridManager.data.find((function(e){return e.id.indexOf(t)===0}));return r?r.instance:null}var T=null;var A=function(){function e(){babelHelpers.classCallCheck(this,e)}babelHelpers.createClass(e,[{key:"showForPlacement",value:function e(t){if(BX.rest&&BX.rest.Marketplace){BX.rest.Marketplace.open({PLACEMENT:t})}}}],[{key:"Instance",get:function t(){if(T===null){T=new e}return T}}]);return e}();var B={Market:A,Manager:S};e.Script=B})(this.BX.Bizproc=this.BX.Bizproc||{},BX,BX.UI.Dialogs,BX,BX.Main,BX.UI); //# sourceMappingURL=script.bundle.map.js
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings