Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/timeline/dist/ |
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/timeline/dist/timeline.bundle.js.map |
{"version":3,"file":"timeline.bundle.js","sources":["../src/item.js","../src/history.js","../src/stagechange.js","../src/fieldschange.js","../src/editor.js","../src/commenteditor.js","../src/comment.js","../src/animation/animation.js","../src/animation/drop.js","../src/animation/pin.js","../src/animation/show.js","../src/animation/taskcomplete.js","../src/animation/hide.js","../src/animation/queue.js","../src/stream.js","../src/timeline.js"],"sourcesContent":["import {Text, Tag, Type, Event, Dom} from 'main.core';\nimport {EventEmitter} from 'main.core.events';\nimport {MenuManager, Menu} from 'main.popup';\n\nimport 'main.date';\nimport {Loader} from \"main.loader\";\n\n/**\n * @mixes EventEmitter\n * @memberOf BX.UI.Timeline\n */\nexport class Item\n{\n\tcompletedData: {};\n\tisPinned: boolean;\n\tisProgress: boolean = false;\n\n\tconstructor(params: {\n\t\tid: number|string,\n\t\taction: ?string,\n\t\titemClassName: ?string,\n\t\ttitle: ?string,\n\t\tdescription: ?string,\n\t\thtmlDescription: ?string,\n\t\ttextDescription: ?string,\n\t\tcreatedTimestamp: ?number,\n\t\tuserId: number,\n\t\tisFixed: boolean,\n\t\teventIds: Set,\n\t\tdata: ?{\n\t\t\titem: ?{name: ?string},\n\t\t\tstageFrom: ?{id: ?number, name: ?string},\n\t\t\tstageTo: ?{id: ?number, name: ?string},\n\t\t\ttask: ?{id: ?number, title: ?string, description: ?string},\n\t\t\tfields: ?Array,\n\t\t\tscope: ?string,\n\t\t},\n\t\tevents: ?{\n\t\t\tonPinClick: ?Function,\n\t\t\tonDelete: ?Function,\n\t\t}\n\t})\n\t{\n\t\tEventEmitter.makeObservable(this, 'UI.Timeline.Item');\n\t\tthis.id = params.id;\n\t\tthis.createdTimestamp = null;\n\t\tthis.action = '';\n\t\tthis.title = '';\n\t\tthis.description = '';\n\t\tthis.htmlDescription = '';\n\t\tthis.textDescription = '';\n\t\tthis.userId = params.userId;\n\t\tthis.isFixed = (params.isFixed === true);\n\t\tthis.data = {};\n\t\tthis.eventIds = new Set();\n\t\tif(Type.isPlainObject(params))\n\t\t{\n\t\t\tif(Type.isSet(params.eventIds))\n\t\t\t{\n\t\t\t\tthis.eventIds = params.eventIds;\n\t\t\t}\n\t\t\tif(Type.isString(params.action))\n\t\t\t{\n\t\t\t\tthis.action = params.action;\n\t\t\t}\n\t\t\tif(Type.isString(params.title))\n\t\t\t{\n\t\t\t\tthis.title = params.title;\n\t\t\t}\n\t\t\tif(Type.isString(params.description))\n\t\t\t{\n\t\t\t\tthis.description = params.description;\n\t\t\t}\n\t\t\tif(Type.isString(params.htmlDescription))\n\t\t\t{\n\t\t\t\tthis.htmlDescription = params.htmlDescription;\n\t\t\t}\n\t\t\tif(Type.isString(params.textDescription))\n\t\t\t{\n\t\t\t\tthis.textDescription = params.textDescription;\n\t\t\t}\n\t\t\tif(Type.isNumber(params.createdTimestamp))\n\t\t\t{\n\t\t\t\tthis.createdTimestamp = params.createdTimestamp;\n\t\t\t}\n\t\t\tif(Type.isPlainObject(params.data))\n\t\t\t{\n\t\t\t\tthis.data = params.data;\n\t\t\t}\n\t\t}\n\t\tthis.layout = {};\n\t\tthis.timeFormat = 'H:M';\n\t\tthis.nameFormat = '';\n\t\tthis.users = new Map();\n\t\tthis.isLast = false;\n\t\tthis.events = params.events;\n\t\tthis.isPinned = false;\n\t}\n\n\tafterRender()\n\t{\n\t\tEvent.bind(this.renderPin(), 'click', this.onPinClick.bind(this));\n\t\tthis.bindActionsButtonClick();\n\t}\n\n\tbindActionsButtonClick()\n\t{\n\t\tconst button = this.getActionsButton();\n\t\tif(button)\n\t\t{\n\t\t\tEvent.bind(button, 'click', this.onActionsButtonClick.bind(this));\n\t\t}\n\t}\n\n\tsetIsLast(isLast: boolean): Item\n\t{\n\t\tthis.isLast = isLast;\n\t\tif(this.isRendered())\n\t\t{\n\t\t\tif(this.isLast)\n\t\t\t{\n\t\t\t\tthis.getContainer().classList.add('ui-item-detail-stream-section-last');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.getContainer().classList.remove('ui-item-detail-stream-section-last');\n\t\t\t}\n\t\t}\n\t}\n\n\tsetUserData(users: ?Map): Item\n\t{\n\t\tif(users)\n\t\t{\n\t\t\tthis.users = users;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tsetTimeFormat(timeFormat: string): Item\n\t{\n\t\tif(Type.isString(timeFormat))\n\t\t{\n\t\t\tthis.timeFormat = timeFormat;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tsetNameFormat(nameFormat: string): Item\n\t{\n\t\tif(Type.isString(nameFormat))\n\t\t{\n\t\t\tthis.nameFormat = nameFormat;\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tgetContainer(): ?Element\n\t{\n\t\treturn this.layout.container;\n\t}\n\n\tisRendered(): boolean\n\t{\n\t\treturn Type.isDomNode(this.getContainer());\n\t}\n\n\tgetCreatedTime(): ?Date\n\t{\n\t\tif(this.createdTimestamp > 0)\n\t\t{\n\t\t\tthis.createdTimestamp = Text.toInteger(this.createdTimestamp);\n\t\t\treturn new Date(this.createdTimestamp);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tformatTime(time): string\n\t{\n\t\treturn BX.date.format(this.timeFormat, time);\n\t}\n\n\tgetId(): string|number\n\t{\n\t\treturn this.id;\n\t}\n\n\tgetTitle(): ?string\n\t{\n\t\treturn this.title;\n\t}\n\n\tgetUserId(): number\n\t{\n\t\treturn Text.toInteger(this.userId);\n\t}\n\n\tgetScope(): ?string\n\t{\n\t\tif(Type.isString(this.data.scope))\n\t\t{\n\t\t\treturn this.data.scope;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tisScopeManual(): boolean\n\t{\n\t\tconst scope = this.getScope();\n\t\treturn (!scope || scope === 'manual');\n\t}\n\n\tisScopeAutomation(): boolean\n\t{\n\t\treturn (this.getScope() === 'automation');\n\t}\n\n\tisScopeTask(): boolean\n\t{\n\t\treturn (this.getScope() === 'task');\n\t}\n\n\tisScopeRest(): boolean\n\t{\n\t\treturn (this.getScope() === 'rest');\n\t}\n\n\trender(): Element\n\t{\n\t\tthis.layout.container = this.renderContainer();\n\n\t\tthis.updateLayout();\n\n\t\treturn this.layout.container;\n\t}\n\n\tupdateLayout()\n\t{\n\t\tthis.clearLayout(true);\n\n\t\tthis.layout.container.appendChild(this.renderIcon());\n\t\tif(this.hasMenu())\n\t\t{\n\t\t\tthis.layout.container.appendChild(this.renderActionsButton());\n\t\t}\n\t\tthis.layout.container.appendChild((this.renderPin()));\n\n\t\tlet content = this.getContent();\n\t\tif(!content)\n\t\t{\n\t\t\tcontent = this.renderContent();\n\t\t}\n\t\tthis.layout.container.appendChild(content);\n\n\t\tthis.afterRender();\n\t}\n\n\trenderContainer(): Element\n\t{\n\t\treturn Tag.render`<div class=\"ui-item-detail-stream-section ${(this.isLast ? 'ui-item-detail-stream-section-last' : '')}\"></div>`;\n\t}\n\n\trenderPin(): Element\n\t{\n\t\tif(!this.layout.pin)\n\t\t{\n\t\t\tthis.layout.pin = Tag.render`<span class=\"ui-item-detail-stream-section-top-fixed-btn\"></span>`;\n\t\t}\n\n\t\tif(this.isFixed)\n\t\t{\n\t\t\tthis.layout.pin.classList.add('ui-item-detail-stream-section-top-fixed-btn-active');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.layout.pin.classList.remove('ui-item-detail-stream-section-top-fixed-btn-active');\n\t\t}\n\n\t\treturn this.layout.pin;\n\t}\n\n\trenderContent(): Element\n\t{\n\t\tthis.layout.content = Tag.render`<div class=\"ui-item-detail-stream-section-content\">${this.renderDescription()}</div>`;\n\n\t\treturn this.getContent();\n\t}\n\n\tgetContent(): ?Element\n\t{\n\t\treturn this.layout.content;\n\t}\n\n\trenderDescription(): Element\n\t{\n\t\tthis.layout.description = Tag.render`<div class=\"ui-item-detail-stream-content-event\"></div>`;\n\n\t\tlet header = this.renderHeader();\n\t\tif(header)\n\t\t{\n\t\t\tthis.layout.description.appendChild(header);\n\t\t}\n\n\t\tthis.layout.description.appendChild(this.renderMain());\n\n\t\treturn this.layout.description;\n\t}\n\n\trenderHeader(): ?Element\n\t{\n\t\treturn null;\n\t}\n\n\trenderHeaderUser(userId: ?number, size: ?number = 21): Element\n\t{\n\t\tuserId = Text.toInteger(userId);\n\t\tlet userData = {\n\t\t\tlink: 'javascript: void(0)',\n\t\t\tfullName: '',\n\t\t\tphoto: null,\n\t\t};\n\t\tif(userId > 0)\n\t\t{\n\t\t\tuserData = this.users.get(userId);\n\t\t}\n\t\tif(!userData)\n\t\t{\n\t\t\treturn Tag.render`<a></a>`;\n\t\t}\n\n\t\tconst safeFullName = Tag.safe`${userData.fullName}`;\n\t\treturn Tag.render`<a class=\"ui-item-detail-stream-content-employee\" href=\"${userData.link}\" target=\"_blank\" title=\"${safeFullName}\" ${userData.photo ? 'style=\"background-image: url(\\'' + userData.photo + '\\'); background-size: 100%;\"' : ''}></a>`;\n\t}\n\n\trenderMain(): Element\n\t{\n\t\tthis.layout.main = Tag.render`<div class=\"ui-item-detail-stream-content-detail\">${this.description}</div>`;\n\n\t\treturn this.getMain();\n\t}\n\n\tgetMain(): ?Element\n\t{\n\t\treturn this.layout.main;\n\t}\n\n\trenderIcon(): Element\n\t{\n\t\tthis.layout.icon = Tag.render`<div class=\"ui-item-detail-stream-section-icon\"></div>`;\n\n\t\treturn this.layout.icon;\n\t}\n\n\tgetItem(): ?{name: ?string}\n\t{\n\t\tif(Type.isPlainObject(this.data.item))\n\t\t{\n\t\t\treturn this.data.item;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tonPinClick()\n\t{\n\t\tthis.isFixed = !this.isFixed;\n\t\tthis.renderPin();\n\t\tif(Type.isFunction(this.events.onPinClick))\n\t\t{\n\t\t\tthis.events.onPinClick(this);\n\t\t}\n\t\tthis.emit('onPinClick');\n\t}\n\n\tclearLayout(isSkipContainer = false): Item\n\t{\n\t\tconst container = this.getContainer();\n\t\tObject.keys(this.layout).forEach((name: string) =>\n\t\t{\n\t\t\tconst node = this.layout[name];\n\t\t\tif(!isSkipContainer || container !== node)\n\t\t\t{\n\t\t\t\tDom.remove(node);\n\t\t\t\tdelete this.layout[name];\n\t\t\t}\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tgetDataForUpdate(): {}\n\t{\n\t\treturn {\n\t\t\tdescription: this.description,\n\t\t\thtmlDescription: this.htmlDescription,\n\t\t\tdata: this.data,\n\t\t\tuserId: this.userId,\n\t\t};\n\t}\n\n\tupdateData(params: {\n\t\tdescription: ?string,\n\t\thtmlDescription: ?string,\n\t\tdata: ?{},\n\t\tuserId: ?number,\n\t}): Item\n\t{\n\t\tif(Type.isPlainObject(params))\n\t\t{\n\t\t\tif(Type.isString(params.description))\n\t\t\t{\n\t\t\t\tthis.description = params.description;\n\t\t\t}\n\t\t\tif(Type.isString(params.htmlDescription))\n\t\t\t{\n\t\t\t\tthis.htmlDescription = params.htmlDescription;\n\t\t\t}\n\t\t\tif(Type.isPlainObject(params.data))\n\t\t\t{\n\t\t\t\tthis.data = params.data;\n\t\t\t}\n\t\t\tif(params.userId > 0)\n\t\t\t{\n\t\t\t\tthis.userId = params.userId;\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tupdate(params): Item\n\t{\n\t\tthis.updateData(params).updateLayout();\n\n\t\treturn this;\n\t}\n\n\tonError(params: {message: string})\n\t{\n\t\tif(Type.isFunction(this.events.onError))\n\t\t{\n\t\t\tthis.events.onError(params);\n\t\t}\n\t\tthis.emit('error', params);\n\t}\n\n\tonDelete()\n\t{\n\t\tif(Type.isFunction(this.events.onDelete))\n\t\t{\n\t\t\tthis.events.onDelete(this);\n\t\t}\n\t\tthis.emit('onDeleteComplete');\n\t}\n\n\thasMenu(): boolean\n\t{\n\t\treturn this.hasActions();\n\t}\n\n\thasActions(): boolean\n\t{\n\t\treturn (this.getActions().length > 0);\n\t}\n\n\tgetActions(): Array\n\t{\n\t\treturn [];\n\t}\n\n\trenderActionsButton(): Element\n\t{\n\t\tthis.layout.contextMenuButton = Tag.render`<div class=\"ui-timeline-item-context-menu\"></div>`;\n\n\t\treturn this.getActionsButton()\n\t}\n\n\tgetActionsButton(): ?Element\n\t{\n\t\treturn this.layout.contextMenuButton;\n\t}\n\n\tgetActionsMenuId(): string\n\t{\n\t\treturn 'ui-timeline-item-context-menu-' + this.getId();\n\t}\n\n\tonActionsButtonClick()\n\t{\n\t\tthis.getActionsMenu().toggle();\n\t}\n\n\tgetActionsMenu(): Menu\n\t{\n\t\treturn MenuManager.create({\n\t\t\tid: this.getActionsMenuId(),\n\t\t\tbindElement: this.getActionsButton(),\n\t\t\titems: this.getActions(),\n\t\t\toffsetTop: 0,\n\t\t\toffsetLeft: 16,\n\t\t\tangle: { position: \"top\", offset: 0 },\n\t\t\tevents:\n\t\t\t{\n\t\t\t\tonPopupShow: this.onContextMenuShow.bind(this),\n\t\t\t\tonPopupClose: this.onContextMenuClose.bind(this),\n\t\t\t},\n\t\t});\n\t}\n\n\tonContextMenuShow()\n\t{\n\t\tthis.getActionsButton().classList.add('active');\n\t}\n\n\tonContextMenuClose()\n\t{\n\t\tthis.getActionsButton().classList.remove('active');\n\t\tthis.getActionsMenu().destroy();\n\t}\n\n\tstartProgress()\n\t{\n\t\tthis.isProgress = true;\n\t\tthis.getLoader().show();\n\t}\n\n\tstopProgress()\n\t{\n\t\tthis.isProgress = false;\n\t\tif(this.getLoader().isShown())\n\t\t{\n\t\t\tthis.getLoader().hide();\n\t\t}\n\t}\n\n\tgetLoader(): Loader\n\t{\n\t\tif(!this.loader)\n\t\t{\n\t\t\tthis.loader = new Loader({\n\t\t\t\ttarget: this.getContainer(),\n\t\t\t});\n\t\t}\n\n\t\treturn this.loader;\n\t}\n}","import {Type, Tag, Loc, Text} from 'main.core';\nimport {Item} from './item';\n\nexport class History extends Item\n{\n\trenderContainer(): Element\n\t{\n\t\tconst container = super.renderContainer();\n\t\tif(this.isScopeAutomation())\n\t\t{\n\t\t\tcontainer.classList.add('ui-item-detail-stream-section-icon-robot');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcontainer.classList.add('ui-item-detail-stream-section-info');\n\t\t}\n\n\t\treturn container;\n\t}\n\n\trenderHeader(): ?Element\n\t{\n\t\treturn Tag.render`<div class=\"ui-item-detail-stream-content-header\">\n\t\t\t<div class=\"ui-item-detail-stream-content-title\">\n\t\t\t\t<span class=\"ui-item-detail-stream-content-title-text\">${Text.encode(this.getTitle())}</span>\n\t\t\t\t<span class=\"ui-item-detail-stream-content-title-time\">${this.formatTime(this.getCreatedTime())}</span>\n\t\t\t</div>\n\t\t\t${this.renderHeaderUser(this.getUserId())}\n\t\t</div>`\n\t}\n\n\trenderStageChangeTitle(): Element\n\t{\n\t\treturn Tag.render`<div class=\"ui-item-detail-stream-content-title\">\n\t\t\t<span class=\"ui-item-detail-stream-content-title-text\">${Loc.getMessage('UI_TIMELINE_STAGE_CHANGE_SUBTITLE')}</span>\n\t\t</div>`;\n\t}\n\n\trenderStageChange(): ?Element\n\t{\n\t\tconst stageFrom = this.getStageFrom();\n\t\tconst stageTo = this.getStageTo();\n\n\t\tif(stageFrom && stageTo && stageFrom.id !== stageTo.id)\n\t\t{\n\t\t\treturn Tag.render`<div class=\"ui-item-detail-stream-content-detail-info\">\n\t\t\t\t<span class=\"ui-item-detail-stream-content-detail-info-status\">${Text.encode(stageFrom.name)}</span>\n\t\t\t\t<span class=\"ui-item-detail-stream-content-detail-info-separator\"></span>\n\t\t\t\t<span class=\"ui-item-detail-stream-content-detail-info-status\">${Text.encode(stageTo.name)}</span>\n\t\t\t</div>`;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tgetStageFrom(): ?{id: ?number, name: ?string}\n\t{\n\t\tif(Type.isPlainObject(this.data.stageFrom))\n\t\t{\n\t\t\treturn this.data.stageFrom;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tgetStageTo(): ?{id: ?number, name: ?string}\n\t{\n\t\tif(Type.isPlainObject(this.data.stageTo))\n\t\t{\n\t\t\treturn this.data.stageTo;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tgetFields(): ?Array\n\t{\n\t\tif(Type.isArray(this.data.fields))\n\t\t{\n\t\t\treturn this.data.fields;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\trenderFieldsChange(): ?Element\n\t{\n\t\tconst fields = this.getFields();\n\t\tif(fields)\n\t\t{\n\t\t\tconst list = [];\n\t\t\tfields.forEach((field) =>\n\t\t\t{\n\t\t\t\tlist.push(Tag.render`<div class=\"ui-item-detail-stream-content-detail-field\">${Text.encode(field.title)}</div>`);\n\t\t\t});\n\n\t\t\treturn Tag.render`<div class=\"ui-item-detail-stream-content-detail-info ui-item-detail-stream-content-detail-info-break\">\n\t\t\t\t${list}\n\t\t\t</div>`;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\trenderFieldsChangeTitle(): Element\n\t{\n\t\treturn Tag.render`<div class=\"ui-item-detail-stream-content-title\">\n\t\t\t<span class=\"ui-item-detail-stream-content-title-text\">${Loc.getMessage('UI_TIMELINE_FIELDS_CHANGE_SUBTITLE')}</span>\n\t\t</div>`;\n\t}\n}","import {Tag} from 'main.core';\nimport {History} from './history';\n\nexport class StageChange extends History\n{\n\trenderMain(): Element\n\t{\n\t\tlet stageChange = this.renderStageChange();\n\t\tif(!stageChange)\n\t\t{\n\t\t\tstageChange = '';\n\t\t}\n\n\t\tlet fieldsChange = this.renderFieldsChange();\n\t\tif(!fieldsChange)\n\t\t{\n\t\t\tfieldsChange = '';\n\t\t}\n\n\t\treturn Tag.render`<div class=\"ui-item-detail-stream-content-detail\">\n\t\t\t${stageChange}\n\t\t\t${fieldsChange}\n\t\t</div>`;\n\t}\n}","import {Tag} from 'main.core';\nimport {History} from './history';\n\nexport class FieldsChange extends History\n{\n\trenderMain(): Element\n\t{\n\t\tlet fieldsChange = this.renderFieldsChange();\n\t\tif(!fieldsChange)\n\t\t{\n\t\t\tfieldsChange = '';\n\t\t}\n\t\treturn Tag.render`<div class=\"ui-item-detail-stream-content-detail\">\n\t\t\t${fieldsChange}\n\t\t</div>`;\n\t}\n}","import {Dom, Text, Type} from 'main.core';\nimport {Loader} from 'main.loader';\nimport {EventEmitter} from 'main.core.events';\n\n/**\n * @abstract\n * @mixes EventEmitter\n * @memberOf BX.UI.Timeline\n */\nexport class Editor\n{\n\tid: string;\n\tisProgress = false;\n\tloader;\n\n\tconstructor(params: {\n\t\tid: string,\n\t})\n\t{\n\t\tif(Type.isString(params.id) && params.id.length > 0)\n\t\t{\n\t\t\tthis.id = params.id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.id = Text.getRandom();\n\t\t}\n\t\tthis.layout = {};\n\n\t\tEventEmitter.makeObservable(this, 'BX.UI.Timeline.Editor');\n\t}\n\n\tgetId(): string\n\t{\n\t\treturn this.id;\n\t}\n\n\tgetTitle(): string\n\t{\n\t}\n\n\tgetContainer(): ?Element\n\t{\n\t\treturn this.layout.container;\n\t}\n\n\trender(): Element\n\t{\n\t\tthrow new Error('This method should be overridden');\n\t}\n\n\tclearLayout(isSkipContainer: boolean = false): Editor\n\t{\n\t\tconst container = this.getContainer();\n\t\tObject.keys(this.layout).forEach((name: string) =>\n\t\t{\n\t\t\tconst node = this.layout[name];\n\t\t\tif(!isSkipContainer || container !== node)\n\t\t\t{\n\t\t\t\tDom.clean(node);\n\t\t\t\tdelete this.layout[name];\n\t\t\t}\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tstartProgress()\n\t{\n\t\tthis.isProgress = true;\n\t\tthis.getLoader().show();\n\t}\n\n\tstopProgress()\n\t{\n\t\tthis.isProgress = false;\n\t\tif(this.getLoader().isShown())\n\t\t{\n\t\t\tthis.getLoader().hide();\n\t\t}\n\t}\n\n\tgetLoader(): Loader\n\t{\n\t\tif(!this.loader)\n\t\t{\n\t\t\tthis.loader = new Loader({\n\t\t\t\ttarget: this.getContainer(),\n\t\t\t});\n\t\t}\n\n\t\treturn this.loader;\n\t}\n\n\tisRendered(): boolean\n\t{\n\t\treturn Type.isDomNode(this.getContainer());\n\t}\n}","import {Type, Tag, Loc, Runtime, Dom} from 'main.core';\nimport {EventEmitter, BaseEvent} from 'main.core.events';\nimport {Popup} from 'main.popup';\n\nimport {Editor} from \"./editor\";\n\n/**\n * @memberOf BX.UI.Timeline\n * @mixes EventEmitter\n */\nexport class CommentEditor extends Editor\n{\n\tpostForm: ?LHEPostForm;\n\tvisualEditor: ?BXHtmlEditor;\n\tcommentId = 0;\n\teditorContent = null;\n\n\tconstructor(params: {\n\t\tid: string,\n\t\tcommentId: ?number,\n\t})\n\t{\n\t\tsuper(params);\n\t\tif(Type.isNumber(params.commentId))\n\t\t{\n\t\t\tthis.commentId = params.commentId;\n\t\t}\n\t\tthis.setEventNamespace('BX.UI.Timeline.CommentEditor');\n\t}\n\n\tgetTitle(): string\n\t{\n\t\treturn Loc.getMessage('UI_TIMELINE_EDITOR_COMMENT');\n\t}\n\n\tgetVisualEditorName(): string\n\t{\n\t\treturn 'UiTimelineCommentVisualEditor' + this.getId().replace('- ', '');\n\t}\n\n\tgetTextarea(): ?HTMLTextAreaElement\n\t{\n\t\treturn this.layout.textarea;\n\t}\n\n\trenderTextarea(): HTMLTextAreaElement\n\t{\n\t\tthis.layout.textarea = Tag.render`<textarea onfocus=\"${this.onFocus.bind(this)}\" rows=\"1\" class=\"ui-item-detail-stream-section-new-comment-textarea\" placeholder=\"${Loc.getMessage('UI_TIMELINE_EDITOR_COMMENT_TEXTAREA')}\"></textarea>`;\n\n\t\treturn this.getTextarea();\n\t}\n\n\tgetVisualEditorContainer(): ?Element\n\t{\n\t\treturn this.layout.visualEditorContainer;\n\t}\n\n\trenderVisualEditorContainer(): Element\n\t{\n\t\tthis.layout.visualEditorContainer = Tag.render`<div class=\"ui-timeline-comment-visual-editor\"></div>`;\n\n\t\treturn this.getVisualEditorContainer();\n\t}\n\n\tgetButtonsContainer(): ?Element\n\t{\n\t\treturn this.layout.buttonsContainer;\n\t}\n\n\trenderButtons(): Element\n\t{\n\t\tthis.layout.buttonsContainer = Tag.render`<div class=\"ui-item-detail-stream-section-new-comment-btn-container\">\n\t\t\t${this.renderSaveButton()}\n\t\t\t${this.renderCancelButton()}\n\t\t</div>`;\n\n\t\treturn this.getButtonsContainer();\n\t}\n\n\tgetSaveButton(): ?Element\n\t{\n\t\treturn this.layout.saveButton;\n\t}\n\n\trenderSaveButton(): Element\n\t{\n\t\tthis.layout.saveButton = Tag.render`<button onclick=\"${this.save.bind(this)}\" class=\"ui-btn ui-btn-xs ui-btn-primary\">${Loc.getMessage('UI_TIMELINE_EDITOR_COMMENT_SEND')}</button>`;\n\n\t\treturn this.getSaveButton();\n\t}\n\n\tgetCancelButton(): ?Element\n\t{\n\t\treturn this.layout.cancelButton;\n\t}\n\n\trenderCancelButton(): Element\n\t{\n\t\tthis.layout.cancelButton = Tag.render`<span onclick=\"${this.cancel.bind(this)}\" class=\"ui-btn ui-btn-xs ui-btn-link\">${Loc.getMessage('UI_TIMELINE_EDITOR_COMMENT_CANCEL')}</span>`;\n\n\t\treturn this.getCancelButton();\n\t}\n\n\trender(): Element\n\t{\n\t\tthis.layout.container = Tag.render`<div class=\"ui-timeline-comment-editor\">\n\t\t\t\t${this.renderTextarea()}\n\t\t\t\t${this.renderButtons()}\n\t\t\t\t${this.renderVisualEditorContainer()}\n\t\t\t</div>`;\n\n\t\treturn this.getContainer();\n\t}\n\n\tonFocus()\n\t{\n\t\tconst container = this.getContainer();\n\t\tif(container)\n\t\t{\n\t\t\tcontainer.classList.add('focus');\n\t\t}\n\n\t\tthis.showVisualEditor();\n\t}\n\n\tshowVisualEditor()\n\t{\n\t\tif(!this.getVisualEditorContainer())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif(this.postForm && this.visualEditor)\n\t\t{\n\t\t\tthis.postForm.eventNode.style.display = 'block';\n\t\t\tthis.visualEditor.Focus();\n\t\t}\n\t\telse if(!this.isProgress)\n\t\t{\n\t\t\tthis.loadVisualEditor().then(() =>\n\t\t\t{\n\t\t\t\tEventEmitter.emit(this.postForm.eventNode, 'OnShowLHE', [true]);\n\t\t\t\t//todo there should be some other way\n\t\t\t\tsetTimeout(() =>\n\t\t\t\t{\n\t\t\t\t\tthis.editorContent = this.postForm.oEditor.GetContent();\n\t\t\t\t}, 300);\n\t\t\t}).catch(() =>\n\t\t\t{\n\t\t\t\tthis.cancel();\n\t\t\t\tthis.emit('error', {message: 'Could not load visual editor. Please try again later'});\n\t\t\t});\n\t\t}\n\t}\n\n\tloadVisualEditor(): Promise\n\t{\n\t\treturn new Promise((resolve, reject) =>\n\t\t{\n\t\t\tif(this.isProgress)\n\t\t\t{\n\t\t\t\treject();\n\t\t\t}\n\t\t\tthis.showEditorLoader();\n\n\t\t\tconst event = new BaseEvent({\n\t\t\t\tdata: {\n\t\t\t\t\tname: this.getVisualEditorName(),\n\t\t\t\t\tcommentId: this.commentId,\n\t\t\t\t},\n\t\t\t});\n\t\t\tthis.emitAsync('onLoadVisualEditor', event).then(() => {\n\t\t\t\tconst html = event.getData().html;\n\t\t\t\tif(Type.isString(html))\n\t\t\t\t{\n\t\t\t\t\tRuntime.html(this.getVisualEditorContainer(), html).then(() => {\n\t\t\t\t\t\tthis.hideEditorLoader();\n\t\t\t\t\t\tif(LHEPostForm && BXHtmlEditor)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.postForm = LHEPostForm.getHandler(this.getVisualEditorName());\n\t\t\t\t\t\t\tthis.visualEditor = BXHtmlEditor.Get(this.getVisualEditorName());\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treject();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treject();\n\t\t\t\t}\n\t\t\t}).catch(() =>\n\t\t\t{\n\t\t\t\treject();\n\t\t\t});\n\t\t});\n\t}\n\n\tshowEditorLoader()\n\t{\n\t\tthis.editorLoader = Tag.render`<div class=\"ui-timeline-wait\"></div>`;\n\t\tDom.append(this.editorLoader, this.getContainer());\n\t}\n\n\thideEditorLoader()\n\t{\n\t\tDom.remove(this.editorLoader);\n\t}\n\n\thideVisualEditor()\n\t{\n\t\tif(this.postForm)\n\t\t{\n\t\t\tthis.postForm.eventNode.style.display = 'none';\n\t\t}\n\t}\n\n\tsave()\n\t{\n\t\tif(this.isProgress || !this.postForm)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tlet isCancel = false;\n\t\tconst description = this.postForm.oEditor.GetContent();\n\t\tthis.editorContent = description;\n\t\tconst files = this.getAttachments();\n\t\tthis.emit('beforeSave', {description, isCancel, files});\n\t\tif(description === '')\n\t\t{\n\t\t\tthis.getEmptyMessageNotification().show();\n\t\t\treturn;\n\t\t}\n\t\tif(isCancel === true)\n\t\t{\n\t\t\tthis.cancel();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.startProgress();\n\t\tconst event = new BaseEvent({\n\t\t\tdata: {\n\t\t\t\tdescription,\n\t\t\t\tfiles,\n\t\t\t\tcommentId: this.commentId,\n\t\t\t},\n\t\t});\n\t\tthis.emitAsync('onSave', event).then(() => {\n\t\t\tthis.postForm.reinit();\n\t\t\tthis.stopProgress();\n\t\t\tthis.emit('afterSave', {\n\t\t\t\tdata: event.getData(),\n\t\t\t});\n\t\t\tthis.cancel();\n\t\t}).catch(() =>\n\t\t{\n\t\t\t//todo why are we here?\n\t\t\tthis.stopProgress();\n\t\t\tthis.cancel();\n\t\t\tconst message = event.getData().message;\n\t\t\tif(message)\n\t\t\t{\n\t\t\t\tthis.emit('error', {\n\t\t\t\t\tmessage\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tcancel()\n\t{\n\t\tthis.hideVisualEditor();\n\t\tconst container = this.getContainer();\n\t\tif(container)\n\t\t{\n\t\t\tcontainer.classList.remove('focus');\n\t\t}\n\t\tthis.stopProgress();\n\t\tthis.emit('cancel');\n\t}\n\n\tgetEmptyMessageNotification(): Popup\n\t{\n\t\tif(!this.emptyMessagePopup)\n\t\t{\n\t\t\tthis.emptyMessagePopup = new Popup({\n\t\t\t\tid: this.getId() + '-empty-message-popup',\n\t\t\t\tbindElement: this.getSaveButton(),\n\t\t\t\tcontent: BX.message('UI_TIMELINE_EMPTY_COMMENT_NOTIFICATION'),\n\t\t\t\tdarkMode: true,\n\t\t\t\tautoHide: true,\n\t\t\t\tzIndex: 990,\n\t\t\t\tangle: {position: 'top', offset: 77},\n\t\t\t\tcloseByEsc: true,\n\t\t\t\tbindOptions: { forceBindPosition: true}\n\t\t\t});\n\t\t}\n\n\t\treturn this.emptyMessagePopup;\n\t}\n\n\trefresh()\n\t{\n\t\tif(this.postForm && this.postForm.oEditor)\n\t\t{\n\t\t\tif(this.editorContent)\n\t\t\t{\n\t\t\t\tthis.postForm.oEditor.SetContent(this.editorContent);\n\t\t\t}\n\t\t}\n\t\tif(this.visualEditor)\n\t\t{\n\t\t\tthis.visualEditor.ReInitIframe();\n\t\t}\n\t}\n\n\tgetAttachments(): Array\n\t{\n\t\tconst attachments = [];\n\t\tif(!this.postForm || !Type.isPlainObject(this.postForm.arFiles) || !Type.isPlainObject(this.postForm.controllers))\n\t\t{\n\t\t\treturn attachments;\n\t\t}\n\n\t\tconst fileControllers = [];\n\t\tObject.values(this.postForm.arFiles).forEach((controller) =>\n\t\t{\n\t\t\tif(!fileControllers.includes(controller))\n\t\t\t{\n\t\t\t\tfileControllers.push(controller);\n\t\t\t}\n\t\t});\n\t\tfileControllers.forEach((fileController) =>\n\t\t{\n\t\t\tif(this.postForm.controllers[fileController] && Type.isPlainObject(this.postForm.controllers[fileController].values))\n\t\t\t{\n\t\t\t\tObject.keys(this.postForm.controllers[fileController].values).forEach((fileId) =>\n\t\t\t\t{\n\t\t\t\t\tif(!attachments.includes(fileId))\n\t\t\t\t\t{\n\t\t\t\t\t\tattachments.push(fileId);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t});\n\n\t\treturn attachments;\n\t}\n}","import {Loc, Text, Tag, Type, Runtime, Event, Dom} from 'main.core';\nimport {History} from './history';\nimport {MessageBox} from 'ui.dialogs.messagebox';\nimport {CommentEditor} from \"./commenteditor\";\nimport {BaseEvent} from \"main.core.events\";\n\nconst COLLAPSE_TEXT_MAX_LENGTH = 128;\n\n/**\n * @memberOf BX.UI.Timeline\n * @mixes EventEmitter\n */\nexport class Comment extends History\n{\n\tcommentEditor: ?CommentEditor;\n\tisCollapsed = null;\n\tisContentLoaded = null;\n\n\tconstructor(props)\n\t{\n\t\tsuper(props);\n\t\tthis.setEventNamespace('BX.UI.Timeline.Comment');\n\t}\n\n\n\tafterRender()\n\t{\n\t\tsuper.afterRender();\n\n\t\tif(this.isCollapsed === null)\n\t\t{\n\t\t\tthis.isCollapsed = this.isAddExpandBlock();\n\t\t}\n\t\tif(this.isContentLoaded === null)\n\t\t{\n\t\t\tthis.isContentLoaded = !this.hasFiles();\n\t\t}\n\t\tif(this.isCollapsed)\n\t\t{\n\t\t\tthis.getMain().classList.add('ui-timeline-content-description-collapsed');\n\t\t\tthis.getMain().classList.remove('ui-timeline-content-description-expand');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.getMain().classList.remove('ui-timeline-content-description-collapsed');\n\t\t\tthis.getMain().classList.add('ui-timeline-content-description-expand');\n\t\t}\n\t\tif(this.isAddExpandBlock())\n\t\t{\n\t\t\tthis.getMainDescription().appendChild(this.renderExpandBlock());\n\t\t}\n\t\tif(this.hasFiles())\n\t\t{\n\t\t\tthis.getContent().appendChild(Tag.render`<div class=\"ui-timeline-section-files\">${this.renderFilesContainer()}</div>`);\n\t\t\tEvent.ready(() => {\n\t\t\t\tsetTimeout(() =>\n\t\t\t\t{\n\t\t\t\t\tthis.loadFilesContent();\n\t\t\t\t}, 100);\n\t\t\t});\n\t\t}\n\t}\n\n\tgetFiles(): Array\n\t{\n\t\tif(Type.isArray(this.data.files))\n\t\t{\n\t\t\treturn this.data.files;\n\t\t}\n\n\t\treturn [];\n\t}\n\n\thasFiles(): boolean\n\t{\n\t\treturn (this.getFiles().length > 0);\n\t}\n\n\tisAddExpandBlock(): boolean\n\t{\n\t\treturn ((this.textDescription.length > COLLAPSE_TEXT_MAX_LENGTH) || this.hasFiles());\n\t}\n\n\trenderContainer(): Element\n\t{\n\t\tconst container = super.renderContainer();\n\t\tcontainer.classList.add('ui-item-detail-stream-section-comment');\n\t\tcontainer.classList.remove('ui-item-detail-stream-section-info');\n\n\t\treturn container;\n\t}\n\n\trenderMain(): Element\n\t{\n\t\tthis.layout.main = Tag.render`<div class=\"ui-item-detail-stream-content-detail\">\n\t\t\t${this.renderMainDescription()}\n\t\t</div>`;\n\n\t\treturn this.getMain();\n\t}\n\n\tgetMain(): ?Element\n\t{\n\t\treturn this.layout.main;\n\t}\n\n\trenderMainDescription(): Element\n\t{\n\t\tthis.layout.mainDescription = Tag.render`<div class=\"ui-item-detail-stream-content-description\" onclick=\"${this.onMainClick.bind(this)}\">${this.htmlDescription}</div>`;\n\n\t\treturn this.getMainDescription();\n\t}\n\n\tgetMainDescription(): ?Element\n\t{\n\t\treturn this.layout.mainDescription;\n\t}\n\n\trenderExpandBlock(): Element\n\t{\n\t\tthis.layout.expandBlock = Tag.render`<div class=\"ui-timeline-content-description-expand-container\">${this.renderExpandButton()}</div>`;\n\n\t\treturn this.getExpandBlock();\n\t}\n\n\tgetExpandBlock(): ?Element\n\t{\n\t\treturn this.layout.expandBlock;\n\t}\n\n\trenderExpandButton(): Element\n\t{\n\t\tthis.layout.expandButton = Tag.render`<a class=\"ui-timeline-content-description-expand-btn\" onclick=\"${this.onExpandButtonClick.bind(this)}\">\n\t\t\t${Loc.getMessage((this.isCollapsed ? 'UI_TIMELINE_EXPAND_SM' : 'UI_TIMELINE_COLLAPSE_SM'))}\n\t\t</a>`;\n\n\t\treturn this.getExpandButton();\n\t}\n\n\tgetExpandButton(): ?Element\n\t{\n\t\treturn this.layout.expandButton;\n\t}\n\n\tgetCommendEditor(): CommentEditor\n\t{\n\t\tif(!this.commentEditor)\n\t\t{\n\t\t\tthis.commentEditor = new CommentEditor({\n\t\t\t\tcommentId: this.getId(),\n\t\t\t\tid: 'UICommentEditor' + this.getId() + (this.isPinned ? 'pinned' : '') + Text.getRandom(),\n\t\t\t});\n\t\t\tthis.commentEditor.layout.container = this.getContainer();\n\t\t\tthis.commentEditor.subscribe('cancel', this.switchToViewMode.bind(this));\n\t\t\tthis.commentEditor.subscribe('afterSave', this.onSaveComment.bind(this));\n\t\t}\n\n\t\treturn this.commentEditor;\n\t}\n\n\tgetEditorContainer(): ?Element\n\t{\n\t\treturn this.layout.editorContainer;\n\t}\n\n\trenderEditorContainer(): Element\n\t{\n\t\tconst editorContainer = this.getCommendEditor().getVisualEditorContainer();\n\t\tif(editorContainer)\n\t\t{\n\t\t\tthis.layout.editorContainer = editorContainer;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.layout.editorContainer = this.getCommendEditor().renderVisualEditorContainer();\n\t\t}\n\n\t\treturn this.getEditorContainer();\n\t}\n\n\tgetEditorButtons(): ?Element\n\t{\n\t\treturn this.layout.editorButtons;\n\t}\n\n\trenderEditorButtons(): Element\n\t{\n\t\tthis.layout.editorButtons = this.getCommendEditor().renderButtons();\n\n\t\treturn this.getEditorButtons();\n\t}\n\n\trenderFilesContainer(): Element\n\t{\n\t\tthis.layout.filesContainer = Tag.render`<div class=\"ui-timeline-section-files-inner\"></div>`;\n\n\t\treturn this.getFilesContainer();\n\t}\n\n\tgetFilesContainer(): ?Element\n\t{\n\t\treturn this.layout.filesContainer;\n\t}\n\n\tswitchToEditMode()\n\t{\n\t\tif(!this.isRendered())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif(!this.getEditorContainer())\n\t\t{\n\t\t\tthis.getMain().appendChild(this.renderEditorContainer());\n\t\t\tthis.getMain().appendChild(this.renderEditorButtons());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.getCommendEditor().refresh();\n\t\t}\n\n\t\tthis.getContent().classList.add('ui-item-detail-comment-edit');\n\t\tthis.getCommendEditor().showVisualEditor();\n\t}\n\n\tswitchToViewMode()\n\t{\n\t\tthis.getContent().classList.remove('ui-item-detail-comment-edit');\n\t\tthis.getCommendEditor().hideVisualEditor();\n\t}\n\n\tgetActions(): Array\n\t{\n\t\treturn [\n\t\t\t{\n\t\t\t\ttext: Loc.getMessage('UI_TIMELINE_ACTION_MODIFY'),\n\t\t\t\tonclick: this.actionEdit.bind(this),\n\t\t\t},\n\t\t\t{\n\t\t\t\ttext: Loc.getMessage('UI_TIMELINE_ACTION_DELETE'),\n\t\t\t\tonclick: this.actionDelete.bind(this),\n\t\t\t}\n\t\t];\n\t}\n\n\tactionEdit()\n\t{\n\t\tthis.getActionsMenu().close();\n\t\tthis.switchToEditMode();\n\t}\n\n\tactionDelete()\n\t{\n\t\tthis.getActionsMenu().close();\n\t\tMessageBox.confirm(Loc.getMessage('UI_TIMELINE_COMMENT_DELETE_CONFIRM'), () => {\n\t\t\treturn new Promise((resolve) => {\n\t\t\t\tif(this.isProgress)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.startProgress();\n\t\t\t\tconst event = new BaseEvent({\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tcommentId: this.getId(),\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tthis.emitAsync('onDelete', event).then(() => {\n\t\t\t\t\tthis.stopProgress();\n\t\t\t\t\tthis.onDelete();\n\t\t\t\t\tresolve();\n\t\t\t\t}).catch(() => {\n\t\t\t\t\tthis.stopProgress();\n\t\t\t\t\tconst message = event.getData().message;\n\t\t\t\t\tif(message)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.emit('error', {\n\t\t\t\t\t\t\tmessage\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tresolve();\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tclearLayout(isSkipContainer = false): Item\n\t{\n\t\tthis.commentEditor = null;\n\n\t\treturn super.clearLayout(isSkipContainer);\n\t}\n\n\tonSaveComment(event: BaseEvent)\n\t{\n\t\tconst data = event.getData();\n\t\tif(data.data && data.data.comment)\n\t\t{\n\t\t\tthis.update(data.data.comment);\n\t\t}\n\t}\n\n\tonMainClick({target})\n\t{\n\t\tif(Type.isDomNode(target))\n\t\t{\n\t\t\tconst tagName = target.tagName.toLowerCase();\n\t\t\tif(\n\t\t\t\ttagName === 'a'\n\t\t\t\t|| tagName === 'img'\n\t\t\t\t|| Dom.hasClass(target, 'feed-con-file-changes-link-more')\n\t\t\t\t|| Dom.hasClass(target, 'feed-com-file-inline')\n\t\t\t\t|| (document.getSelection().toString().length > 0)\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.switchToEditMode();\n\t}\n\n\tonExpandButtonClick(event)\n\t{\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tif(!this.isRendered())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif(this.isCollapsed === true)\n\t\t{\n\t\t\tthis.getExpandBlock().style.maxHeight = this.getExpandBlock().scrollHeight + 130 + \"px\";\n\t\t\tthis.getMain().classList.remove('ui-timeline-content-description-collapsed');\n\t\t\tthis.getMain().classList.add('ui-timeline-content-description-expand');\n\t\t\tsetTimeout(() =>\n\t\t\t{\n\t\t\t\tthis.getExpandBlock().style.maxHeight = \"\";\n\t\t\t}, 300);\n\t\t\tthis.getExpandButton().innerText = Loc.getMessage('UI_TIMELINE_COLLAPSE_SM');\n\t\t\tif(!this.isContentLoaded)\n\t\t\t{\n\t\t\t\tthis.isContentLoaded = true;\n\t\t\t\tthis.loadContent();\n\t\t\t}\n\t\t\tthis.isCollapsed = false;\n\t\t}\n\t\telse if(this.isCollapsed === false)\n\t\t{\n\t\t\tthis.getExpandBlock().style.maxHeight = this.getExpandBlock().scrollHeight + \"px\";\n\t\t\tthis.getMain().classList.add('ui-timeline-content-description-collapsed');\n\t\t\tthis.getMain().classList.remove('ui-timeline-content-description-expand');\n\t\t\tsetTimeout(() =>\n\t\t\t{\n\t\t\t\tthis.getExpandBlock().style.maxHeight = \"\";\n\t\t\t}, 0);\n\t\t\tthis.getExpandButton().innerText = Loc.getMessage('UI_TIMELINE_EXPAND_SM');\n\t\t\tthis.isCollapsed = true;\n\t\t}\n\t}\n\n\tloadFilesContent()\n\t{\n\t\tif(this.isProgress)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.startProgress();\n\t\tconst event = new BaseEvent({\n\t\t\tdata: {\n\t\t\t\tcommentId: this.getId(),\n\t\t\t},\n\t\t});\n\t\tthis.emitAsync('onLoadFilesContent', event).then(() => {\n\t\t\tthis.stopProgress();\n\t\t\tconst html = event.getData().html;\n\t\t\tif(Type.isString(html))\n\t\t\t{\n\t\t\t\tRuntime.html(this.getFilesContainer(), html);\n\t\t\t}\n\t\t}).catch(() => {\n\t\t\tthis.stopProgress();\n\t\t\tconst message = event.getData().message;\n\t\t\tif(message)\n\t\t\t{\n\t\t\t\tthis.emit('error', {\n\t\t\t\t\tmessage\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tloadContent()\n\t{\n\t\tif(this.isProgress)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.startProgress();\n\t\tconst event = new BaseEvent({\n\t\t\tdata: {\n\t\t\t\tcommentId: this.getId(),\n\t\t\t},\n\t\t});\n\t\tthis.emitAsync('onLoadContent', event).then(() => {\n\t\t\tthis.stopProgress();\n\t\t\tconst comment = event.getData().comment;\n\t\t\tif(comment && Type.isString(comment.htmlDescription))\n\t\t\t{\n\t\t\t\tRuntime.html(this.getMainDescription(), comment.htmlDescription);\n\t\t\t\tif(this.isAddExpandBlock())\n\t\t\t\t{\n\t\t\t\t\tthis.getMainDescription().appendChild(this.getExpandBlock());\n\t\t\t\t}\n\t\t\t\tthis.updateData(comment);\n\t\t\t}\n\t\t}).catch(() => {\n\t\t\tthis.stopProgress();\n\t\t\tconst message = event.getData().message;\n\t\t\tif(message)\n\t\t\t{\n\t\t\t\tthis.emit('error', {\n\t\t\t\t\tmessage\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n}","/**\n * @abstract\n */\nexport class Animation\n{\n\tstart(): Promise\n\t{\n\n\t}\n\n\tfinish(node: Element, onFinish: ?Function)\n\t{\n\n\t}\n}","import {Dom, Tag, Type} from 'main.core';\nimport {Item} from '../item';\nimport {Animation} from './animation';\n\nexport class Drop extends Animation\n{\n\tstatic DEFAULT_TIMEOUT = 150;\n\tstatic DURATION = 1200;\n\n\titem: Item;\n\tcontainer: Element;\n\tinsertAfter: Element;\n\n\tconstructor(params: {\n\t\titem: Item,\n\t\tcontainer: Element,\n\t\tinsertAfter: Element,\n\t})\n\t{\n\t\tsuper(params);\n\t\tif(Type.isPlainObject(params))\n\t\t{\n\t\t\tif(params.item instanceof Item && Type.isDomNode(params.container))\n\t\t\t{\n\t\t\t\tthis.item = params.item;\n\t\t\t\tthis.container = params.container;\n\t\t\t\tthis.insertAfter = params.insertAfter;\n\t\t\t}\n\t\t}\n\t}\n\n\tstart(): Promise\n\t{\n\t\tconst timeout = Drop.DEFAULT_TIMEOUT;\n\n\t\treturn new Promise((resolve) => {\n\t\t\tif(!this.item || !this.container)\n\t\t\t{\n\t\t\t\tresolve();\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.createGhost(this.item.render(), resolve);\n\t\t\t}, timeout);\n\t\t});\n\t}\n\n\tcreateGhost(node: Element, onFinish: Function)\n\t{\n\t\tnode.style.position = \"absolute\";\n\t\tnode.style.width = this.container.offsetWidth + \"px\";\n\t\tnode.style.top = Dom.getPosition(this.container).top + \"px\";\n\t\tnode.style.left = Dom.getPosition(this.container).left + \"px\";\n\t\tdocument.body.appendChild(node);\n\n\t\tthis.anchor = Tag.render`<div class=\"ui-item-detail-stream-section ui-item-detail-stream-section-shadow\"></div>`;\n\t\tDom.prepend(this.anchor, this.container);\n\t\tif(Type.isDomNode(this.insertAfter))\n\t\t{\n\t\t\tDom.insertAfter(this.anchor, this.insertAfter);\n\t\t}\n\n\t\tthis.moveGhost(node, onFinish);\n\t}\n\n\tmoveGhost(node: Element, onFinish: ?Function)\n\t{\n\t\tconst anchorPosition = Dom.getPosition(this.anchor);\n\t\tconst startPosition = Dom.getPosition(this.container);\n\n\t\tconst movingEvent = new BX.easing({\n\t\t\tduration : Drop.DURATION,\n\t\t\tstart : { top: startPosition.top, height: 0},\n\t\t\tfinish: { top: anchorPosition.top - 5, height: Dom.getPosition(node).height},\n\t\t\ttransition : BX.easing.makeEaseOut(BX.easing.transitions.quart),\n\t\t\tstep: ((state) => {\n\t\t\t\tnode.style.top = state.top + \"px\";\n\t\t\t\tthis.anchor.style.height = state.height + \"px\";\n\t\t\t}),\n\t\t\tcomplete: (() => {\n\t\t\t\tthis.finish(node, onFinish);\n\t\t\t})\n\t\t});\n\n\t\tmovingEvent.animate();\n\t}\n\n\tfinish(node: Element, onFinish: ?Function)\n\t{\n\t\tnode.style.position = \"\";\n\t\tnode.style.width = \"\";\n\t\tnode.style.height = \"\";\n\t\tnode.style.top = \"\";\n\t\tnode.style.left = \"\";\n\t\tnode.style.opacity = \"\";\n\n\t\tDom.insertAfter(node, this.anchor);\n\t\tDom.remove(this.anchor);\n\t\tthis.anchor = null;\n\n\t\tif(Type.isFunction(onFinish))\n\t\t{\n\t\t\tonFinish();\n\t\t}\n\t}\n}\n","import {Dom, Type} from 'main.core';\nimport {Item} from '../item';\nimport {Animation} from './animation';\n\nexport class Pin extends Animation\n{\n\tstatic DURATION = 1500;\n\n\titem: Item;\n\tanchor: Element;\n\tnode: Element;\n\tstartPosition: {};\n\n\tconstructor(params: {\n\t\titem: Item,\n\t\tanchor: Element,\n\t\tstartPosition: {},\n\t})\n\t{\n\t\tsuper(params);\n\t\tif(Type.isPlainObject(params))\n\t\t{\n\t\t\tif(params.item instanceof Item && Type.isDomNode(params.anchor))\n\t\t\t{\n\t\t\t\tthis.item = params.item;\n\t\t\t\tthis.anchor = params.anchor;\n\t\t\t\tthis.startPosition = params.startPosition;\n\t\t\t}\n\t\t}\n\t}\n\n\tstart(): Promise\n\t{\n\t\treturn new Promise((resolve) => {\n\t\t\tif(!this.item || !this.anchor)\n\t\t\t{\n\t\t\t\tresolve();\n\t\t\t}\n\n\t\t\tthis.node = this.item.render();\n\t\t\tDom.addClass(this.node, 'ui-item-detail-stream-section-top-fixed');\n\n\t\t\tthis.node.style.position = \"absolute\";\n\t\t\tthis.node.style.width = this.startPosition.width + \"px\";\n\n\t\t\tlet _cloneHeight = this.startPosition.height;\n\t\t\tconst _minHeight = 65;\n\t\t\tconst _sumPaddingContent = 18;\n\t\t\tif (_cloneHeight < _sumPaddingContent + _minHeight)\n\t\t\t\t_cloneHeight = _sumPaddingContent + _minHeight;\n\n\t\t\tthis.node.style.height = _cloneHeight + \"px\";\n\t\t\tthis.node.style.top = this.startPosition.top + \"px\";\n\t\t\tthis.node.style.left = this.startPosition.left + \"px\";\n\t\t\tthis.node.style.zIndex = 960;\n\n\t\t\tdocument.body.appendChild(this.node);\n\n\t\t\tthis._anchorPosition = Dom.getPosition(this.anchor);\n\t\t\tconst finish = {\n\t\t\t\ttop: this._anchorPosition.top,\n\t\t\t\theight: _cloneHeight + 15,\n\t\t\t\topacity: 1\n\t\t\t};\n\n\t\t\tconst _difference = this.startPosition.top - this._anchorPosition.bottom;\n\t\t\tconst _deepHistoryLimit = 2 * (document.body.clientHeight + this.startPosition.height);\n\n\t\t\tif (_difference > _deepHistoryLimit)\n\t\t\t{\n\t\t\t\tfinish.top = this.startPosition.top - _deepHistoryLimit;\n\t\t\t\tfinish.opacity = 0;\n\t\t\t}\n\n\t\t\tlet _duration = Math.abs(finish.top - this.startPosition.top) * 2;\n\t\t\t_duration = (_duration < Pin.DURATION) ? Pin.DURATION : _duration;\n\n\t\t\tconst movingEvent = new BX.easing({\n\t\t\t\tduration : _duration,\n\t\t\t\tstart : {\n\t\t\t\t\ttop: this.startPosition.top,\n\t\t\t\t\theight: 0,\n\t\t\t\t\topacity: 1,\n\t\t\t\t},\n\t\t\t\tfinish: finish,\n\t\t\t\ttransition : BX.easing.makeEaseOut(BX.easing.transitions.quart),\n\t\t\t\tstep: (state) => {\n\t\t\t\t\tthis.node.style.top = state.top + \"px\";\n\t\t\t\t\tthis.node.style.opacity = state.opacity;\n\t\t\t\t\tthis.anchor.style.height = state.height + \"px\";\n\t\t\t\t},\n\t\t\t\tcomplete: () => {\n\t\t\t\t\tthis.finish(this.node, resolve);\n\t\t\t\t},\n\t\t\t});\n\t\t\tmovingEvent.animate();\n\t\t});\n\t}\n\n\tfinish(node: Element, onFinish: ?Function)\n\t{\n\t\tnode.style.position = \"\";\n\t\tnode.style.width = \"\";\n\t\tnode.style.height = \"\";\n\t\tnode.style.top = \"\";\n\t\tnode.style.left = \"\";\n\t\tnode.style.zIndex = \"\";\n\t\tthis.anchor.style.height = 0;\n\n\t\tDom.insertAfter(node, this.anchor);\n\n\t\tif(Type.isFunction(onFinish))\n\t\t{\n\t\t\tonFinish();\n\t\t}\n\t}\n}","import {Dom, Type} from 'main.core';\nimport {Item} from '../item';\nimport {Animation} from './animation';\n\nexport class Show extends Animation\n{\n\tstatic EXPAND_DURATION = 150;\n\tstatic FADE_IN_DURATION = 150;\n\n\titem: Item;\n\tcontainer: Element;\n\tinsertAfter: Element;\n\n\tconstructor(params: {\n\t\titem: Item,\n\t\tcontainer: Element,\n\t\tinsertAfter: Element,\n\t})\n\t{\n\t\tsuper(params);\n\t\tif(Type.isPlainObject(params))\n\t\t{\n\t\t\tif(params.item instanceof Item && Type.isDomNode(params.container) && Type.isDomNode(params.insertAfter))\n\t\t\t{\n\t\t\t\tthis.item = params.item;\n\t\t\t\tthis.container = params.container;\n\t\t\t\tthis.insertAfter = params.insertAfter;\n\t\t\t}\n\t\t}\n\t}\n\n\tstart(): Promise\n\t{\n\t\treturn new Promise((resolve) => {\n\t\t\tif(!this.item || !this.container || !this.insertAfter)\n\t\t\t{\n\t\t\t\tresolve();\n\t\t\t}\n\n\t\t\tDom.insertAfter(this.item.render(), this.insertAfter);\n\n\t\t\tthis.expand().then(() => {\n\t\t\t\tthis.fadeIn().then(() => {\n\t\t\t\t\tthis.finish(this.item.getContainer(), resolve);\n\t\t\t\t})\n\t\t\t});\n\t\t});\n\t}\n\n\texpand(): Promise\n\t{\n\t\treturn new Promise((resolve) => {\n\t\t\tconst node = this.item.getContainer();\n\n\t\t\tconst position = Dom.getPosition(node);\n\t\t\tnode.style.height = 0;\n\t\t\tnode.style.opacity = 0;\n\t\t\tnode.style.overflow = 'hidden';\n\n\t\t\tconst show = new BX.easing({\n\t\t\t\tduration: Show.EXPAND_DURATION,\n\t\t\t\tstart: {\n\t\t\t\t\theight: 0,\n\t\t\t\t},\n\t\t\t\tfinish: {\n\t\t\t\t\theight: position.height\n\t\t\t\t},\n\t\t\t\ttransition : BX.easing.makeEaseOut(BX.easing.transitions.quart),\n\t\t\t\tstep: (state) => {\n\t\t\t\t\tnode.style.height = state.height + 'px';\n\t\t\t\t},\n\t\t\t\tcomplete: resolve,\n\t\t\t});\n\n\t\t\tshow.animate();\n\t\t});\n\t}\n\n\tfadeIn(): Promise\n\t{\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.item.getContainer().style.overflow = '';\n\t\t\tconst fadeIn = new BX.easing({\n\t\t\t\tduration: Show.FADE_IN_DURATION,\n\t\t\t\tstart: {\n\t\t\t\t\topacity: 0,\n\t\t\t\t},\n\t\t\t\tfinish: {\n\t\t\t\t\topacity: 100,\n\t\t\t\t},\n\t\t\t\ttransition : BX.easing.makeEaseOut(BX.easing.transitions.quart),\n\t\t\t\tstep: (state) => {\n\t\t\t\t\tthis.item.getContainer().style.opacity = state.opacity / 100;\n\t\t\t\t},\n\t\t\t\tcomplete: resolve,\n\t\t\t});\n\n\t\t\tfadeIn.animate();\n\t\t});\n\t}\n\n\tfinish(node: Element, onFinish: ?Function)\n\t{\n\t\tthis.item.getContainer().style.height = \"\";\n\t\tthis.item.getContainer().style.opacity = \"\";\n\n\t\tif(Type.isFunction(onFinish))\n\t\t{\n\t\t\tonFinish();\n\t\t}\n\t}\n}","import {Dom, Tag, Type} from 'main.core';\nimport {Item} from '../item';\nimport {Animation} from './animation';\n\nexport class TaskComplete extends Animation\n{\n\tstatic DURATION = 1200;\n\n\ttask: Item;\n\titem: Item;\n\tinsertAfter: Element;\n\n\tconstructor(params: {\n\t\titem: Item,\n\t\ttask: Item,\n\t\tinsertAfter: Element,\n\t})\n\t{\n\t\tsuper(params);\n\t\tif(Type.isPlainObject(params))\n\t\t{\n\t\t\tif(\n\t\t\t\tparams.item instanceof Item &&\n\t\t\t\tparams.task instanceof Item &&\n\t\t\t\tType.isDomNode(params.insertAfter)\n\t\t\t)\n\t\t\t{\n\t\t\t\tthis.item = params.item;\n\t\t\t\tthis.task = params.task;\n\t\t\t\tthis.insertAfter = params.insertAfter;\n\t\t\t}\n\t\t}\n\t}\n\n\tstart(): Promise\n\t{\n\t\treturn new Promise((resolve) => {\n\t\t\tif(!this.item || !this.task || !this.container || !this.insertAfter)\n\t\t\t{\n\t\t\t\tresolve();\n\t\t\t}\n\n\t\t\tconst node = this.item.render();\n\t\t\tconst taskNode = this.task.getContainer();\n\t\t\tconst startPosition = Dom.getPosition(taskNode);\n\n\t\t\tnode.style.position = \"absolute\";\n\t\t\tnode.style.width = taskNode.offsetWidth + \"px\";\n\t\t\tnode.style.top = startPosition.top + \"px\";\n\t\t\tnode.style.left = startPosition.left + \"px\";\n\t\t\tnode.style.zIndex = \"999\";\n\t\t\tDom.addClass(node, 'ui-item-detail-stream-section-show');\n\t\t\tdocument.body.appendChild(node);\n\n\t\t\tthis.anchor = Tag.render`<div class=\"ui-item-detail-stream-section ui-item-detail-stream-section-shadow\"></div>`;\n\t\t\tDom.prepend(this.anchor, this.container);\n\t\t\tif(Type.isDomNode(this.insertAfter))\n\t\t\t{\n\t\t\t\tDom.insertAfter(this.anchor, this.insertAfter);\n\t\t\t}\n\n\t\t\ttaskNode.style.height = taskNode.offsetHeight + 'px';\n\t\t\tDom.addClass(taskNode, 'ui-item-detail-stream-section-hide');\n\n\t\t\tsetTimeout(function() {\n\t\t\t\tconst taskHeight = taskNode.offsetHeight;\n\t\t\t\tthis.anchor.style.height = taskHeight + \"px\";\n\t\t\t\tDom.remove(taskNode);\n\n\t\t\t\tDom.removeClass(node, 'ui-item-detail-stream-section-show');\n\n\t\t\t\tconst movingEvent = new BX.easing({\n\t\t\t\t\tduration : 800,\n\t\t\t\t\tstart : { top: Dom.getPosition(node).top, height: taskHeight},\n\t\t\t\t\tfinish: { top: Dom.getPosition(this.anchor).top, height: Dom.getPosition(node).height},\n\t\t\t\t\ttransition : BX.easing.makeEaseOut(BX.easing.transitions.quart),\n\t\t\t\t\tstep: ((state) => {\n\t\t\t\t\t\tnode.style.top = state.top + \"px\";\n\t\t\t\t\t\tthis.anchor.style.height = state.height + \"px\";\n\t\t\t\t\t}),\n\t\t\t\t\tcomplete: (() => {\n\t\t\t\t\t\tthis.finish(node, resolve);\n\t\t\t\t\t})\n\t\t\t\t});\n\t\t\t\tmovingEvent.animate();\n\t\t\t}.bind(this), 200);\n\t\t});\n\t}\n\n\tfinish(node: Element, onFinish: ?Function)\n\t{\n\t\tnode.style.position = \"\";\n\t\tnode.style.width = \"\";\n\t\tnode.style.top = \"\";\n\t\tnode.style.left = \"\";\n\t\tnode.style.zIndex = \"\";\n\n\t\tDom.insertAfter(node, this.anchor);\n\t\tDom.remove(this.anchor);\n\t\tthis.anchor = null;\n\n\t\tif(Type.isFunction(onFinish))\n\t\t{\n\t\t\tonFinish();\n\t\t}\n\t}\n}","import {Dom, Type} from 'main.core';\nimport {Animation} from './animation';\n\nexport class Hide extends Animation\n{\n\tstatic DURATION = 1000;\n\n\tnode: Element;\n\n\tconstructor(params: {\n\t\tnode: Element,\n\t})\n\t{\n\t\tsuper(params);\n\t\tif(Type.isPlainObject(params))\n\t\t{\n\t\t\tif(Type.isDomNode(params.node))\n\t\t\t{\n\t\t\t\tthis.node = params.node;\n\t\t\t}\n\t\t}\n\t}\n\n\tstart(): Promise\n\t{\n\t\treturn new Promise((resolve) => {\n\t\t\tif(!this.node)\n\t\t\t{\n\t\t\t\tresolve();\n\t\t\t}\n\t\t\tconst node = this.node;\n\t\t\tconst wrapperPosition = Dom.getPosition(node);\n\n\t\t\tconst hideEvent = new BX.easing({\n\t\t\t\tduration : Hide.DURATION,\n\t\t\t\tstart : {\n\t\t\t\t\theight: wrapperPosition.height,\n\t\t\t\t\topacity: 1,\n\t\t\t\t\tmarginBottom: 15\n\t\t\t\t},\n\t\t\t\tfinish: {\n\t\t\t\t\theight: 0,\n\t\t\t\t\topacity: 0,\n\t\t\t\t\tmarginBottom: 0\n\t\t\t\t},\n\t\t\t\ttransition : BX.easing.makeEaseOut(BX.easing.transitions.quart),\n\t\t\t\tstep: (state) => {\n\t\t\t\t\tif(node)\n\t\t\t\t\t{\n\t\t\t\t\t\tnode.style.height = state.height + \"px\";\n\t\t\t\t\t\tnode.style.opacity = state.opacity;\n\t\t\t\t\t\tnode.style.marginBottom = state.marginBottom;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tcomplete: () => {\n\t\t\t\t\tthis.finish(node, resolve);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\thideEvent.animate();\n\t\t});\n\t}\n\n\tfinish(node: Element, onFinish: ?Function)\n\t{\n\t\tDom.remove(node);\n\n\t\tif(Type.isFunction(onFinish))\n\t\t{\n\t\t\tonFinish();\n\t\t}\n\t}\n}","import {Type} from 'main.core';\nimport {Animation} from \"./animation\";\n\nexport class Queue\n{\n\tstatic #items = [];\n\tstatic #isRunning = false;\n\n\tstatic add(animation: Animation|Animation[]): Queue\n\t{\n\t\tQueue.#items.push(animation);\n\n\t\treturn Queue;\n\t}\n\n\tstatic run()\n\t{\n\t\tif(Queue.#isRunning)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t/** @var Animation animation */\n\t\tlet animations = Queue.#items.shift();\n\t\tif(!animations)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif(!Type.isArray(animations))\n\t\t{\n\t\t\tanimations = [animations];\n\t\t}\n\t\tQueue.#isRunning = true;\n\t\tconst promises = [];\n\t\tanimations.forEach((animation: Animation) => {\n\t\t\tif(animation instanceof Animation)\n\t\t\t{\n\t\t\t\tpromises.push(animation.start());\n\t\t\t}\n\t\t});\n\n\t\tPromise.all(promises).then(() => {\n\t\t\tQueue.#isRunning = false;\n\t\t\tQueue.run();\n\t\t});\n\t}\n}","import {Loc, Dom, Text, Event, Tag, Type, Reflection, Runtime} from 'main.core';\nimport {EventEmitter, BaseEvent} from 'main.core.events';\nimport {Loader} from 'main.loader';\nimport {Item} from './item';\nimport {History} from './history';\nimport {StageChange} from './stagechange';\nimport {FieldsChange} from './fieldschange';\nimport {Editor} from './editor';\nimport {Comment} from './comment';\nimport {Drop} from './animation/drop';\nimport {Pin} from './animation/pin';\nimport {Show} from './animation/show';\nimport {TaskComplete} from './animation/taskcomplete';\nimport {Hide} from './animation/hide';\nimport {Queue} from './animation/queue';\n\nimport 'main.date';\n\n/**\n * @mixes EventEmitter\n * @memberOf BX.UI.Timeline\n */\nexport class Stream\n{\n\tconstructor(params: {\n\t\titems: ?Array,\n\t\tusers: ?Object,\n\t\tnameFormat: ?string,\n\t\tpageSize: ?number,\n\t\ttasks: ?Array,\n\t\teditors: ?Array,\n\t\titemClasses: ?Array,\n\t})\n\t{\n\t\tthis.users = new Map();\n\t\tthis.eventIds = new Set();\n\t\tthis.pinnedItems = [];\n\t\tthis.tasks = [];\n\t\tthis.items = [];\n\t\tthis.editors = new Map();\n\t\tthis.layout = {};\n\t\tthis.dateSeparators = new Map();\n\t\tthis.nameFormat = params.nameFormat;\n\t\tEventEmitter.makeObservable(this, 'BX.UI.Timeline.Stream');\n\t\tthis.initItemClasses(params.itemClasses);\n\t\tthis.currentPage = 1;\n\t\tif(Type.isPlainObject(params))\n\t\t{\n\t\t\tif(Type.isNumber(params.pageSize))\n\t\t\t{\n\t\t\t\tthis.pageSize = params.pageSize;\n\t\t\t}\n\t\t\tif(!this.pageSize || this.pageSize <= 0)\n\t\t\t{\n\t\t\t\tthis.pageSize = 20;\n\t\t\t}\n\t\t\tthis.addUsers(params.users);\n\t\t\tif(Type.isArray(params.items))\n\t\t\t{\n\t\t\t\tparams.items.forEach((data) => {\n\t\t\t\t\tconst item = this.createItem(data);\n\t\t\t\t\tif(item)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.addItem(item);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tif(Type.isArray(params.tasks))\n\t\t\t{\n\t\t\t\tthis.initTasks(params.tasks);\n\t\t\t}\n\t\t\tif(Type.isArray(params.editors))\n\t\t\t{\n\t\t\t\tparams.editors.forEach((editor: Editor) => {\n\t\t\t\t\tif(editor instanceof Editor)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.editors.set(editor.getId(), editor);\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\tthis.bindEvents();\n\n\t\tthis.progress = false;\n\n\t\tthis.emit('onAfterInit', {\n\t\t\tstream: this,\n\t\t});\n\t}\n\n\tinitTasks(tasks: Array)\n\t{\n\t\tthis.tasks = [];\n\t\ttasks.forEach((data) => {\n\t\t\tconst task = this.createItem(data);\n\t\t\tif(task)\n\t\t\t{\n\t\t\t\tthis.tasks.push(task);\n\t\t\t}\n\t\t});\n\t}\n\n\tbindEvents()\n\t{\n\t\tthis.onScrollHandler = Runtime.throttle(this.onScroll.bind(this), 100).bind(this);\n\t\tEvent.ready(() => {\n\t\t\tif(this.getItems().length >= this.pageSize)\n\t\t\t{\n\t\t\t\tthis.enableLoadOnScroll();\n\t\t\t}\n\t\t});\n\t\tArray.from(this.editors.values()).forEach((editor: Editor) => {\n\t\t\teditor.subscribe('error', (event: BaseEvent) => {\n\t\t\t\tthis.onError(event.getData());\n\t\t\t});\n\t\t});\n\t}\n\n\tinitItemClasses(itemClasses: ?Array)\n\t{\n\t\tif(itemClasses)\n\t\t{\n\t\t\tthis.itemClasses = new Map(itemClasses);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.itemClasses = new Map();\n\t\t}\n\t\tthis.itemClasses.set('item_create', History);\n\t\tthis.itemClasses.set('stage_change', StageChange);\n\t\tthis.itemClasses.set('fields_change', FieldsChange);\n\t\tthis.itemClasses.set('comment', Comment);\n\t}\n\n\tcreateItem(data: {}, itemClassName: ?Function): ?Item\n\t{\n\t\tif(!Type.isPlainObject(data.events))\n\t\t{\n\t\t\tdata.events = {};\n\t\t}\n\t\tdata.eventIds = this.eventIds;\n\t\tdata.events.onPinClick = this.onItemPinClick.bind(this);\n\t\tdata.events.onDelete = this.onItemDelete.bind(this);\n\t\tdata.events.onError = this.onError.bind(this);\n\t\tif(!Type.isFunction(itemClassName))\n\t\t{\n\t\t\titemClassName = this.getItemClassName(data);\n\t\t}\n\t\tconst item = new itemClassName(data);\n\t\tif(item instanceof Item)\n\t\t{\n\t\t\treturn item\n\t\t\t\t.setUserData(this.users)\n\t\t\t\t.setTimeFormat(this.getTimeFormat())\n\t\t\t\t.setNameFormat(this.nameFormat);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\taddItem(item: Item): Stream\n\t{\n\t\tif(item instanceof Item)\n\t\t{\n\t\t\tthis.items.push(item);\n\t\t\tif(item.isFixed)\n\t\t\t{\n\t\t\t\tthis.pinnedItems.push(this.getPinnedItemFromItem(item));\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tstatic getItemFromArray(items: Array, id: string|number): ?Item\n\t{\n\t\tlet result = null;\n\t\tlet key = 0;\n\t\twhile(true)\n\t\t{\n\t\t\tif(!items[key])\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst item = items[key];\n\t\t\tif(item.getId() === id)\n\t\t\t{\n\t\t\t\tresult = item;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tkey++;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tstatic getItemIndexFromArray(items: Array, id: string|number): ?number\n\t{\n\t\tlet result = null;\n\t\tlet key = 0;\n\t\twhile(true)\n\t\t{\n\t\t\tif(!items[key])\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst item = items[key];\n\t\t\tif(item.getId() === id)\n\t\t\t{\n\t\t\t\tresult = key;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tkey++;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tgetItems(): Array\n\t{\n\t\treturn this.items;\n\t}\n\n\tgetItem(id: string|number): ?Item\n\t{\n\t\treturn Stream.getItemFromArray(this.getItems(), id);\n\t}\n\n\tgetPinnedItems(): Array\n\t{\n\t\treturn this.pinnedItems;\n\t}\n\n\tgetPinnedItem(id: string|number): ?Item\n\t{\n\t\treturn Stream.getItemFromArray(this.getPinnedItems(), id);\n\t}\n\n\tgetTasks(): Array\n\t{\n\t\treturn this.tasks;\n\t}\n\n\tgetTask(id: string|number): ?Item\n\t{\n\t\treturn Stream.getItemFromArray(this.getTasks(), id);\n\t}\n\n\trender(): Element\n\t{\n\t\tif(!this.layout.container)\n\t\t{\n\t\t\tthis.layout.container = Tag.render`<div class=\"ui-item-detail-stream-container\"></div>`;\n\t\t}\n\n\t\tif(this.editors.size > 0)\n\t\t{\n\t\t\tthis.renderEditors();\n\t\t}\n\n\t\tif(!this.layout.content)\n\t\t{\n\t\t\tthis.layout.content = Tag.render`<div class=\"ui-item-detail-stream-content\"></div>`;\n\t\t\tthis.layout.container.appendChild(this.layout.content);\n\t\t}\n\n\t\tif(!this.layout.pinnedItemsContainer)\n\t\t{\n\t\t\tthis.layout.pinnedItemsContainer = Tag.render`<div class=\"ui-item-detail-stream-container-list ui-item-detail-stream-container-list-fixed\"></div>`;\n\t\t\tthis.layout.content.appendChild(this.layout.pinnedItemsContainer);\n\t\t}\n\n\t\tthis.renderPinnedItems();\n\n\t\tif(!this.layout.tasksContainer)\n\t\t{\n\t\t\tthis.layout.tasksContainer = Tag.render`<div class=\"ui-item-detail-stream-container-list\"></div>`;\n\t\t\tthis.layout.content.appendChild(this.layout.tasksContainer);\n\t\t}\n\n\t\tthis.renderTasks();\n\n\t\tif(!this.layout.itemsContainer)\n\t\t{\n\t\t\tthis.layout.itemsContainer = Tag.render`<div class=\"ui-item-detail-stream-container-list\"></div>`;\n\t\t\tthis.layout.content.appendChild(this.layout.itemsContainer);\n\t\t}\n\n\t\tthis.renderItems();\n\n\t\tthis.emit('onAfterRender');\n\n\t\treturn this.layout.container;\n\t}\n\n\tgetContainer(): ?Element\n\t{\n\t\treturn this.layout.container\n\t}\n\n\trenderEditors()\n\t{\n\t\tif(!this.layout.container)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tif(!this.layout.editors)\n\t\t{\n\t\t\tthis.layout.editorsTitle = Tag.render`<div class=\"ui-item-detail-stream-section-new-header\"></div>`;\n\t\t\tthis.layout.editorsContent = Tag.render`<div class=\"ui-item-detail-stream-section-new-detail\"></div>`;\n\t\t\tthis.layout.editors = Tag.render`<div class=\"ui-item-detail-stream-section ui-item-detail-stream-section-new\">\n\t\t\t\t<div class=\"ui-item-detail-stream-section-icon\"></div>\n\t\t\t\t<div class=\"ui-item-detail-stream-section-content\">\n\t\t\t\t\t${this.layout.editorsTitle}\n\t\t\t\t</div>\n\t\t\t\t${this.layout.editorsContent}\n\t\t\t</div>`;\n\n\t\t\tlet isTitleActive = true;\n\t\t\tArray.from(this.editors.values()).forEach((editor: Editor) => {\n\t\t\t\tthis.layout.editorsTitle.appendChild(Tag.render`<a class=\"ui-item-detail-stream-section-new-action ${isTitleActive ? 'ui-item-detail-stream-section-new-action-active' : ''}\">${editor.getTitle()}</a>`);\n\t\t\t\tthis.layout.editorsContent.appendChild(editor.render());\n\t\t\t\tisTitleActive = false;\n\t\t\t});\n\n\t\t\tthis.layout.container.appendChild(this.layout.editors);\n\t\t}\n\t}\n\n\trenderPinnedItems()\n\t{\n\t\tDom.clean(this.layout.pinnedItemsContainer);\n\t\tthis.createFixedAnchor();\n\n\t\tthis.getPinnedItems().forEach((pinnedItem: Item) => {\n\t\t\tif(!pinnedItem.isRendered())\n\t\t\t{\n\t\t\t\tpinnedItem.render();\n\t\t\t}\n\t\t\tDom.append(pinnedItem.getContainer(), this.layout.pinnedItemsContainer);\n\t\t});\n\t}\n\n\tcreateFixedAnchor()\n\t{\n\t\tthis.fixedAnchor = Tag.render`<div class=\"ui-item-detail-stream-section-fixed-anchor\"></div>`;\n\t\tDom.prepend(this.fixedAnchor, this.layout.pinnedItemsContainer);\n\t}\n\n\tupdateTasks(tasks: Array)\n\t{\n\t\tif(!this.tasks)\n\t\t{\n\t\t\tthis.tasks = [];\n\t\t}\n\t\tconst newTasks = [];\n\t\ttasks.forEach((data) => {\n\t\t\tconst task = this.createItem(data);\n\t\t\tif(task)\n\t\t\t{\n\t\t\t\tnewTasks.push(task);\n\t\t\t\tthis.addUsers(data.users);\n\t\t\t}\n\t\t});\n\t\tconst deleteTasks = [];\n\t\tthis.tasks.forEach((task: Item) => {\n\t\t\tif(!Stream.getItemFromArray(newTasks, task.getId()))\n\t\t\t{\n\t\t\t\tdeleteTasks.push(task);\n\t\t\t}\n\t\t});\n\t\tdeleteTasks.forEach((task) => {\n\t\t\tthis.deleteItem(task);\n\t\t});\n\t\tlet tasksTitle = this.getTasksTitle();\n\t\tif(newTasks.length > 0)\n\t\t{\n\t\t\tif(!tasksTitle)\n\t\t\t{\n\t\t\t\ttasksTitle = this.renderTasksTitle();\n\t\t\t\tthis.layout.tasksContainer.appendChild(tasksTitle);\n\t\t\t}\n\t\t\tnewTasks.forEach((task: Item) => {\n\t\t\t\tif(!this.getTask(task.getId()))\n\t\t\t\t{\n\t\t\t\t\tthis.tasks.push(task);\n\t\t\t\t\tQueue.add(new Show({\n\t\t\t\t\t\titem: task,\n\t\t\t\t\t\tcontainer: this.layout.tasksContainer,\n\t\t\t\t\t\tinsertAfter: tasksTitle,\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tconst streamTask = this.getTask(task.getId());\n\t\t\t\t\tstreamTask.setUserData(this.users);\n\t\t\t\t\tstreamTask.update(task.getDataForUpdate());\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconst title = this.getTasksTitle();\n\t\t\tif(title)\n\t\t\t{\n\t\t\t\tDom.remove(title);\n\t\t\t\tthis.layout.tasksTitle = null;\n\t\t\t}\n\t\t}\n\t\tQueue.run();\n\t}\n\n\trenderTasks()\n\t{\n\t\tif(this.getTasks().length > 0)\n\t\t{\n\t\t\tthis.layout.tasksContainer.appendChild(this.renderTasksTitle());\n\t\t\tthis.getTasks().forEach((task: Item) => {\n\t\t\t\tif(!task.isRendered())\n\t\t\t\t{\n\t\t\t\t\tDom.append(task.render(), this.layout.tasksContainer);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconst title = this.getTasksTitle();\n\t\t\tif(title)\n\t\t\t{\n\t\t\t\ttitle.parentElement.removeChild(title);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetTasksTitle(): ?Element\n\t{\n\t\treturn this.layout.tasksTitle;\n\t}\n\n\trenderTasksTitle(): Element\n\t{\n\t\tif(!this.layout.tasksTitle)\n\t\t{\n\t\t\tthis.layout.tasksTitle = Tag.render`<div class=\"ui-item-detail-stream-section ui-item-detail-stream-section-planned-label\">\n\t\t\t\t<div class=\"ui-item-detail-stream-section-content\">\n\t\t\t\t\t<div class=\"ui-item-detail-stream-planned-text\">${Loc.getMessage('UI_TIMELINE_TASKS_TITLE')}</div>\n\t\t\t\t</div>\n\t\t\t</div>`;\n\t\t}\n\n\t\treturn this.layout.tasksTitle;\n\t}\n\n\trenderItems()\n\t{\n\t\tconst lastItem = this.items[this.items.length - 1];\n\t\tthis.items.forEach((item: Item) => {\n\t\t\titem.setIsLast((item === lastItem));\n\t\t\tif(!item.isRendered())\n\t\t\t{\n\t\t\t\tconst day = this.constructor.getDayFromDate(item.getCreatedTime());\n\t\t\t\tif(!this.getDateSeparator(day))\n\t\t\t\t{\n\t\t\t\t\tconst dateSeparator = this.createDateSeparator(day);\n\t\t\t\t\tDom.append(dateSeparator, this.layout.itemsContainer);\n\t\t\t\t}\n\t\t\t\tDom.append(item.render(), this.layout.itemsContainer);\n\t\t\t}\n\t\t});\n\t}\n\n\tgetDateSeparator(day: string): ?Element\n\t{\n\t\treturn this.dateSeparators.get(day);\n\t}\n\n\tcreateDateSeparator(day: string): Element\n\t{\n\t\tconst separator = this.renderDateSeparator(day);\n\t\tthis.dateSeparators.set(day, separator);\n\n\t\treturn separator;\n\t}\n\n\tstatic getDayFromDate(date: Date): ?string\n\t{\n\t\tif(date instanceof Date)\n\t\t{\n\t\t\tif(Stream.isToday(date))\n\t\t\t{\n\t\t\t\treturn BX.date.format('today');\n\t\t\t}\n\n\t\t\treturn BX.date.format('d F Y', date);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tstatic isToday(date: Date): boolean\n\t{\n\t\treturn (BX.date.format('d F Y', date) === BX.date.format('d F Y'));\n\t}\n\n\trenderDateSeparator(day: string): Element\n\t{\n\t\treturn Tag.render`<div class=\"ui-item-detail-stream-section ui-item-detail-stream-section-history-label\">\n\t\t\t<div class=\"ui-item-detail-stream-section-content\">\n\t\t\t\t<div class=\"ui-item-detail-stream-history-text\">${day}</div>\n\t\t\t</div>\n\t\t</div>`;\n\t}\n\n\tgetItemClassName(data: {\n\t\taction: ?string,\n\t\titemClassName: ?string\n\t}): ?Function\n\t{\n\t\tlet itemClassName = null;\n\t\tif(Type.isPlainObject(data) && Type.isString(data.itemClassName))\n\t\t{\n\t\t\titemClassName = data.itemClassName;\n\t\t}\n\n\t\tif(itemClassName)\n\t\t{\n\t\t\titemClassName = Reflection.getClass(itemClassName);\n\t\t}\n\t\tif(!Type.isFunction(itemClassName))\n\t\t{\n\t\t\tif(Type.isPlainObject(data) && Type.isString(data.action))\n\t\t\t{\n\t\t\t\titemClassName = this.itemClasses.get(data.action);\n\t\t\t}\n\t\t\tif(!itemClassName)\n\t\t\t{\n\t\t\t\titemClassName = History;\n\t\t\t}\n\t\t}\n\n\t\treturn itemClassName;\n\t}\n\n\tinsertItem(item: Item): this\n\t{\n\t\tif(!(item instanceof Item))\n\t\t{\n\t\t\treturn this;\n\t\t}\n\n\t\tif(this.getItem(item.getId()))\n\t\t{\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.items.unshift(item);\n\t\tconst day = this.constructor.getDayFromDate(item.getCreatedTime());\n\t\tif(!day)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\tif(!this.getDateSeparator(day))\n\t\t{\n\t\t\tconst separator = this.createDateSeparator(day);\n\t\t\tDom.prepend(separator, this.layout.itemsContainer);\n\t\t}\n\n\t\tQueue.add(new Drop({\n\t\t\titem,\n\t\t\tinsertAfter: this.getDateSeparator(day),\n\t\t\tcontainer: this.layout.editorsContent,\n\t\t})).run();\n\n\t\treturn this;\n\t}\n\n\tgetTimeFormat(): string\n\t{\n\t\tif(!this.timeFormat)\n\t\t{\n\t\t\tconst datetimeFormat = Loc.getMessage(\"FORMAT_DATETIME\").replace(/:SS/, \"\");\n\t\t\tconst dateFormat = Loc.getMessage(\"FORMAT_DATE\");\n\t\t\tthis.timeFormat = BX.date.convertBitrixFormat(datetimeFormat.trim().replace(dateFormat, \"\"));\n\t\t}\n\n\t\treturn this.timeFormat;\n\t}\n\n\tgetDateTimeFormat(): string\n\t{\n\t\tif(!this.dateTimeFormat)\n\t\t{\n\t\t\tconst datetimeFormat = Loc.getMessage(\"FORMAT_DATETIME\").replace(/:SS/, \"\");\n\t\t\tthis.dateTimeFormat = BX.date.convertBitrixFormat(datetimeFormat);\n\t\t}\n\n\t\treturn this.dateTimeFormat;\n\t}\n\n\tstartProgress()\n\t{\n\t\tthis.progress = true;\n\t\tif(!this.getLoader().isShown())\n\t\t{\n\t\t\tconst lastItem = this.items[this.items.length - 1];\n\t\t\tif(lastItem && lastItem.isRendered())\n\t\t\t{\n\t\t\t\tthis.getLoader().show(lastItem.getContainer());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.getLoader().show(this.layout.container);\n\t\t\t}\n\t\t}\n\t}\n\n\tstopProgress()\n\t{\n\t\tthis.progress = false;\n\t\tthis.getLoader().hide();\n\t}\n\n\tisProgress()\n\t{\n\t\treturn (this.progress === true);\n\t}\n\n\tgetLoader()\n\t{\n\t\tif(!this.loader)\n\t\t{\n\t\t\tthis.loader = new Loader({size: 150});\n\t\t}\n\n\t\treturn this.loader;\n\t}\n\n\tenableLoadOnScroll()\n\t{\n\t\tEvent.bind(window, 'scroll', this.onScrollHandler);\n\t}\n\n\tdisableLoadOnScroll()\n\t{\n\t\tEvent.unbind(window, 'scroll', this.onScrollHandler);\n\t}\n\n\tonScroll()\n\t{\n\t\tif(this.isProgress())\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tconst lastItem = this.items[this.items.length - 1];\n\t\tif(!lastItem)\n\t\t{\n\t\t\tthis.disableLoadOnScroll();\n\t\t\treturn;\n\t\t}\n\t\tif(!lastItem.isRendered())\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tconst pos = lastItem.getContainer().getBoundingClientRect();\n\t\tif(pos.top <= document.documentElement.clientHeight)\n\t\t{\n\t\t\tthis.emit('onScrollToTheBottom');\n\t\t}\n\t}\n\n\tgetPinnedItemFromItem(item: Item): Item\n\t{\n\t\tconst pinnedItem = Runtime.clone(item);\n\t\tif(item.isRendered())\n\t\t{\n\t\t\tpinnedItem.clearLayout();\n\t\t}\n\t\tpinnedItem.setTimeFormat(this.getDateTimeFormat());\n\t\tpinnedItem.isPinned = true;\n\n\t\treturn pinnedItem;\n\t}\n\n\tonItemPinClick(item: Item)\n\t{\n\t\tif(item.isFixed)\n\t\t{\n\t\t\tthis.pinItem(item);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.unPinItem(item);\n\t\t}\n\t\tthis.emit('onPinClick', {item});\n\t}\n\n\tpinItem(item: Item): Stream\n\t{\n\t\tconst pinnedItem = this.getPinnedItem(item.getId());\n\t\tif(!pinnedItem)\n\t\t{\n\t\t\tthis.getPinnedItems().push(this.getPinnedItemFromItem(item));\n\t\t}\n\n\t\tQueue.add(new Pin({\n\t\t\titem: this.getPinnedItem(item.getId()),\n\t\t\tanchor: this.fixedAnchor,\n\t\t\tstartPosition: Dom.getPosition(item.getContainer()),\n\t\t})).run();\n\n\t\treturn this;\n\t}\n\n\tunPinItem(item: Item): Stream\n\t{\n\t\tconst pinnedItem = this.getPinnedItem(item.getId());\n\t\tif(pinnedItem === item)\n\t\t{\n\t\t\tconst commonItem = this.getItem(pinnedItem.getId());\n\t\t\tif(commonItem)\n\t\t\t{\n\t\t\t\tcommonItem.isFixed = false;\n\t\t\t\tcommonItem.renderPin();\n\t\t\t}\n\t\t}\n\t\tif(pinnedItem && pinnedItem.isRendered())\n\t\t{\n\t\t\tQueue.add(new Hide({\n\t\t\t\tnode: pinnedItem.getContainer(),\n\t\t\t})).run();\n\t\t}\n\t\tthis.pinnedItems = this.pinnedItems.filter(filteredItem => filteredItem.getId() !== item.getId());\n\t}\n\n\tonItemDelete(item: Item)\n\t{\n\t\tthis.deleteItem(item);\n\t}\n\n\tdeleteItem(item: Item)\n\t{\n\t\tlet itemIndex = Stream.getItemIndexFromArray(this.items, item.getId());\n\t\tconst animations = [];\n\t\tif(itemIndex !== null)\n\t\t{\n\t\t\tif(item.isRendered())\n\t\t\t{\n\t\t\t\tconst animation = new Hide({\n\t\t\t\t\tnode: this.getItem(item.getId()).getContainer(),\n\t\t\t\t});\n\t\t\t\tanimations.push(animation);\n\t\t\t}\n\t\t\tthis.items.splice(itemIndex, 1);\n\t\t}\n\t\titemIndex = Stream.getItemIndexFromArray(this.pinnedItems, item.getId());\n\t\tif(itemIndex !== null)\n\t\t{\n\t\t\tif(item.isRendered())\n\t\t\t{\n\t\t\t\tconst animation = new Hide({\n\t\t\t\t\tnode: this.getPinnedItem(item.getId()).getContainer(),\n\t\t\t\t});\n\t\t\t\tanimations.push(animation);\n\t\t\t}\n\t\t\tthis.pinnedItems.splice(itemIndex, 1);\n\t\t}\n\t\titemIndex = Stream.getItemIndexFromArray(this.tasks, item.getId());\n\t\tif(itemIndex !== null)\n\t\t{\n\t\t\tlet isAddHideAnimation = true;\n\t\t\tif(item.completedData)\n\t\t\t{\n\t\t\t\tconst newItem = this.createItem(item.completedData);\n\t\t\t\tif(newItem)\n\t\t\t\t{\n\t\t\t\t\tif(!this.getItem(newItem.getId()))\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.items.unshift(newItem);\n\t\t\t\t\t\tconst day = this.constructor.getDayFromDate(newItem.getCreatedTime());\n\t\t\t\t\t\tif(day)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(!this.getDateSeparator(day))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tconst separator = this.createDateSeparator(day);\n\t\t\t\t\t\t\t\tDom.prepend(separator, this.layout.itemsContainer);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tQueue.add(new TaskComplete({\n\t\t\t\t\t\t\t\titem: newItem,\n\t\t\t\t\t\t\t\ttask: item,\n\t\t\t\t\t\t\t\tinsertAfter: this.getDateSeparator(day),\n\t\t\t\t\t\t\t})).run();\n\n\t\t\t\t\t\t\tisAddHideAnimation = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isAddHideAnimation)\n\t\t\t{\n\t\t\t\tanimations.push(new Hide({\n\t\t\t\t\tnode: this.getTask(item.getId()).getContainer(),\n\t\t\t\t}));\n\t\t\t}\n\t\t\tthis.tasks.splice(itemIndex, 1);\n\t\t}\n\t\tQueue.add(animations).run();\n\t}\n\n\tonError({message})\n\t{\n\t\tthis.showError(message);\n\t}\n\n\tshowError(message)\n\t{\n\t\tconsole.error(message);\n\t}\n\n\taddUsers(users: Object)\n\t{\n\t\tif(Type.isPlainObject(users))\n\t\t{\n\t\t\tif(!this.users)\n\t\t\t{\n\t\t\t\tthis.users = new Map();\n\t\t\t}\n\t\t\tObject.keys(users).forEach((userId) => {\n\t\t\t\tuserId = Text.toInteger(userId);\n\t\t\t\tif(userId > 0)\n\t\t\t\t{\n\t\t\t\t\tthis.users.set(userId, users[userId]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\taddAnimation(animation: Animation)\n\t{\n\t\tQueue.add(animation).run();\n\t}\n}","import {Stream} from './stream';\nimport {Item} from './item';\nimport {History} from './history';\nimport {StageChange} from './stagechange';\nimport {FieldsChange} from './fieldschange';\nimport {Editor} from './editor';\nimport {CommentEditor} from './commenteditor';\n\nimport './css/style.css';\n\nimport 'ui.design-tokens';\nimport 'ui.fonts.opensans';\n\n/**\n * @memberOf BX.UI\n */\nexport const Timeline = {\n\tStream,\n\tItem,\n\tHistory,\n\tStageChange,\n\tEditor,\n\tCommentEditor,\n\tFieldsChange,\n};\n"],"names":["Item","constructor","params","isProgress","EventEmitter","makeObservable","id","createdTimestamp","action","title","description","htmlDescription","textDescription","userId","isFixed","data","eventIds","Set","Type","isPlainObject","isSet","isString","isNumber","layout","timeFormat","nameFormat","users","Map","isLast","events","isPinned","afterRender","Event","bind","renderPin","onPinClick","bindActionsButtonClick","button","getActionsButton","onActionsButtonClick","setIsLast","isRendered","getContainer","classList","add","remove","setUserData","setTimeFormat","setNameFormat","container","isDomNode","getCreatedTime","Text","toInteger","Date","formatTime","time","BX","date","format","getId","getTitle","getUserId","getScope","scope","isScopeManual","isScopeAutomation","isScopeTask","isScopeRest","render","renderContainer","updateLayout","clearLayout","appendChild","renderIcon","hasMenu","renderActionsButton","content","getContent","renderContent","Tag","pin","renderDescription","header","renderHeader","renderMain","renderHeaderUser","size","userData","link","fullName","photo","get","safeFullName","safe","main","getMain","icon","getItem","item","isFunction","emit","isSkipContainer","Object","keys","forEach","name","node","Dom","getDataForUpdate","updateData","update","onError","onDelete","hasActions","getActions","length","contextMenuButton","getActionsMenuId","getActionsMenu","toggle","MenuManager","create","bindElement","items","offsetTop","offsetLeft","angle","position","offset","onPopupShow","onContextMenuShow","onPopupClose","onContextMenuClose","destroy","startProgress","getLoader","show","stopProgress","isShown","hide","loader","Loader","target","History","encode","renderStageChangeTitle","Loc","getMessage","renderStageChange","stageFrom","getStageFrom","stageTo","getStageTo","getFields","isArray","fields","renderFieldsChange","list","field","push","renderFieldsChangeTitle","StageChange","stageChange","fieldsChange","FieldsChange","Editor","getRandom","Error","clean","CommentEditor","commentId","editorContent","setEventNamespace","getVisualEditorName","replace","getTextarea","textarea","renderTextarea","onFocus","getVisualEditorContainer","visualEditorContainer","renderVisualEditorContainer","getButtonsContainer","buttonsContainer","renderButtons","renderSaveButton","renderCancelButton","getSaveButton","saveButton","save","getCancelButton","cancelButton","cancel","showVisualEditor","postForm","visualEditor","eventNode","style","display","Focus","loadVisualEditor","then","setTimeout","oEditor","GetContent","catch","message","Promise","resolve","reject","showEditorLoader","event","BaseEvent","emitAsync","html","getData","Runtime","hideEditorLoader","LHEPostForm","BXHtmlEditor","getHandler","Get","editorLoader","append","hideVisualEditor","isCancel","files","getAttachments","getEmptyMessageNotification","reinit","emptyMessagePopup","Popup","darkMode","autoHide","zIndex","closeByEsc","bindOptions","forceBindPosition","refresh","SetContent","ReInitIframe","attachments","arFiles","controllers","fileControllers","values","controller","includes","fileController","fileId","COLLAPSE_TEXT_MAX_LENGTH","Comment","props","isCollapsed","isContentLoaded","isAddExpandBlock","hasFiles","getMainDescription","renderExpandBlock","renderFilesContainer","ready","loadFilesContent","getFiles","renderMainDescription","mainDescription","onMainClick","expandBlock","renderExpandButton","getExpandBlock","expandButton","onExpandButtonClick","getExpandButton","getCommendEditor","commentEditor","subscribe","switchToViewMode","onSaveComment","getEditorContainer","editorContainer","renderEditorContainer","getEditorButtons","editorButtons","renderEditorButtons","filesContainer","getFilesContainer","switchToEditMode","text","onclick","actionEdit","actionDelete","close","MessageBox","confirm","comment","tagName","toLowerCase","hasClass","document","getSelection","toString","preventDefault","stopPropagation","maxHeight","scrollHeight","innerText","loadContent","Animation","start","finish","onFinish","Drop","insertAfter","timeout","DEFAULT_TIMEOUT","createGhost","width","offsetWidth","top","getPosition","left","body","anchor","prepend","moveGhost","anchorPosition","startPosition","movingEvent","easing","duration","DURATION","height","transition","makeEaseOut","transitions","quart","step","state","complete","animate","opacity","Pin","addClass","_cloneHeight","_minHeight","_sumPaddingContent","_anchorPosition","_difference","bottom","_deepHistoryLimit","clientHeight","_duration","Math","abs","Show","expand","fadeIn","overflow","EXPAND_DURATION","FADE_IN_DURATION","TaskComplete","task","taskNode","offsetHeight","taskHeight","removeClass","Hide","wrapperPosition","hideEvent","marginBottom","Queue","animation","run","animations","shift","promises","all","Stream","pinnedItems","tasks","editors","dateSeparators","initItemClasses","itemClasses","currentPage","pageSize","addUsers","createItem","addItem","initTasks","editor","set","bindEvents","progress","stream","onScrollHandler","throttle","onScroll","getItems","enableLoadOnScroll","Array","from","itemClassName","onItemPinClick","onItemDelete","getItemClassName","getTimeFormat","getPinnedItemFromItem","getItemFromArray","result","key","getItemIndexFromArray","getPinnedItems","getPinnedItem","getTasks","getTask","renderEditors","pinnedItemsContainer","renderPinnedItems","tasksContainer","renderTasks","itemsContainer","renderItems","editorsTitle","editorsContent","isTitleActive","createFixedAnchor","pinnedItem","fixedAnchor","updateTasks","newTasks","deleteTasks","deleteItem","tasksTitle","getTasksTitle","renderTasksTitle","streamTask","parentElement","removeChild","lastItem","day","getDayFromDate","getDateSeparator","dateSeparator","createDateSeparator","separator","renderDateSeparator","isToday","Reflection","getClass","insertItem","unshift","datetimeFormat","dateFormat","convertBitrixFormat","trim","getDateTimeFormat","dateTimeFormat","window","disableLoadOnScroll","unbind","pos","getBoundingClientRect","documentElement","clone","pinItem","unPinItem","commonItem","filter","filteredItem","itemIndex","splice","isAddHideAnimation","completedData","newItem","showError","console","error","addAnimation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