Your IP : 18.227.46.87


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/landing/node/img/dist/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/landing/node/img/dist/img.bundle.js.map

{"version":3,"file":"img.bundle.js","sources":["../src/img.js"],"sourcesContent":["import { Base } from 'landing.node.base';\nimport {Env} from 'landing.env';\n\nconst attr = BX.Landing.Utils.attr;\nconst data = BX.Landing.Utils.data;\nconst encodeDataValue = BX.Landing.Utils.encodeDataValue;\nconst decodeDataValue = BX.Landing.Utils.decodeDataValue;\n\nexport class Img extends Base\n{\n\tconstructor(options)\n\t{\n\t\tsuper(options);\n\t\tthis.type = 'img';\n\t\tthis.editPanel = null;\n\t\tthis.lastValue = null;\n\t\tthis.field = null;\n\t\tthis.uploadParams = options.uploadParams;\n\n\t\tif (!this.isGrouped())\n\t\t{\n\t\t\tthis.node.addEventListener('click', this.onClick.bind(this));\n\t\t}\n\n\t\tif (this.isAllowInlineEdit())\n\t\t{\n\t\t\tthis.node.setAttribute('title', BX.Landing.Loc.getMessage('LANDING_TITLE_OF_IMAGE_NODE'));\n\t\t}\n\t}\n\n\t/**\n\t * Click on field - edit mode.\n\t * @param {MouseEvent} event\n\t */\n\tonClick(event)\n\t{\n\t\tBX.Event.EventEmitter.emit('BX.Landing.Node.Img:onClick');\n\t\tif (\n\t\t\tthis.manifest.allowInlineEdit !== false\n\t\t\t&& BX.Landing.Main.getInstance().isControlsEnabled()\n\t\t\t&& (!BX.Landing.Node.Text.currentNode\n\t\t\t|| !BX.Landing.Node.Text.currentNode.isEditable())\n\t\t\t&& !BX.Landing.UI.Panel.StylePanel.getInstance().isShown()\n\t\t)\n\t\t{\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\n\t\t\tBX.Landing.UI.Button.ColorAction.hideAll();\n\n\t\t\tif (!this.editPanel)\n\t\t\t{\n\t\t\t\tthis.editPanel = new BX.Landing.UI.Panel.Content(this.selector, {\n\t\t\t\t\ttitle: BX.Landing.Loc.getMessage('LANDING_IMAGE_PANEL_TITLE'),\n\t\t\t\t\tclassName: 'landing-ui-panel-edit-image',\n\t\t\t\t});\n\n\t\t\t\tthis.editPanel.appendFooterButton(\n\t\t\t\t\tnew BX.Landing.UI.Button.BaseButton('save_block_content', {\n\t\t\t\t\t\ttext: BX.Landing.Loc.getMessage('BLOCK_SAVE'),\n\t\t\t\t\t\tonClick: this.save.bind(this),\n\t\t\t\t\t\tclassName: 'landing-ui-button-content-save',\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\tthis.editPanel.appendFooterButton(\n\t\t\t\t\tnew BX.Landing.UI.Button.BaseButton('cancel_block_content', {\n\t\t\t\t\t\ttext: BX.Landing.Loc.getMessage('BLOCK_CANCEL'),\n\t\t\t\t\t\tonClick: this.editPanel.hide.bind(this.editPanel),\n\t\t\t\t\t\tclassName: 'landing-ui-button-content-cancel',\n\t\t\t\t\t}),\n\t\t\t\t);\n\n\t\t\t\twindow.parent.document.body.appendChild(this.editPanel.layout);\n\t\t\t}\n\n\t\t\tconst form = new BX.Landing.UI.Form.BaseForm({ title: this.manifest.name });\n\t\t\tform.addField(this.getField());\n\n\t\t\tthis.editPanel.clear();\n\t\t\tthis.editPanel.appendForm(form);\n\t\t\tthis.editPanel.show();\n\t\t\tBX.Landing.UI.Panel.EditorPanel.getInstance().hide();\n\t\t}\n\t}\n\n\t/**\n\t * Saves value changes\n\t */\n\tsave()\n\t{\n\t\tconst value = this.editPanel.forms[0].fields[0].getValue();\n\n\t\tif (JSON.stringify(this.getValue()) !== JSON.stringify(value))\n\t\t{\n\t\t\tthis.setValue(value);\n\t\t}\n\n\t\tthis.editPanel.hide();\n\t}\n\n\t/**\n\t * Gets form field\n\t * @return {?BX.Landing.UI.Field.BaseField}\n\t */\n\tgetField(): ?BX.Landing.UI.Field.BaseField\n\t{\n\t\tif (this.field)\n\t\t{\n\t\t\tthis.field.setValue(this.getValue());\n\t\t\tthis.field.content = this.getValue();\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tthis.field.adjustPreviewBackgroundSize();\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlet description = '';\n\n\t\t\tif (this.manifest.dimensions)\n\t\t\t{\n\t\t\t\tconst dimensions = this.manifest.dimensions;\n\n\t\t\t\tconst width = (\n\t\t\t\t\tdimensions.width\n\t\t\t\t\t|| dimensions.maxWidth\n\t\t\t\t\t|| dimensions.minWidth\n\t\t\t\t);\n\n\t\t\t\tconst height = (\n\t\t\t\t\tdimensions.height\n\t\t\t\t\t|| dimensions.maxHeight\n\t\t\t\t\t|| dimensions.minHeight\n\t\t\t\t);\n\n\t\t\t\tif (width && !height)\n\t\t\t\t{\n\t\t\t\t\tdescription = `${BX.Landing.Loc.getMessage('LANDING_CONTENT_IMAGE_RECOMMENDED_WIDTH')} `;\n\t\t\t\t\tdescription += `${width}px`;\n\t\t\t\t}\n\t\t\t\telse if (height && !width)\n\t\t\t\t{\n\t\t\t\t\tdescription = `${BX.Landing.Loc.getMessage('LANDING_CONTENT_IMAGE_RECOMMENDED_HEIGHT')} `;\n\t\t\t\t\tdescription += `${height}px`;\n\t\t\t\t}\n\t\t\t\telse if (width && height)\n\t\t\t\t{\n\t\t\t\t\tdescription = `${BX.Landing.Loc.getMessage('LANDING_CONTENT_IMAGE_RECOMMENDED_SIZE')} `;\n\t\t\t\t\tdescription += `${width}px / `;\n\t\t\t\t\tdescription += `${height}px`;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst value = this.getValue();\n\t\t\tif (value.url)\n\t\t\t{\n\t\t\t\tvalue.url = decodeDataValue(value.url);\n\t\t\t}\n\n\t\t\tconst disableLink = !!this.node.closest('a') || !!this.manifest.disableLink;\n\n\t\t\tif (this.manifest.editInStyle !== true)\n\t\t\t{\n\t\t\t\tthis.field = new BX.Landing.UI.Field.Image({\n\t\t\t\t\tselector: this.selector,\n\t\t\t\t\ttitle: this.manifest.name,\n\t\t\t\t\tdescription: description,\n\t\t\t\t\tdisableLink: disableLink,\n\t\t\t\t\tisAiImageAvailable: Env.getInstance().getOptions()['ai_image_available'],\n\t\t\t\t\tisAiImageActive: Env.getInstance().getOptions()['ai_image_active'],\n\t\t\t\t\taiUnactiveInfoCode: Env.getInstance().getOptions()['ai_unactive_info_code'],\n\t\t\t\t\tcontent: value,\n\t\t\t\t\tdimensions: this.manifest.dimensions ?? {},\n\t\t\t\t\tcreate2xByDefault: this.manifest.create2xByDefault,\n\t\t\t\t\tdisableAltField: isBackground(this.node),\n\t\t\t\t\tuploadParams: this.uploadParams,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn this.field;\n\t}\n\n\t/**\n\t * Sets node value\n\t * @param value - Path to image\n\t * @param {?boolean} [preventSave = false]\n\t * @param {?boolean} [preventHistory = false]\n\t */\n\tsetValue(value, preventSave, preventHistory)\n\t{\n\t\tthis.lastValue = this.lastValue || this.getValue();\n\t\tthis.preventSave(preventSave);\n\n\t\tif (value && value.src)\n\t\t{\n\t\t\tvalue.src = decodeURIComponent(value.src);\n\t\t}\n\n\t\tif (isImage(this.node))\n\t\t{\n\t\t\tsetImageValue(this.node, value);\n\t\t}\n\n\t\tif (isBackground(this.node))\n\t\t{\n\t\t\tsetBackgroundValue(this.node, value);\n\t\t}\n\n\t\tif (value.url)\n\t\t{\n\t\t\tconst url = this.preparePseudoUrl(value.url);\n\t\t\tif (url !== null)\n\t\t\t{\n\t\t\t\tattr(this.node, 'data-pseudo-url', url);\n\t\t\t}\n\t\t}\n\n\t\tthis.onChange(preventHistory);\n\n\t\tif (!preventHistory)\n\t\t{\n\t\t\tBX.Landing.History.getInstance().push();\n\t\t}\n\n\t\tthis.lastValue = this.getValue();\n\t}\n\n\t/**\n\t * Gets node value\n\t * @return {{src: string}}\n\t */\n\tgetValue(): {src: string}\n\t{\n\t\tconst value = { type: '', src: '', alt: '', url: '' };\n\n\t\tconst fileId = parseInt(this.node.dataset.fileid, 10);\n\t\tif (fileId > 0)\n\t\t{\n\t\t\tvalue.id = fileId;\n\t\t}\n\n\t\tconst fileId2x = parseInt(this.node.dataset.fileid2x, 10);\n\t\tif (fileId2x > 0)\n\t\t{\n\t\t\tvalue.id2x = fileId2x;\n\t\t}\n\n\t\tif (isBackground(this.node))\n\t\t{\n\t\t\tvalue.type = 'background';\n\t\t\tvalue.src = getBackgroundUrl(this.node);\n\t\t\tconst src2x = getBackgroundUrl2x(this.node);\n\t\t\tif (src2x)\n\t\t\t{\n\t\t\t\tvalue.src2x = src2x;\n\t\t\t}\n\t\t}\n\n\t\tif (isImage(this.node))\n\t\t{\n\t\t\tvalue.type = 'image';\n\t\t\tvalue.alt = getAlt(this);\n\t\t\tvalue.src = getImageSrc(this.node);\n\t\t\tconst src2x = getImageSrc2x(this.node);\n\t\t\tif (src2x)\n\t\t\t{\n\t\t\t\tvalue.src2x = src2x;\n\t\t\t}\n\t\t}\n\n\t\tvalue.url = (\n\t\t\tencodeDataValue(getPseudoUrl(this))\n\t\t\t|| { text: '', href: '', target: '_self', enabled: false }\n\t\t);\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * Prepare pseudo url if needed\n\t * @param {object} url\n\t * @return {null|object}\n\t */\n\tpreparePseudoUrl(url)\n\t{\n\t\tlet urlIsChange = false;\n\t\tif (!(url.href === '#' && url.target === ''))\n\t\t{\n\t\t\turlIsChange = true;\n\t\t}\n\n\t\tif (url.href === 'selectActions:')\n\t\t{\n\t\t\turl.href = '';\n\t\t\turl.enabled = false;\n\t\t\turlIsChange = true;\n\t\t}\n\n\t\tif (url.href.startsWith('product:'))\n\t\t{\n\t\t\turl.target = '_self';\n\t\t\turlIsChange = true;\n\t\t}\n\n\t\tif (url.enabled !== false && (url.href === '' || url.href === '#'))\n\t\t{\n\t\t\turl.enabled = false;\n\t\t\turlIsChange = true;\n\t\t}\n\n\t\tif (url.target === '')\n\t\t{\n\t\t\turl.target = '_blank';\n\t\t\turlIsChange = true;\n\t\t}\n\n\t\tif (urlIsChange === true)\n\t\t{\n\t\t\treturn url;\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\nBX.Landing.Node.Img = Img;\n\n/**\n * Checks that node use backgroundImage\n * @param {HTMLElement} node\n * @return {boolean}\n */\nfunction isBackground(node): boolean\n{\n\treturn node.nodeName !== 'IMG';\n}\n\n/**\n * Checks that node is imaged\n * @param {HTMLElement} node\n * @return {boolean}\n */\nfunction isImage(node): boolean\n{\n\treturn node.nodeName === 'IMG';\n}\n\n/**\n * Gets background url\n * @param {BX.Landing.Node.Img} node\n * @return {boolean}\n */\nfunction getBackgroundUrl(node): boolean\n{\n\tconst bg = node.style.getPropertyValue('background-image');\n\tif (bg)\n\t{\n\t\tconst res = bg.match(/url\\((.*?)\\)/);\n\n\t\tif (res && res[1])\n\t\t{\n\t\t\treturn res[1].replace(/[\"'|]/g, '');\n\t\t}\n\t}\n\n\treturn '';\n}\n\n/**\n * Gets background url 2x\n * @param {BX.Landing.Node.Img} node\n * @return {boolean}\n */\nfunction getBackgroundUrl2x(node): boolean\n{\n\tconst bg = node.style.getPropertyValue('background-image');\n\tif (bg)\n\t{\n\t\tconst res = bg.match(/1x, url\\([\"'|](.*)[\"'|]\\) 2x\\)/);\n\n\t\tif (res && res[1])\n\t\t{\n\t\t\treturn res[1].replace(/[\"'|]/g, '');\n\t\t}\n\t}\n\n\treturn '';\n}\n\n/**\n * Gets image alt\n * @param {BX.Landing.Node.Img} node\n * @return {string}\n */\nfunction getAlt(node): string\n{\n\tconst alt = attr(node.node, 'alt');\n\n\treturn alt || '';\n}\n\nfunction getPseudoUrl(node): string\n{\n\tconst url = data(node.node, 'data-pseudo-url');\n\n\treturn url || '';\n}\n\n/**\n * Gets image src\n * @param {HTMLElement} node\n * @return {string}\n */\nfunction getImageSrc(node): string\n{\n\tconst src = attr(node, 'src');\n\n\treturn src || '';\n}\n\n/**\n * Gets image src 2x\n * @param {HTMLElement} node\n * @return {string}\n */\nfunction getImageSrc2x(node): string\n{\n\tconst src = attr(node, 'srcset');\n\n\treturn src ? src.replace(' 2x', '') : '';\n}\n\n/**\n * Sets image value or converts to image and sets value\n * @param {HTMLElement} node\n * @param {object} value\n */\nfunction setImageValue(node, value)\n{\n\tif (isImage(node))\n\t{\n\t\tnode.src = value.src;\n\t\tnode.alt = value.alt || '';\n\t\tnode.dataset.fileid = value.id || -1;\n\t\tnode.srcset = value.src2x ? `${value.src2x} 2x` : '';\n\t\tnode.dataset.fileid2x = value.id2x || -1;\n\t}\n\telse\n\t{\n\t\tconst newNode = BX.create('img', {\n\t\t\tattrs: { src: value.src, alt: value.alt, 'data-fileid': value.id },\n\t\t});\n\n\t\tBX.Dom.insertBefore(newNode, node);\n\t\tBX.remove(node);\n\t}\n}\n\n/**\n * Sets background value or converts to div and sets value\n * @param {HTMLElement} node\n * @param {object} value\n */\nfunction setBackgroundValue(node, value)\n{\n\tif (isBackground(node))\n\t{\n\t\tif (value.src)\n\t\t{\n\t\t\tconst style = [`background-image: url(\"${value.src}\");`];\n\t\t\tif (value.src2x)\n\t\t\t{\n\t\t\t\tstyle.push(`background-image: -webkit-image-set(url(\"${value.src}\") 1x, url(\"${value.src2x}\") 2x);`, `background-image: image-set(url(\"${value.src}\") 1x, url(\"${value.src2x}\") 2x);`);\n\t\t\t}\n\n\t\t\t// save css-vars and other styles\n\t\t\tconst oldStyleObj = node.style;\n\t\t\tconst oldStyle = {};\n\t\t\t[...oldStyleObj].forEach((prop) => {\n\t\t\t\toldStyle[prop] = oldStyleObj.getPropertyValue(prop);\n\t\t\t});\n\n\t\t\tnode.setAttribute('style', style.join(' '));\n\t\t\tfor (const prop in oldStyle)\n\t\t\t{\n\t\t\t\tif (prop !== 'background-image')\n\t\t\t\t{\n\t\t\t\t\tBX.Dom.style(node, prop, oldStyle[prop]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (node.style)\n\t\t{\n\t\t\tBX.Dom.style(node, 'background-image', null);\n\t\t}\n\n\t\tnode.dataset.fileid = value.id || -1;\n\t\tnode.dataset.fileid2x = value.id2x || -1;\n\t}\n\telse\n\t{\n\t\tconst newNode = BX.create('div', {\n\t\t\tattrs: {\n\t\t\t\tstyle: `background-image: url(\"${value.src}\")`,\n\t\t\t\t'data-fileid': value.id,\n\t\t\t},\n\t\t});\n\n\t\tBX.Dom.insertBefore(newNode, node);\n\t\tBX.Dom.remove(node);\n\t}\n}\n"],"names":["attr","BX","Landing","Utils","data","encodeDataValue","decodeDataValue","Img","Base","constructor","options","type","editPanel","lastValue","field","uploadParams","isGrouped","node","addEventListener","onClick","bind","isAllowInlineEdit","setAttribute","Loc","getMessage","event","Event","EventEmitter","emit","manifest","allowInlineEdit","Main","getInstance","isControlsEnabled","Node","Text","currentNode","isEditable","UI","Panel","StylePanel","isShown","preventDefault","stopPropagation","Button","ColorAction","hideAll","Content","selector","title","className","appendFooterButton","BaseButton","text","save","hide","window","parent","document","body","appendChild","layout","form","Form","BaseForm","name","addField","getField","clear","appendForm","show","EditorPanel","value","forms","fields","getValue","JSON","stringify","setValue","content","requestAnimationFrame","adjustPreviewBackgroundSize","description","dimensions","width","maxWidth","minWidth","height","maxHeight","minHeight","url","disableLink","closest","editInStyle","Field","Image","isAiImageAvailable","Env","getOptions","isAiImageActive","aiUnactiveInfoCode","create2xByDefault","disableAltField","isBackground","preventSave","preventHistory","src","decodeURIComponent","isImage","setImageValue","setBackgroundValue","preparePseudoUrl","onChange","History","push","alt","fileId","parseInt","dataset","fileid","id","fileId2x","fileid2x","id2x","getBackgroundUrl","src2x","getBackgroundUrl2x","getAlt","getImageSrc","getImageSrc2x","getPseudoUrl","href","target","enabled","urlIsChange","startsWith","nodeName","bg","style","getPropertyValue","res","match","replace","srcset","newNode","create","attrs","Dom","insertBefore","remove","oldStyleObj","oldStyle","forEach","prop","join"],"mappings":";;;;;CAGA,MAAMA,IAAI,GAAGC,EAAE,CAACC,OAAO,CAACC,KAAK,CAACH,IAAI;CAClC,MAAMI,IAAI,GAAGH,EAAE,CAACC,OAAO,CAACC,KAAK,CAACC,IAAI;CACl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