Your IP : 18.222.182.52


Current Path : /var/www/u0635749/data/www/hobbyclick.ru/hobbyclick.ru/hobbyclick/www/bitrix/js/landing/
Upload File :
Current File : /var/www/u0635749/data/www/hobbyclick.ru/hobbyclick.ru/hobbyclick/www/bitrix/js/landing/node.min.js

(function(){"use strict";BX.namespace("BX.Landing.Block");var n=BX.Landing.Utils.isFunction;var t=BX.Landing.Utils.isString;var e=BX.Landing.Utils.isPlainObject;var i=BX.Landing.Utils.isArray;var o=BX.Landing.Utils.bind;var s=BX.Landing.Utils.proxy;var a=BX.Landing.Utils.data;BX.Landing.Block.Node=function(i){this.node=i.node;this.manifest=e(i.manifest)?i.manifest:{};this.selector=t(i.selector)?i.selector:"";this.onChangeHandler=n(i.onChange)?i.onChange:function(){};this.onDesignShow=n(i.onDesignShow)?i.onDesignShow:function(){};this.changeOptionsHandler=n(i.onChangeOptions)?i.onChangeOptions:function(){};this.onDocumentClick=s(this.onDocumentClick,this);this.onDocumentKeydown=s(this.onDocumentKeydown,this);o(document,"click",this.onDocumentClick);o(document,"keydown",this.onDocumentKeydown);Object.freeze(this.manifest);this.node.dataset.selector=this.selector;if(this.isAllowInlineEdit()){this.onAllowInlineEdit()}};BX.Landing.Block.Node.storage=[];BX.Landing.Block.Node.prototype={onDocumentClick:function(n){},onDocumentKeydown:function(n){if(n.keyCode===27){this.onEscapePress()}},onEscapePress:function(){},getField:function(){throw new Error("Must be implemented by subclass")},showEditor:function(){},hideEditor:function(){},onAllowInlineEdit:function(){},isAllowInlineEdit:function(){return this.manifest.allowInlineEdit!==false},isGrouped:function(){return typeof this.manifest.group==="string"&&this.manifest.group.length>0},setValue:function(n,t,e){throw new Error("Must be implemented by subclass")},getValue:function(){throw new Error("Must be implemented by subclass")},getAdditionalValue:function(){if(e(this.manifest.extend)&&i(this.manifest.extend.attrs)){return this.manifest.extend.attrs.reduce(function(n,t){return n[t]=a(this.node,t),n}.bind(this),{})}return{}},onChange:function(){this.onChangeHandler.apply(null,[this])},getIndex:function(){var n=parseInt(this.selector.split("@")[1]);n=n===n?n:0;return n},preventSave:function(n){this.isSavePreventedValue=n},isSavePrevented:function(){return!!this.isSavePreventedValue},getBlock:function(){return BX.Landing.PageObject.getBlocks().getByChildNode(this.node)}}})();
//# sourceMappingURL=node.map.js