Your IP : 18.220.227.250


Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/ui/short-view/dist/
Upload File :
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/ui/short-view/dist/short.view.bundle.js.map

{"version":3,"file":"short.view.bundle.js","sources":["../src/short.view.js"],"sourcesContent":["import {Dom, Tag, Type, Loc, Event} from 'main.core';\nimport {EventEmitter} from 'main.core.events';\n\ntype Params = {\n\tisShortView: 'Y' | 'N'\n}\n\nimport 'ui.fonts.opensans';\nimport './css/base.css';\n\nexport class ShortView extends EventEmitter\n{\n\tconstructor(params: Params)\n\t{\n\t\tsuper(params);\n\n\t\tthis.setEventNamespace('BX.UI.ShortView');\n\n\t\tthis.setShortView(params.isShortView);\n\n\t\tthis.node = null;\n\t}\n\n\trenderTo(container: HTMLElement)\n\t{\n\t\tif (!Type.isDomNode(container))\n\t\t{\n\t\t\tthrow new Error('UI ShortView: HTMLElement not found');\n\t\t}\n\n\t\tDom.append(this.render(), container);\n\t}\n\n\trender(): HTMLElement\n\t{\n\t\tconst checked = (this.getShortView() === 'Y' ? 'checked' : '');\n\n\t\tthis.node = Tag.render`\n\t\t\t<div class=\"tasks-scrum__switcher--container tasks-scrum__scope-switcher\" title=\"${Loc.getMessage('UI_SHORT_VIEW_LABEL')}\">\n\t\t\t\t<label class=\"tasks-scrum__switcher--label\">\n\t\t\t\t<div class=\"tasks-scrum__switcher--label-text\">\n\t\t\t\t\t${Loc.getMessage('UI_SHORT_VIEW_LABEL')}\n\t\t\t\t</div>\n\t\t\t\t<input type=\"checkbox\" class=\"tasks-scrum__switcher--checkbox\" ${checked}>\n\t\t\t\t<span class=\"tasks-scrum__switcher-cursor\"></span>\n\t\t\t\t</label>\n\t\t\t</div>\n\t\t`;\n\n\t\tEvent.bind(this.node, 'change', this.onChange.bind(this));\n\n\t\treturn this.node;\n\t}\n\n\tsetShortView(value: string)\n\t{\n\t\tthis.shortView = (value === 'Y' ? 'Y' : 'N');\n\t}\n\n\tgetShortView(): 'Y' | 'N'\n\t{\n\t\treturn this.shortView;\n\t}\n\n\tonChange()\n\t{\n\t\tconst checkboxNode = this.node.querySelector('input[type=\"checkbox\"]');\n\n\t\tthis.setShortView(checkboxNode.checked ? 'Y' : 'N');\n\n\t\tthis.emit('change', this.getShortView());\n\t}\n}"],"names":["ShortView","EventEmitter","constructor","params","setEventNamespace","setShortView","isShortView","node","renderTo","container","Type","isDomNode","Error","Dom","append","render","checked","getShortView","Tag","Loc","getMessage","Event","bind","onChange","value","shortView","checkboxNode","querySelector","emit"],"mappings":";;;;;;;;AAAA,CAUO,MAAMA,SAAS,SAASC,6BAAY,CAC3C;GACCC,WAAW,CAACC,MAAc,EAC1B;KACC,KAAK,CAACA,MAAM,CAAC;KAEb,IAAI,CAACC,iBAAiB,CAAC,iBAAiB,CAAC;KAEzC,IAAI,CAACC,YAAY,CAACF,MAAM,CAACG,WAAW,CAAC;KAErC,IAAI,CAACC,IAAI,GAAG,IAAI;;GAGjBC,QAAQ,CAACC,SAAsB,EAC/B;KACC,IAAI,CAACC,cAAI,CAACC,SAAS,CAACF,SAAS,CAAC,EAC9B;OACC,MAAM,IAAIG,KAAK,CAAC,qCAAqC,CAAC;;KAGvDC,aAAG,CAACC,MAAM,CAAC,IAAI,CAACC,MAAM,EAAE,EAAEN,SAAS,CAAC;;GAGrCM,MAAM,GACN;KACC,MAAMC,OAAO,GAAI,IAAI,CAACC,YAAY,EAAE,KAAK,GAAG,GAAG,SAAS,GAAG,EAAG;KAE9D,IAAI,CAACV,IAAI,GAAGW,aAAG,CAACH,MAAM,cAAC;sFAC2D,CAAwC;;;OAGvH,CAAwC;;qEAEsB,CAAU;;;;GAI3E,GAToFI,aAAG,CAACC,UAAU,CAAC,qBAAqB,CAAC,EAGpHD,aAAG,CAACC,UAAU,CAAC,qBAAqB,CAAC,EAEyBJ,OAAO,CAIzE;KAEDK,eAAK,CAACC,IAAI,CAAC,IAAI,CAACf,IAAI,EAAE,QAAQ,EAAE,IAAI,C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