File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/modules/ui/install/js/ui/vue3/directives/hint/dist/hint.bundle.js.map
Back
{"version":3,"file":"hint.bundle.js","sources":["../src/tooltip.js","../src/directive.js"],"sourcesContent":["import { Popup, PopupOptions } from 'main.popup';\nimport { Tag, Text, Type } from 'main.core';\n\nclass Tooltip\n{\n\tconstructor(): void\n\t{\n\t\tthis.popup = null;\n\t}\n\n\tshow(\n\t\telement: HTMLElement,\n\t\tbindings: Object = {}\n\t): void\n\t{\n\t\tif (this.popup)\n\t\t{\n\t\t\tthis.popup.close();\n\t\t}\n\n\t\tlet popupOptions: PopupOptions = {};\n\n\t\tlet text;\n\t\tif (Type.isObject(bindings.value))\n\t\t{\n\t\t\tif (bindings.value.text)\n\t\t\t{\n\t\t\t\ttext = Text.encode(bindings.value.text);\n\t\t\t}\n\t\t\telse if (bindings.value.html)\n\t\t\t{\n\t\t\t\ttext = bindings.value.html;\n\t\t\t}\n\n\t\t\tif (Type.isObject(bindings.value.popupOptions))\n\t\t\t{\n\t\t\t\tpopupOptions = bindings.value.popupOptions;\n\t\t\t}\n\n\t\t\tif (bindings.value.position === 'top')\n\t\t\t{\n\t\t\t\tif (!Type.isObject(popupOptions.bindOptions))\n\t\t\t\t{\n\t\t\t\t\tpopupOptions.bindOptions = {};\n\t\t\t\t}\n\n\t\t\t\tpopupOptions.bindOptions.position = 'top';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttext = bindings.value;\n\t\t\tif (Type.isUndefined(element.dataset.hintHtml))\n\t\t\t{\n\t\t\t\ttext = Text.encode(text);\n\t\t\t}\n\t\t}\n\n\t\tpopupOptions.bindElement = element;\n\n\t\tif (Type.isUndefined(popupOptions.id))\n\t\t{\n\t\t\tpopupOptions.id = 'bx-vue-hint';\n\t\t}\n\n\t\tif (Type.isUndefined(popupOptions.darkMode))\n\t\t{\n\t\t\tpopupOptions.darkMode = true;\n\t\t}\n\n\t\tif (Type.isUndefined(popupOptions.content))\n\t\t{\n\t\t\tconst content = Tag.render`<span class='ui-hint-content'></span>`;\n\t\t\tcontent.innerHTML = text;\n\t\t\tpopupOptions.content = content;\n\t\t}\n\n\t\tif (Type.isUndefined(popupOptions.autoHide))\n\t\t{\n\t\t\tpopupOptions.autoHide = true;\n\t\t}\n\n\t\tif (!Type.isObject(popupOptions.bindOptions))\n\t\t{\n\t\t\tpopupOptions.bindOptions = {};\n\t\t}\n\t\tif (Type.isUndefined(popupOptions.bindOptions.position))\n\t\t{\n\t\t\tpopupOptions.bindOptions.position = 'bottom';\n\t\t}\n\n\t\tpopupOptions.cacheable = false;\n\n\t\tthis.popup = new Popup(popupOptions);\n\t\tthis.popup.show();\n\t}\n\n\thide(): void\n\t{\n\t\tif (this.popup)\n\t\t{\n\t\t\tthis.popup.close();\n\t\t}\n\t}\n}\n\nconst TooltipManager = new Tooltip;\nexport {TooltipManager as Tooltip};","/**\n * Hint Vue directive\n *\n * @package bitrix\n * @subpackage ui\n * @copyright 2001-2022 Bitrix\n */\n\n/*\n\t<span v-hint=\"$Bitrix.Loc.getMessage('HINT_HTML')\" data-hint-html>Html code</span>\n\t<span v-hint=\"{text: 'Text node'}\">Plain text</span>\n\t<span v-hint=\"{html: '<b>Html</b> code'}\">Html code</span>\n\t<span v-hint=\"{text: 'Custom position top and light mode', position: 'top', popupOptions: {darkMode: false}}\">Text top on light panel</span>\n*/\n\nimport {Tooltip} from './tooltip';\nimport {Event} from 'main.core';\nimport 'ui.hint';\n\nexport const hint = {\n\tbeforeMount(element: HTMLElement, bindings): void\n\t{\n\t\tif (!bindings.value)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tEvent.bind(element, 'mouseenter', () => Tooltip.show(element, bindings));\n\t\tEvent.bind(element, 'mouseleave', () => Tooltip.hide());\n\t}\n};"],"names":["Tooltip","constructor","popup","show","element","bindings","close","popupOptions","text","Type","isObject","value","Text","encode","html","position","bindOptions","isUndefined","dataset","hintHtml","bindElement","id","darkMode","content","Tag","render","innerHTML","autoHide","cacheable","Popup","hide","TooltipManager","hint","beforeMount","Event","bind"],"mappings":";;;;;;;AAAA,CAGA,MAAMA,OAAO,CACb;GACCC,WAAW,GACX;KACC,IAAI,CAACC,KAAK,GAAG,IAAI;;GAGlBC,IAAI,CACHC,OAAoB,EACpBC,QAAgB,GAAG,EAAE,EAEtB;KACC,IAAI,IAAI,CAACH,KAAK,EACd;OACC,IAAI,CAACA,KAAK,CAACI,KAAK,EAAE;;KAGnB,IAAIC,YAA0B,GAAG,EAAE;KAEnC,IAAIC,IAAI;KACR,IAAIC,cAAI,CAACC,QAAQ,CAACL,QAAQ,CAACM,KAAK,CAAC,EACjC;OACC,IAAIN,QAAQ,CAACM,KAAK,CAACH,IAAI,EACvB;SACCA,IAAI,GAAGI,cAAI,CAACC,MAAM,CAACR,QAAQ,CAACM,KAAK,CAACH,IAAI,CAAC;QACvC,MACI,IAAIH,QAAQ,CAACM,KAAK,CAACG,IAAI,EAC5B;SACCN,IAAI,GAAGH,QAAQ,CAACM,KAAK,CAACG,IAAI;;OAG3B,IAAIL,cAAI,CAACC,QAAQ,CAACL,QAAQ,CAACM,KAAK,CAACJ,YAAY,CAAC,EAC9C;SACCA,YAAY,GAAGF,QAAQ,CAACM,KAAK,CAACJ,YAAY;;OAG3C,IAAIF,QAAQ,CAACM,KAAK,CAACI,QAAQ,KAAK,KAAK,EACrC;SACC,IAAI,CAACN,cAAI,CAACC,QAAQ,CAACH,YAAY,CAACS,WAAW,CAAC,EAC5C;WACCT,YAAY,CAACS,WAAW,GAAG,EAAE;;SAG9BT,YAAY,CAACS,WAAW,CAACD,QAAQ,GAAG,KAAK;;MAE1C,MAED;OACCP,IAAI,GAAGH,QAAQ,CAACM,KAAK;OACrB,IAAIF,cAAI,CAACQ,WAAW,CAACb,OAAO,CAACc,OAAO,CAACC,QAAQ,CAAC,EAC9C;SACCX,IAAI,GAAGI,cAAI,CAACC,MAAM,CAACL,IAAI,CAAC;;;KAI1BD,YAAY,CAACa,W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