Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/ilovecveti.ru/bitrix/js/bizproc/automation/robot-selector/src/groups/ |
Upload File : |
import {Type} from 'main.core'; import type { GroupData } from 'ui.entity-catalog'; export class Group { #customData: Object = {}; #selected: boolean = false; #disabled: boolean = false; #compare: Function = null; constructor() { if (this.constructor === Group) { throw new Error('Object of Abstract Class cannot be created'); } } getId(): string { throw new Error("Abstract Method has no implementation"); } getName(): string { throw new Error("Abstract Method has no implementation"); } getIcon(): string { return ''; } getTags(): Array { return []; } getAdviceTitle(): string { return ''; } getAdviceAvatar(): string { return ''; } setCustomData(customData = {}): this { this.#customData = customData; return this; } getCustomData(): Object { return this.#customData; } setSelected(selected = false): this { this.#selected = selected; return this; } getSelected(): boolean { return this.#selected; } setDisabled(disabled = false): this { this.#disabled = disabled; return this; } getDisabled(): boolean { return this.#disabled; } setCompare(compare: Function): this { this.#compare = compare; return this; } getCompare(): ?Function { return this.#compare; } getData(): GroupData { const data = { id: this.getId(), name: this.getName(), icon: this.getIcon(), tags: this.getTags(), adviceTitle: this.getAdviceTitle(), adviceAvatar: this.getAdviceAvatar(), customData: this.getCustomData(), selected: this.getSelected(), disabled: this.getDisabled(), }; if (Type.isFunction(this.getCompare())) { data.compare = this.getCompare(); } return data; } }